diff --git a/pe/docs/AssetControllerApi.md b/pe/docs/AssetControllerApi.md index f325dfb9..25e1f7e7 100644 --- a/pe/docs/AssetControllerApi.md +++ b/pe/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/pe/docs/CsvReportTemplateConfig.md b/pe/docs/CsvReportTemplateConfig.md index c1dfc221..8520d669 100644 --- a/pe/docs/CsvReportTemplateConfig.md +++ b/pe/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/pe/docs/CustomerControllerApi.md b/pe/docs/CustomerControllerApi.md index 9c47779e..fd30f592 100644 --- a/pe/docs/CustomerControllerApi.md +++ b/pe/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/pe/docs/DashboardControllerApi.md b/pe/docs/DashboardControllerApi.md index 811c9785..ab13626f 100644 --- a/pe/docs/DashboardControllerApi.md +++ b/pe/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/pe/docs/DeviceControllerApi.md b/pe/docs/DeviceControllerApi.md index e0b283f4..68ba774b 100644 --- a/pe/docs/DeviceControllerApi.md +++ b/pe/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/pe/docs/EdgeControllerApi.md b/pe/docs/EdgeControllerApi.md index 7f1ea69a..934d2427 100644 --- a/pe/docs/EdgeControllerApi.md +++ b/pe/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/pe/docs/EntityViewControllerApi.md b/pe/docs/EntityViewControllerApi.md index 2ff0afc4..0c768d80 100644 --- a/pe/docs/EntityViewControllerApi.md +++ b/pe/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/pe/docs/HeaderFooter.md b/pe/docs/HeaderFooter.md index fc1f7ff6..d499aad9 100644 --- a/pe/docs/HeaderFooter.md +++ b/pe/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/pe/docs/IntegrationControllerApi.md b/pe/docs/IntegrationControllerApi.md index 26cce367..4749151e 100644 --- a/pe/docs/IntegrationControllerApi.md +++ b/pe/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/pe/docs/Job.md b/pe/docs/Job.md index 9449e7a8..648ef474 100644 --- a/pe/docs/Job.md +++ b/pe/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/pe/docs/JobControllerApi.md b/pe/docs/JobControllerApi.md index efeedf20..ec8134e1 100644 --- a/pe/docs/JobControllerApi.md +++ b/pe/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/pe/docs/PageDataJob.md b/pe/docs/PageDataJob.md index e0177216..8f04ad19 100644 --- a/pe/docs/PageDataJob.md +++ b/pe/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/pe/docs/PdfReportTemplateConfig.md b/pe/docs/PdfReportTemplateConfig.md index 72a3efab..56c0200a 100644 --- a/pe/docs/PdfReportTemplateConfig.md +++ b/pe/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/pe/docs/ReportBarChartWithLabelsSettings.md b/pe/docs/ReportBarChartWithLabelsSettings.md index f0006a3d..2b004a9d 100644 --- a/pe/docs/ReportBarChartWithLabelsSettings.md +++ b/pe/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/pe/docs/ReportComponent.md b/pe/docs/ReportComponent.md index 8b6674dd..90ad086f 100644 --- a/pe/docs/ReportComponent.md +++ b/pe/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/pe/docs/ReportControllerApi.md b/pe/docs/ReportControllerApi.md index 67ec429b..14c75ad7 100644 --- a/pe/docs/ReportControllerApi.md +++ b/pe/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/pe/docs/ReportRangeChartSettings.md b/pe/docs/ReportRangeChartSettings.md index a1f7c1c6..e6841cea 100644 --- a/pe/docs/ReportRangeChartSettings.md +++ b/pe/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/pe/docs/ReportRequest.md b/pe/docs/ReportRequest.md index 2b12c0b4..5eac2291 100644 --- a/pe/docs/ReportRequest.md +++ b/pe/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/pe/docs/ReportTemplate.md b/pe/docs/ReportTemplate.md index 6db0a9e4..5cf82438 100644 --- a/pe/docs/ReportTemplate.md +++ b/pe/docs/ReportTemplate.md @@ -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/pe/docs/ReportTemplateConfig.md b/pe/docs/ReportTemplateConfig.md index 7ec02087..e1772714 100644 --- a/pe/docs/ReportTemplateConfig.md +++ b/pe/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/pe/docs/ReportTemplateControllerApi.md b/pe/docs/ReportTemplateControllerApi.md index 321073a9..e318d060 100644 --- a/pe/docs/ReportTemplateControllerApi.md +++ b/pe/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/pe/docs/ReportTimeSeriesChartSettings.md b/pe/docs/ReportTimeSeriesChartSettings.md index ab53e6aa..8ccb546a 100644 --- a/pe/docs/ReportTimeSeriesChartSettings.md +++ b/pe/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/pe/docs/SchedulerEventControllerApi.md b/pe/docs/SchedulerEventControllerApi.md index d4b9bd7f..4ef4599e 100644 --- a/pe/docs/SchedulerEventControllerApi.md +++ b/pe/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/pe/docs/SimpleValueSourceConfig.md b/pe/docs/SimpleValueSourceConfig.md new file mode 100644 index 00000000..dcdfa458 --- /dev/null +++ b/pe/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/pe/docs/SolutionControllerApi.md b/pe/docs/SolutionControllerApi.md deleted file mode 100644 index 82a0f054..00000000 --- a/pe/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/pe/docs/SolutionInstallResponse.md b/pe/docs/SolutionInstallResponse.md deleted file mode 100644 index 42614fcc..00000000 --- a/pe/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`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `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` | … (46 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/pe/docs/SolutionTemplateLevel.md b/pe/docs/SolutionTemplateLevel.md deleted file mode 100644 index 5a6b9818..00000000 --- a/pe/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/pe/docs/TenantSolutionTemplateDetails.md b/pe/docs/TenantSolutionTemplateDetails.md deleted file mode 100644 index ac3006a7..00000000 --- a/pe/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/pe/docs/TenantSolutionTemplateInfo.md b/pe/docs/TenantSolutionTemplateInfo.md deleted file mode 100644 index 00db301f..00000000 --- a/pe/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/pe/docs/TenantSolutionTemplateInstructions.md b/pe/docs/TenantSolutionTemplateInstructions.md deleted file mode 100644 index cfd38866..00000000 --- a/pe/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`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `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` | … (46 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/pe/docs/TimeSeriesChartYAxisSettings.md b/pe/docs/TimeSeriesChartYAxisSettings.md index c48e5b47..7170b4c2 100644 --- a/pe/docs/TimeSeriesChartYAxisSettings.md +++ b/pe/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/pe/docs/TimeseriesChartComponent.md b/pe/docs/TimeseriesChartComponent.md index a8114cba..ca06534e 100644 --- a/pe/docs/TimeseriesChartComponent.md +++ b/pe/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/pe/docs/UserControllerApi.md b/pe/docs/UserControllerApi.md index 1d5d208f..f48d3787 100644 --- a/pe/docs/UserControllerApi.md +++ b/pe/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/pe/spec/openapi.json b/pe/spec/openapi.json index 46c31212..089da166 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -293,10 +293,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" @@ -4417,6 +4413,11 @@ "schema": { "type": "string" } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, "required": true @@ -4541,6 +4542,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -13484,7 +13486,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" @@ -14004,7 +14006,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" @@ -28215,7 +28217,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" @@ -28711,7 +28713,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" @@ -30087,7 +30089,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" @@ -31616,7 +31618,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" @@ -34349,7 +34351,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" @@ -36192,7 +36194,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" @@ -41047,7 +41049,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" @@ -43265,7 +43267,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" @@ -56932,7 +56934,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" @@ -58320,7 +58322,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" @@ -65142,86 +65144,22 @@ ] } }, - "/api/integrationInfos": { + "/api/integration/{integrationId}/export-package": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integration Infos (getIntegrationInfos)", - "description": "Returns a page of integration 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\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationInfos", + "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": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template integrations", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - }, - { - "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": "integrationId", + "in": "path", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "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": { @@ -65230,7 +65168,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegrationInfo" + "type": "string", + "format": "byte" } } } @@ -65351,14 +65290,14 @@ ] } }, - "/api/integrations": { + "/api/integrationInfos": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integrations (getIntegrations)", - "description": "Returns a page of integrations 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\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrations", + "summary": "Get Integration Infos (getIntegrationInfos)", + "description": "Returns a page of integration 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\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationInfos", "parameters": [ { "name": "isEdgeTemplate", @@ -65439,7 +65378,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataIntegration" + "$ref": "#/components/schemas/PageDataIntegrationInfo" } } } @@ -65560,24 +65499,95 @@ ] } }, - "/api/integrations/converters/info": { + "/api/integrations": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", - "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getIntegrationsConvertersInfo", + "summary": "Get Integrations (getIntegrations)", + "description": "Returns a page of integrations 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\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrations", + "parameters": [ + { + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "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 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": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/IntegrationConvertersInfo" - } + "$ref": "#/components/schemas/PageDataIntegration" } } } @@ -65698,37 +65708,23 @@ ] } }, - "/api/integrations/list": { + "/api/integrations/converters/info": { "get": { "tags": [ "integration-controller" ], - "summary": "Get Integrations By Ids (getIntegrationsByIds)", - "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getIntegrationsByIds", - "parameters": [ - { - "name": "integrationIds", - "in": "query", - "description": "A list of integration ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], + "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", + "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getIntegrationsConvertersInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Integration" + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IntegrationConvertersInfo" } } } @@ -65850,22 +65846,25 @@ ] } }, - "/api/job/{id}": { + "/api/integrations/list": { "get": { "tags": [ - "job-controller" + "integration-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.", - "operationId": "getJobById", + "summary": "Get Integrations By Ids (getIntegrationsByIds)", + "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationsByIds", "parameters": [ { - "name": "id", - "in": "path", + "name": "integrationIds", + "in": "query", + "description": "A list of integration ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -65875,7 +65874,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } } } } @@ -65994,13 +65996,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/job/{id}": { + "get": { "tags": [ "job-controller" ], - "summary": "deleteJob", - "operationId": "deleteJob", + "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' or 'CUSTOMER_USER' authority.", + "operationId": "getJobById", "parameters": [ { "name": "id", @@ -66014,7 +66019,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Job" + } + } + } }, "400": { "description": "Bad Request", @@ -66130,16 +66142,152 @@ "ApiKeyForm": [] } ] - } - }, - "/api/job/{id}/cancel": { - "post": { + }, + "delete": { "tags": [ "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.", - "operationId": "cancelJob", + "summary": "deleteJob", + "operationId": "deleteJob", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/job/{id}/cancel": { + "post": { + "tags": [ + "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' or 'CUSTOMER_USER' authority.", + "operationId": "cancelJob", "parameters": [ { "name": "id", @@ -66277,7 +66425,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": [ { @@ -66416,7 +66564,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": [ { @@ -66521,6 +66669,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": { @@ -77172,779 +77329,61 @@ "ApiKeyForm": [] } ] - } - }, - "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { - "post": { - "tags": [ - "owner-controller" - ], - "summary": "Change owner to customer (changeOwnerToCustomer)", - "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "changeOwnerToCustomer", - "parameters": [ - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "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" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { - "type": "string" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { - "post": { - "tags": [ - "owner-controller" - ], - "summary": "Change owner to tenant (changeOwnerToTenant)", - "description": "Tenant changes Owner from Customer or sub-Customer to Tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "changeOwnerToTenant", - "parameters": [ - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "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" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { - "type": "string" - } - } - } - } - }, - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/mobile/qr/deepLink": { - "get": { - "tags": [ - "qr-code-settings-controller" - ], - "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", - "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", - "operationId": "getMobileAppDeepLink", - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/mobile/qr/merged": { - "get": { - "tags": [ - "qr-code-settings-controller" - ], - "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", - "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", - "operationId": "getMergedMobileAppSettings", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/mobile/qr/settings": { - "get": { - "tags": [ - "qr-code-settings-controller" - ], - "summary": "Get Mobile application settings (getQrCodeSettings)", - "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", - "operationId": "getQrCodeSettings", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, + } + }, + "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { "post": { "tags": [ - "qr-code-settings-controller" + "owner-controller" + ], + "summary": "Change owner to customer (changeOwnerToCustomer)", + "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "changeOwnerToCustomer", + "parameters": [ + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } ], - "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", - "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "saveQrCodeSettings", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QrCodeSettings" + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" + } } } - }, - "required": true + } }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QrCodeSettings" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -78062,33 +77501,59 @@ ] } }, - "/api/noauth/qr": { - "get": { + "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { + "post": { "tags": [ - "qr-code-settings-controller" + "owner-controller" ], - "summary": "getApplicationRedirect", - "operationId": "getApplicationRedirect", + "summary": "Change owner to tenant (changeOwnerToTenant)", + "description": "Tenant changes Owner from Customer or sub-Customer to Tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "changeOwnerToTenant", "parameters": [ { - "name": "User-Agent", - "in": "header", + "name": "ownerId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" } } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -78102,7 +77567,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -78195,35 +77660,32 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/qr/{secret}": { + "/api/mobile/qr/deepLink": { "get": { "tags": [ "qr-code-settings-controller" ], - "summary": "Get User Token (getUserTokenByMobileSecret)", - "description": "Returns the token of the User based on the provided secret key.", - "operationId": "getUserTokenByMobileSecret", - "parameters": [ - { - "name": "secret", - "in": "path", - "description": "A string value representing short-lived secret key", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", + "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", + "operationId": "getMobileAppDeepLink", "responses": { "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -78333,97 +77795,32 @@ } } } - } - } - }, - "/api/queues": { - "get": { - "tags": [ - "queue-controller" - ], - "summary": "Get Queues (getTenantQueuesByServiceType)", - "description": "Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantQueuesByServiceType", - "parameters": [ - { - "name": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" - ] - } - }, - { - "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 queue name.", - "required": false, - "schema": { - "type": "string" - } - }, + }, + "security": [ { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "topic" - ] - } + "HttpLoginForm": [] }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } + "ApiKeyForm": [] } + ] + } + }, + "/api/mobile/qr/merged": { + "get": { + "tags": [ + "qr-code-settings-controller" ], + "summary": "Get QR code configuration for home page (getMergedMobileAppSettings)", + "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", + "operationId": "getMergedMobileAppSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataQueue" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -78542,48 +77939,23 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/mobile/qr/settings": { + "get": { "tags": [ - "queue-controller" - ], - "summary": "Create Or Update Queue (saveQueue)", - "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "saveQueue", - "parameters": [ - { - "name": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" - ] - } - } + "qr-code-settings-controller" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Queue" - } - } - }, - "required": true - }, + "summary": "Get Mobile application settings (getQrCodeSettings)", + "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", + "operationId": "getQrCodeSettings", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -78600,7 +77972,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -78702,34 +78074,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/queues/name/{queueName}": { - "get": { + }, + "post": { "tags": [ - "queue-controller" + "qr-code-settings-controller" ], - "summary": "Get Queue (getQueueByName)", - "description": "Fetch the Queue object based on the provided Queue name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueByName", - "parameters": [ - { - "name": "queueName", - "in": "path", - "description": "A string value representing the queue id. For example, 'Main'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update the Mobile application settings (saveQrCodeSettings)", + "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveQrCodeSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -78746,7 +78115,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -78850,19 +78219,17 @@ ] } }, - "/api/queues/{queueId}": { + "/api/noauth/qr": { "get": { "tags": [ - "queue-controller" + "qr-code-settings-controller" ], - "summary": "Get Queue (getQueueById)", - "description": "Fetch the Queue object based on the provided Queue Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueById", + "summary": "getApplicationRedirect", + "operationId": "getApplicationRedirect", "parameters": [ { - "name": "queueId", - "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "User-Agent", + "in": "header", "required": true, "schema": { "type": "string" @@ -78875,7 +78242,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "type": "object" } } } @@ -78985,28 +78352,22 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { + } + } + }, + "/api/noauth/qr/{secret}": { + "get": { "tags": [ - "queue-controller" + "qr-code-settings-controller" ], - "summary": "Delete Queue (deleteQueue)", - "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "deleteQueue", + "summary": "Get User Token (getUserTokenByMobileSecret)", + "description": "Returns the token of the User based on the provided secret key.", + "operationId": "getUserTokenByMobileSecret", "parameters": [ { - "name": "queueId", + "name": "secret", "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing short-lived secret key", "required": true, "schema": { "type": "string" @@ -79015,7 +78376,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -79122,26 +78490,33 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/queueStats": { + "/api/queues": { "get": { "tags": [ - "queue-stats-controller" + "queue-controller" ], - "summary": "Get Queue Stats entities (getTenantQueueStats)", - "description": "Returns a page of queue stats objects that are designed to collect queue statistics for every service. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getTenantQueueStats", + "summary": "Get Queues (getTenantQueuesByServiceType)", + "description": "Returns a page of queues registered in the platform. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueuesByServiceType", "parameters": [ + { + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] + } + }, { "name": "pageSize", "in": "query", @@ -79165,7 +78540,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the queue name or service id.", + "description": "The case insensitive 'substring' filter based on the queue name.", "required": false, "schema": { "type": "string" @@ -79179,7 +78554,9 @@ "schema": { "type": "string", "enum": [ - "createdTime" + "createdTime", + "name", + "topic" ] } }, @@ -79203,7 +78580,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataQueueStats" + "$ref": "#/components/schemas/PageDataQueue" } } } @@ -79322,27 +78699,184 @@ "ApiKeyForm": [] } ] + }, + "post": { + "tags": [ + "queue-controller" + ], + "summary": "Create Or Update Queue (saveQueue)", + "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveQueue", + "parameters": [ + { + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid request body", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/queueStats/list": { + "/api/queues/name/{queueName}": { "get": { "tags": [ - "queue-stats-controller" + "queue-controller" ], - "summary": "Get QueueStats By Ids (getQueueStatsByIds)", - "description": "Fetch the Queue stats objects based on the provided ids. ", - "operationId": "getQueueStatsByIds", + "summary": "Get Queue (getQueueByName)", + "description": "Fetch the Queue object based on the provided Queue name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueByName", "parameters": [ { - "name": "queueStatsIds", - "in": "query", - "description": "A list of queue stats ids, separated by comma ','", + "name": "queueName", + "in": "path", + "description": "A string value representing the queue id. For example, 'Main'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -79352,10 +78886,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueueStats" - } + "$ref": "#/components/schemas/Queue" } } } @@ -79476,19 +79007,19 @@ ] } }, - "/api/queueStats/{queueStatsId}": { + "/api/queues/{queueId}": { "get": { "tags": [ - "queue-stats-controller" + "queue-controller" ], - "summary": "Get Queue stats entity by id (getQueueStatsById)", - "description": "Fetch the Queue stats object based on the provided Queue stats id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getQueueStatsById", + "summary": "Get Queue (getQueueById)", + "description": "Fetch the Queue object based on the provided Queue Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueById", "parameters": [ { - "name": "queueStatsId", + "name": "queueId", "in": "path", - "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -79501,7 +79032,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueueStats" + "$ref": "#/components/schemas/Queue" } } } @@ -79620,47 +79151,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/report": { - "post": { + }, + "delete": { "tags": [ - "report-controller" + "queue-controller" ], - "summary": "createReport", - "operationId": "createReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "info": { - "type": "string" - } - }, - "required": [ - "file", - "info" - ] - } + "summary": "Delete Queue (deleteQueue)", + "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteQueue", + "parameters": [ + { + "name": "queueId", + "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Report" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -79674,7 +79186,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -79778,30 +79290,77 @@ ] } }, - "/api/v2/report/request": { - "post": { + "/api/queueStats": { + "get": { "tags": [ - "report-controller" + "queue-stats-controller" ], - "summary": "requestReport", - "operationId": "requestReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportRequest" - } + "summary": "Get Queue Stats entities (getTenantQueueStats)", + "description": "Returns a page of queue stats objects that are designed to collect queue statistics for every service. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueueStats", + "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 queue name or service 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": "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/Job" + "$ref": "#/components/schemas/PageDataQueueStats" } } } @@ -79818,7 +79377,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -79922,32 +79481,38 @@ ] } }, - "/api/v2/report/test": { - "post": { + "/api/queueStats/list": { + "get": { "tags": [ - "report-controller" + "queue-stats-controller" ], - "summary": "Download test report (testReportAndDownload)", - "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testReportAndDownload", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportRequest" + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", + "description": "Fetch the Queue stats objects based on the provided ids. ", + "operationId": "getQueueStatsByIds", + "parameters": [ + { + "name": "queueStatsIds", + "in": "query", + "description": "A list of queue stats ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueStats" + } } } } @@ -79964,7 +79529,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -80068,19 +79633,19 @@ ] } }, - "/api/v2/report/{reportId}": { + "/api/queueStats/{queueStatsId}": { "get": { "tags": [ - "report-controller" + "queue-stats-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).", - "operationId": "getReportById", + "summary": "Get Queue stats entity by id (getQueueStatsById)", + "description": "Fetch the Queue stats object based on the provided Queue stats id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getQueueStatsById", "parameters": [ { - "name": "reportId", + "name": "queueStatsId", "in": "path", - "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -80093,7 +79658,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" + "$ref": "#/components/schemas/QueueStats" } } } @@ -80212,28 +79777,47 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/v2/report": { + "post": { "tags": [ "report-controller" ], - "summary": "Delete Report (deleteReport)", - "description": "Deletes the report. Referencing non-existing Report 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": "deleteReport", - "parameters": [ - { - "name": "reportId", - "in": "path", - "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "createReport", + "operationId": "createReport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "info": { + "type": "string" + } + }, + "required": [ + "file", + "info" + ] + } } } - ], + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Report" + } + } + } }, "400": { "description": "Bad Request", @@ -80247,7 +79831,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -80351,32 +79935,30 @@ ] } }, - "/api/v2/report/{reportId}/download": { - "get": { + "/api/v2/report/request": { + "post": { "tags": [ "report-controller" ], - "summary": "downloadReport", - "operationId": "downloadReport", - "parameters": [ - { - "name": "reportId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "requestReport", + "operationId": "requestReport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/Job" } } } @@ -80393,7 +79975,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -80497,37 +80079,32 @@ ] } }, - "/api/v2/reportInfos": { - "get": { + "/api/v2/report/test": { + "post": { "tags": [ "report-controller" ], - "summary": "getReportInfosByIds", - "operationId": "getReportInfosByIds", - "parameters": [ - { - "name": "strReportIds", - "in": "query", - "description": "A list of report ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Download test report (testReportAndDownload)", + "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "testReportAndDownload", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportRequest" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportInfo" - } + "type": "string", + "format": "binary" } } } @@ -80544,7 +80121,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -80648,86 +80225,20 @@ ] } }, - "/api/v2/reportInfos/all": { + "/api/v2/report/{reportId}": { "get": { "tags": [ "report-controller" ], - "summary": "getReportInfos", - "operationId": "getReportInfos", + "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' 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": [ { - "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": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "reportId", + "in": "path", + "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on report's 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" } @@ -80739,7 +80250,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReportInfo" + "$ref": "#/components/schemas/Report" } } } @@ -80858,59 +80369,20 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/reports": { - "get": { + }, + "delete": { "tags": [ "report-controller" ], - "summary": "getReports", - "operationId": "getReports", + "summary": "Delete Report (deleteReport)", + "description": "Deletes the report. Referencing non-existing Report 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": "deleteReport", "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": "reportId", + "in": "path", + "description": "A string value representing the report id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on report's 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" } @@ -80918,14 +80390,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataReport" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -81043,31 +80508,32 @@ ] } }, - "/api/reportTemplate": { - "post": { + "/api/v2/report/{reportId}/download": { + "get": { "tags": [ - "report-template-controller" + "report-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).", - "operationId": "saveReportTemplate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportTemplate" - } + "summary": "downloadReport", + "operationId": "downloadReport", + "parameters": [ + { + "name": "reportId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "type": "string", + "format": "binary" } } } @@ -81084,7 +80550,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -81188,22 +80654,24 @@ ] } }, - "/api/reportTemplate/info/{reportTemplateId}": { + "/api/v2/reportInfos": { "get": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get Report Template Info (getReportTemplateInfoById)", - "description": "Fetch the ReportTemplateInfo object based on the provided report template Id. 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. Referencing non-existing Report Template 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": "getReportTemplateInfoById", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "strReportIds", + "in": "query", + "description": "A list of report ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -81213,7 +80681,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplateInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportInfo" + } } } } @@ -81334,20 +80805,86 @@ ] } }, - "/api/reportTemplate/{reportTemplateId}": { + "/api/v2/reportInfos/all": { "get": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Get Report Template (getReportTemplateById)", - "description": "Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\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": "getReportTemplateById", + "summary": "getReportInfos", + "operationId": "getReportInfos", "parameters": [ { "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on report's 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" } @@ -81359,7 +80896,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "$ref": "#/components/schemas/PageDataReportInfo" } } } @@ -81478,28 +81015,83 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/v2/reports": { + "get": { "tags": [ - "report-template-controller" + "report-controller" ], - "summary": "Delete Report Template (deleteReportTemplate)", - "description": "Deletes the report template. Referencing non-existing Report Template 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": "deleteReportTemplate", + "summary": "getReports", + "operationId": "getReports", "parameters": [ { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on report's 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" } + }, + { + "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": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataReport" + } + } + } }, "400": { "description": "Bad Request", @@ -81617,120 +81209,31 @@ ] } }, - "/api/reportTemplateInfos/all": { - "get": { + "/api/reportTemplate": { + "post": { "tags": [ "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).", - "operationId": "getAllReportTemplateInfos", - "parameters": [ - { - "name": "typeList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "REPORT", - "SUB_REPORT" - ] - } - } - }, - { - "name": "formatList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "PDF", - "CSV" - ] + "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' 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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportTemplate" } } }, - { - "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": "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 report template 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", - "enum": [ - "createdTime", - "name", - "ownerName" - ] - } - }, - { - "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/PageDataReportTemplateInfo" + "$ref": "#/components/schemas/ReportTemplate" } } } @@ -81747,7 +81250,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -81851,25 +81354,22 @@ ] } }, - "/api/reportTemplates": { + "/api/reportTemplate/info/{reportTemplateId}": { "get": { "tags": [ "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).", - "operationId": "getReportTemplatesByIds", + "summary": "Get Report Template Info (getReportTemplateInfoById)", + "description": "Fetch the ReportTemplateInfo object based on the provided report template Id. 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. Referencing non-existing Report Template 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": "getReportTemplateInfoById", "parameters": [ { - "name": "reportTemplateIds", - "in": "query", - "description": "A list of report template ids, separated by comma ','", + "name": "reportTemplateId", + "in": "path", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -81879,10 +81379,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportTemplateInfo" - } + "$ref": "#/components/schemas/ReportTemplateInfo" } } } @@ -82003,31 +81500,32 @@ ] } }, - "/api/role": { - "post": { + "/api/reportTemplate/{reportTemplateId}": { + "get": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Create Or Update Role (saveRole)", - "description": "Creates or Updates the Role. When creating Role, platform generates Role Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Role id will be present in the response. Specify existing Role id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nRole Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).\n\nExample of Generic Role with read-only permissions for any resource and all permissions for the 'DEVICE' and 'PROFILE' resources is listed below: \n\n```json\n{\n \"name\": \"Read-Only User\",\n \"type\": \"GENERIC\",\n \"permissions\": {\n \"ALL\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"DEVICE\": [\n \"ALL\"\n ]\n \"PROFILE\": [\n \"ALL\"\n ]\n },\n \"additionalInfo\": {\n \"description\": \"Read-only permissions for everything, Write permissions for devices and own profile.\"\n }\n}\n```\n\nExample of Group Role with read-only permissions. Note that the group role has no association with the resources. The type of the resource is taken from the entity group that this role is assigned to: \n\n```json\n{\n \"name\": \"Entity Group Read-only User\",\n \"type\": \"GROUP\",\n \"permissions\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"additionalInfo\": {\n \"description\": \"Read-only permissions.\"\n }\n}\n```\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveRole", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Role" - } + "summary": "Get Report Template (getReportTemplateById)", + "description": "Fetch the ReportTemplate object based on the provided report template Id. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Report Template Id will cause 'Not Found' error.\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": "getReportTemplateById", + "parameters": [ + { + "name": "reportTemplateId", + "in": "path", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/ReportTemplate" } } } @@ -82044,7 +81542,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -82146,21 +81644,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/role/{roleId}": { - "get": { + }, + "delete": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Get Role by Id (getRoleById)", - "description": "Fetch the Role object based on the provided Role Id. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller). Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRoleById", + "summary": "Delete Report Template (deleteReportTemplate)", + "description": "Deletes the report template. Referencing non-existing Report Template 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": "deleteReportTemplate", "parameters": [ { - "name": "roleId", + "name": "reportTemplateId", "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -82169,14 +81665,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Role" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -82292,28 +81781,125 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/reportTemplateInfos/all": { + "get": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Delete role (deleteRole)", - "description": "Deletes the role. Referencing non-existing role Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteRole", + "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' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllReportTemplateInfos", "parameters": [ { - "name": "roleId", - "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "typeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the ReportTemplateType enumeration value.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "REPORT", + "SUB_REPORT" + ] + } + } + }, + { + "name": "formatList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the TbReportFormat enumeration value.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "PDF", + "CSV" + ] + } + } + }, + { + "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": "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 report template 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", + "enum": [ + "createdTime", + "name", + "ownerName" + ] + } + }, + { + "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/PageDataReportTemplateInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -82431,83 +82017,25 @@ ] } }, - "/api/roles": { + "/api/reportTemplates": { "get": { "tags": [ - "role-controller" + "report-template-controller" ], - "summary": "Get Roles (getRoles)", - "description": "Returns a page of roles that are available for the current user. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).You can specify parameters to filter the 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": "getRoles", + "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' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getReportTemplatesByIds", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "reportTemplateIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of report template ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Type of the role", - "required": false, - "schema": { - "type": "string", - "enum": [ - "GENERIC", - "GROUP" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the role 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", - "description" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -82517,7 +82045,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRole" + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportTemplateInfo" + } } } } @@ -82638,38 +82169,31 @@ ] } }, - "/api/roles/list": { - "get": { + "/api/role": { + "post": { "tags": [ "role-controller" ], - "summary": "Get Roles By Ids (getRolesByIds)", - "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getRolesByIds", - "parameters": [ - { - "name": "roleIds", - "in": "query", - "description": "A list of role ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Create Or Update Role (saveRole)", + "description": "Creates or Updates the Role. When creating Role, platform generates Role Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Role id will be present in the response. Specify existing Role id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nRole Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).\n\nExample of Generic Role with read-only permissions for any resource and all permissions for the 'DEVICE' and 'PROFILE' resources is listed below: \n\n```json\n{\n \"name\": \"Read-Only User\",\n \"type\": \"GENERIC\",\n \"permissions\": {\n \"ALL\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"DEVICE\": [\n \"ALL\"\n ]\n \"PROFILE\": [\n \"ALL\"\n ]\n },\n \"additionalInfo\": {\n \"description\": \"Read-only permissions for everything, Write permissions for devices and own profile.\"\n }\n}\n```\n\nExample of Group Role with read-only permissions. Note that the group role has no association with the resources. The type of the resource is taken from the entity group that this role is assigned to: \n\n```json\n{\n \"name\": \"Entity Group Read-only User\",\n \"type\": \"GROUP\",\n \"permissions\": [\n \"READ\",\n \"RPC_CALL\",\n \"READ_CREDENTIALS\",\n \"READ_ATTRIBUTES\",\n \"READ_TELEMETRY\"\n ],\n \"additionalInfo\": {\n \"description\": \"Read-only permissions.\"\n }\n}\n```\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveRole", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - } + "$ref": "#/components/schemas/Role" } } } @@ -82686,7 +82210,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -82790,43 +82314,32 @@ ] } }, - "/api/plugins/rpc/oneway/{deviceId}": { - "post": { + "/api/role/{roleId}": { + "get": { "tags": [ - "rpc-v-1-controller" + "role-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", - "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequestV1", + "summary": "Get Role by Id (getRoleById)", + "description": "Fetch the Role object based on the provided Role Id. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller). Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRoleById", "parameters": [ { - "name": "deviceId", + "name": "roleId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the role 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": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Role" } } } @@ -82843,7 +82356,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -82945,48 +82458,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/plugins/rpc/twoway/{deviceId}": { - "post": { + }, + "delete": { "tags": [ - "rpc-v-1-controller" + "role-controller" ], - "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", - "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleTwoWayDeviceRPCRequestV1", + "summary": "Delete role (deleteRole)", + "description": "Deletes the role. Referencing non-existing role Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteRole", "parameters": [ { - "name": "deviceId", + "name": "roleId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the role 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": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -83000,7 +82493,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -83104,83 +82597,135 @@ ] } }, - "/api/rpc/oneway/{deviceId}": { - "post": { + "/api/roles": { + "get": { "tags": [ - "rpc-v-2-controller" + "role-controller" ], - "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", - "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "handleOneWayDeviceRPCRequestV2", + "summary": "Get Roles (getRoles)", + "description": "Returns a page of roles that are available for the current user. Role Contains a set of permissions. Role has two types. Generic Role may be assigned to the user group and will provide permissions for all entities of a certain type. Group Role may be assigned to both user and entity group and will provides permissions only for the entities that belong to specified entity group. The assignment of the Role to the User Group is done using [Group Permission Controller](/swagger-ui.html#/group-permission-controller).You can specify parameters to filter the 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": "getRoles", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Type of the role", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GENERIC", + "GROUP" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the role name.", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "description": "A JSON object representing the RPC request.", - "content": { - "text/plain": { - "schema": { - "type": "string" - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "description" + ] } }, - "required": true - }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataRole" } } } }, "400": { - "description": "Invalid structure of the request.", + "description": "Bad Request", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } } } } }, "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.", + "description": "Unauthorized", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } } } } @@ -83259,97 +82804,25 @@ ] } }, - "/api/rpc/persistent/device/{deviceId}": { + "/api/roles/list": { "get": { "tags": [ - "rpc-v-2-controller" + "role-controller" ], - "summary": "Get persistent RPC requests", - "description": "Allows to query RPC calls for specific device using pagination.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpcByDevice", + "summary": "Get Roles By Ids (getRolesByIds)", + "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRolesByIds", "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" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "roleIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of role ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "rpcStatus", - "in": "query", - "description": "Status of the RPC", - "required": false, - "schema": { - "type": "string", - "enum": [ - "QUEUED", - "SENT", - "DELIVERED", - "SUCCESSFUL", - "TIMEOUT", - "EXPIRED", - "FAILED" - ] - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Not implemented. Leave empty.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "expirationTime", - "request", - "response" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -83359,7 +82832,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } } } } @@ -83480,32 +82956,43 @@ ] } }, - "/api/rpc/persistent/{rpcId}": { - "get": { + "/api/plugins/rpc/oneway/{deviceId}": { + "post": { "tags": [ - "rpc-v-2-controller" + "rpc-v-1-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", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV1)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequestV1", "parameters": [ { - "name": "rpcId", + "name": "deviceId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Rpc" + "type": "string" } } } @@ -83522,7 +83009,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -83624,28 +83111,48 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/plugins/rpc/twoway/{deviceId}": { + "post": { "tags": [ - "rpc-v-2-controller" + "rpc-v-1-controller" ], - "summary": "Delete persistent RPC", - "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRpc", + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequestV1)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequestV1", "parameters": [ { - "name": "rpcId", + "name": "deviceId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -83659,7 +83166,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -83763,14 +83270,14 @@ ] } }, - "/api/rpc/twoway/{deviceId}": { + "/api/rpc/oneway/{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", + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequestV2)", + "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequestV2", "parameters": [ { "name": "deviceId", @@ -83795,7 +83302,7 @@ }, "responses": { "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", + "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", "content": { "application/json": { "schema": { @@ -83918,30 +83425,98 @@ ] } }, - "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { - "post": { + "/api/rpc/persistent/device/{deviceId}": { + "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 requests", + "description": "Allows to query RPC calls for specific device using pagination.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpcByDevice", "parameters": [ { - "name": "edgeId", + "name": "deviceId", "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "ruleChainId", - "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": "rpcStatus", + "in": "query", + "description": "Status of the RPC", + "required": false, + "schema": { + "type": "string", + "enum": [ + "QUEUED", + "SENT", + "DELIVERED", + "SUCCESSFUL", + "TIMEOUT", + "EXPIRED", + "FAILED" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Not implemented. Leave empty.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "expirationTime", + "request", + "response" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -83950,7 +83525,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "string" } } } @@ -83967,7 +83542,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -84069,26 +83644,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rpc/persistent/{rpcId}": { + "get": { "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": "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" @@ -84101,7 +83671,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/Rpc" } } } @@ -84220,93 +83790,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edge/{edgeId}/ruleChains": { - "get": { + }, + "delete": { "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": "Delete persistent RPC", + "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRpc", "parameters": [ { - "name": "edgeId", + "name": "rpcId", "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 rpc 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" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -84424,19 +83929,31 @@ ] } }, - "/api/ruleChain": { + "/api/rpc/twoway/{deviceId}": { "post": { "tags": [ - "rule-chain-controller" + "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" + } + } ], - "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": { + "description": "A JSON object representing the RPC request.", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "string" } } }, @@ -84444,53 +83961,51 @@ }, "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/RuleChain" + "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": { - "status": 400, - "message": "Invalid request body", - "errorCode": 31, - "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": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "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" } } } @@ -84569,24 +84084,39 @@ ] } }, - "/api/ruleChain/autoAssignToEdgeRuleChains": { - "get": { + "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { + "post": { "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": "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" + } + }, + { + "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" } } } @@ -84603,7 +84133,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -84705,26 +84235,32 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/device/default": { - "post": { + }, + "delete": { "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": "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" } }, - "required": true - }, + { + "name": "ruleChainId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", @@ -84748,7 +84284,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -84852,43 +84388,88 @@ ] } }, - "/api/ruleChain/metadata": { - "post": { + "/api/edge/{edgeId}/ruleChains": { + "get": { "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", + "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": "updateRelated", + "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": "Update related rule nodes.", + "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": "boolean", - "default": true + "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "root" + ] } }, - "required": true - }, + { + "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/RuleChainMetaData" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -84905,7 +84486,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -85009,21 +84590,31 @@ ] } }, - "/api/ruleChain/tbelEnabled": { - "get": { + "/api/ruleChain": { + "post": { "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": "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" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/RuleChain" } } } @@ -85040,7 +84631,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -85144,43 +84735,24 @@ ] } }, - "/api/ruleChain/testScript": { - "post": { + "/api/ruleChain/autoAssignToEdgeRuleChains": { + "get": { "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" - } - } - ], - "requestBody": { - "description": "Test JS request. See API call description above.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "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": { - "$ref": "#/components/schemas/JsonNode" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } } } } @@ -85197,7 +84769,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -85301,25 +84873,24 @@ ] } }, - "/api/ruleChain/{ruleChainId}": { - "get": { + "/api/ruleChain/device/default": { + "post": { "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" + "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" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -85343,7 +84914,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -85445,171 +85016,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": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } + "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": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "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" } } } @@ -85728,32 +85173,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" } } } @@ -85874,32 +85310,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" } } } @@ -86020,14 +85467,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", @@ -86045,7 +85492,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/RuleChain" } } } @@ -86164,16 +85611,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", @@ -86187,18 +85632,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -86316,14 +85750,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", @@ -86341,10 +85775,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" - } + "$ref": "#/components/schemas/RuleChain" } } } @@ -86361,7 +85792,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -86463,16 +85894,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", @@ -86507,7 +85936,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -86611,83 +86040,23 @@ ] } }, - "/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", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "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" - } - }, - { - "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": { @@ -86696,7 +86065,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "$ref": "#/components/schemas/RuleChain" } } } @@ -86713,7 +86082,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -86817,23 +86186,22 @@ ] } }, - "/api/ruleChains/export": { + "/api/ruleChain/{ruleChainId}/metadata": { "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 (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": "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" } } ], @@ -86843,7 +86211,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -86964,36 +86332,25 @@ ] } }, - "/api/ruleChains/import": { - "post": { + "/api/ruleChain/{ruleChainId}/output/labels": { + "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 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": "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", @@ -87002,8 +86359,9 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/RuleChainImportResult" - } + "type": "string" + }, + "uniqueItems": true } } } @@ -87020,7 +86378,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -87124,25 +86482,22 @@ ] } }, - "/api/ruleChains/list": { + "/api/ruleChain/{ruleChainId}/output/labels/usage": { "get": { "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": "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": "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" } } ], @@ -87154,7 +86509,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" } } } @@ -87276,19 +86631,19 @@ ] } }, - "/api/ruleNode/{ruleNodeId}/debugIn": { - "get": { + "/api/ruleChain/{ruleChainId}/root": { + "post": { "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": "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": "ruleNodeId", + "name": "ruleChainId", "in": "path", - "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -87301,7 +86656,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/RuleChain" } } } @@ -87318,7 +86673,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -87422,32 +86777,92 @@ ] } }, - "/api/rule-engine/": { - "post": { + "/api/ruleChains": { + "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": "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": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "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": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -87464,7 +86879,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -87568,52 +86983,33 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}": { - "post": { + "/api/ruleChains/export": { + "get": { "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": "Export Rule Chains", + "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "exportRuleChains", "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'", + "name": "limit", + "in": "query", + "description": "A limit of rule chains to export.", "required": true, "schema": { - "type": "string" + "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/RuleChainData" } } } @@ -87630,7 +87026,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -87734,59 +87130,31 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "/api/ruleChains/import": { "post": { "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": "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, - "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, + "name": "overwrite", + "in": "query", + "description": "Enables overwrite for existing rule chains with the same name.", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "boolean", + "default": false } } ], "requestBody": { - "description": "A JSON object representing the message.", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChainData" } } }, @@ -87798,7 +87166,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainImportResult" + } } } } @@ -87919,62 +87290,38 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{timeout}": { - "post": { + "/api/ruleChains/list": { + "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 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": "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" + } } } } @@ -87991,7 +87338,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -88095,19 +87442,19 @@ ] } }, - "/api/edge/{edgeId}/allSchedulerEvents": { + "/api/ruleNode/{ruleNodeId}/debugIn": { "get": { "tags": [ - "scheduler-event-controller" + "rule-chain-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", + "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": "edgeId", + "name": "ruleNodeId", "in": "path", - "description": "A string value representing the edge 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" @@ -88120,10 +87467,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -88244,41 +87588,32 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { + "/api/rule-engine/": { "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", - "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" + } } }, - { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "type": "string" } } } @@ -88397,41 +87732,54 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/rule-engine/{entityType}/{entityId}": { + "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 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" } } } @@ -88448,7 +87796,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -88552,83 +87900,71 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvents": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{queueName}/{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 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": "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, + "name": "queueName", + "in": "path", + "description": "Queue name to process the request in the rule engine", + "required": true, "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" } } } @@ -88645,7 +87981,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -88749,103 +88085,62 @@ ] } }, - "/api/scheduledReports": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{timeout}": { + "post": { "tags": [ - "scheduler-event-controller" + "rule-engine-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": "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": "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": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "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, + "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": "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/PageDataScheduledReportInfo" + "type": "string" } } } @@ -88862,7 +88157,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -88966,31 +88261,35 @@ ] } }, - "/api/schedulerEvent": { - "post": { + "/api/edge/{edgeId}/allSchedulerEvents": { + "get": { "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": "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" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -89007,7 +88306,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -89111,15 +88410,24 @@ ] } }, - "/api/schedulerEvent/info/{schedulerEventId}": { - "get": { + "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { + "post": { "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": "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" + } + }, { "name": "schedulerEventId", "in": "path", @@ -89136,7 +88444,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -89153,7 +88461,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -89255,17 +88563,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvent/{schedulerEventId}": { - "get": { + }, + "delete": { "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": "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", @@ -89282,7 +88597,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -89401,170 +88716,75 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/schedulerEvents": { + "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 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" } - } - ], - "responses": { - "200": { - "description": "OK" }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", + "required": false, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { - "put": { - "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, + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string" } }, { - "name": "enabledValue", - "in": "path", - "description": "Enabled or disabled scheduler", - "required": true, + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "boolean" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -89574,7 +88794,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" } } } @@ -89695,79 +88915,93 @@ ] } }, - "/api/schedulerEvents": { + "/api/scheduledReports": { "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 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": "pageSize", + "name": "reportTemplateId", "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, + "description": "Report template id", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "format": "uuid" } }, { - "name": "page", + "name": "userId", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "The user used for report generation.", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "format": "uuid" } }, { - "name": "textSearch", + "name": "includeCustomers", "in": "query", - "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "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": "string" + "type": "boolean" } }, { - "name": "sortProperty", + "name": "pageSize", "in": "query", - "description": "Property of entity to sort by", - "required": false, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "sortOrder", + "name": "page", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "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": "type", + "name": "sortProperty", "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string" } }, { - "name": "edgeId", + "name": "sortOrder", "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -89777,7 +89011,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/PageDataScheduledReportInfo" } } } @@ -89898,35 +89132,31 @@ ] } }, - "/api/schedulerEvents/all": { - "get": { + "/api/schedulerEvent": { + "post": { "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", - "parameters": [ - { - "name": "type", - "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, - "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" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -89943,7 +89173,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -90047,25 +89277,22 @@ ] } }, - "/api/schedulerEvents/list": { + "/api/schedulerEvent/info/{schedulerEventId}": { "get": { "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": "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": "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" } } ], @@ -90075,10 +89302,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" } } } @@ -90199,59 +89423,20 @@ ] } }, - "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { + "/api/schedulerEvent/{schedulerEventId}": { "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 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": "startTime", - "in": "path", - "description": "Start time filter in milliseconds for scheduler event run time", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", + "name": "schedulerEventId", "in": "path", - "description": "End time filter in milliseconds for scheduler event run time", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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" } @@ -90263,10 +89448,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -90385,20 +89567,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/secret": { - "get": { + }, + "delete": { "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": "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": "name", - "in": "query", + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -90407,14 +89588,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SecretInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -90530,31 +89704,43 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { "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" - } + "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" } }, - "required": true - }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -90571,7 +89757,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -90675,24 +89861,89 @@ ] } }, - "/api/secret/names": { + "/api/schedulerEvents": { "get": { "tags": [ - "secret-controller" + "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", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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" + } + } ], - "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": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" } } } @@ -90813,22 +90064,22 @@ ] } }, - "/api/secret/{id}": { - "delete": { + "/api/schedulerEvents/all": { + "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 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": "id", - "in": "path", - "required": true, + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], @@ -90838,7 +90089,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbSecretDeleteResult" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -90959,43 +90213,38 @@ ] } }, - "/api/secret/{id}/description": { - "put": { + "/api/schedulerEvents/list": { + "get": { "tags": [ - "secret-controller" + "scheduler-event-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 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": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", + "name": "schedulerEventIds", + "in": "query", + "description": "A list of scheduler event ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the Secret" + "type": "array", + "items": { + "type": "string" } } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -91116,23 +90365,62 @@ ] } }, - "/api/secret/{id}/info": { + "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { "get": { "tags": [ - "secret-controller" + "scheduler-event-controller" ], - "summary": "Get Secret info by Id (getSecretInfoById)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoById", + "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": { @@ -91141,7 +90429,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -91262,37 +90553,24 @@ ] } }, - "/api/secret/{id}/value": { - "put": { + "/api/secret": { + "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", + "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 value for the Secret" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -91418,79 +90696,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/secrets": { - "get": { + }, + "post": { "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", - "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" - ] + "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" + } } }, - { - "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/PageDataSecretInfo" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -91507,7 +90737,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -91611,39 +90841,24 @@ ] } }, - "/api/noauth/selfRegistration/privacyPolicy": { + "/api/secret/names": { "get": { "tags": [ - "self-registration-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", - "parameters": [ - { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "platform", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/PlatformType" - } - } + "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", "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } } @@ -91753,37 +90968,33 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { - "get": { + "/api/secret/{id}": { + "delete": { "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": "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": "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" } } ], @@ -91793,7 +91004,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + "$ref": "#/components/schemas/TbSecretDeleteResult" } } } @@ -91903,42 +91114,54 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/selfRegistration/termsOfUse": { - "get": { + "/api/secret/{id}/description": { + "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 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" } } } @@ -92048,24 +91271,43 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/selfRegistration/selfRegistrationParams": { + "/api/secret/{id}/info": { "get": { "tags": [ - "self-registration-controller" + "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": "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/SecretInfo" } } } @@ -92184,19 +91426,34 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/secret/{id}/value": { + "put": { "tags": [ - "self-registration-controller" + "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" + } + } ], - "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" + "type": "string", + "description": "New value for the Secret" } } }, @@ -92208,7 +91465,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -92225,7 +91482,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -92327,16 +91584,82 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/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": "deleteWebSelfRegistrationParams", - "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataSecretInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -92454,28 +91777,18 @@ ] } }, - "/api/noauth/activateByEmailCode": { - "post": { + "/api/noauth/selfRegistration/privacyPolicy": { + "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 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": "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" @@ -92484,14 +91797,9 @@ { "name": "platform", "in": "query", - "description": "Platform type", "required": false, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "$ref": "#/components/schemas/PlatformType" } } ], @@ -92501,7 +91809,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -92518,7 +91826,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -92614,35 +91922,25 @@ } } }, - "/api/noauth/activateEmail": { + "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { "get": { "tags": [ - "sign-up-controller" + "self-registration-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", + "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": [ - { - "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", + "name": "platformType", "in": "query", "description": "Platform type", "required": false, @@ -92661,7 +91959,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" } } } @@ -92774,20 +92072,19 @@ } } }, - "/api/noauth/login": { + "/api/noauth/selfRegistration/termsOfUse": { "get": { "tags": [ - "sign-up-controller" + "self-registration-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": "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": "pkgName", "in": "query", - "description": "Mobile app package name. Used to identify the application and build the redirect link.", - "required": true, + "required": false, "schema": { "type": "string" } @@ -92795,14 +92092,9 @@ { "name": "platform", "in": "query", - "description": "Platform type", - "required": true, + "required": false, "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "$ref": "#/components/schemas/PlatformType" } } ], @@ -92925,51 +92217,167 @@ } } }, - "/api/noauth/resendEmailActivation": { - "post": { + "/api/selfRegistration/selfRegistrationParams": { + "get": { "tags": [ - "sign-up-controller" + "self-registration-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", - "parameters": [ - { - "name": "email", - "in": "query", - "description": "Email of the user.", - "required": true, - "schema": { - "type": "string" - }, - "example": "john.doe@company.com" + "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" + } + } + } }, - { - "name": "pkgName", - "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, - "schema": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] } + ] + }, + "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" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSelfRegistrationParams" + } + } + } }, "400": { "description": "Bad Request", @@ -93076,37 +92484,25 @@ } } } - } - } - }, - "/api/noauth/signup": { - "post": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { "tags": [ - "sign-up-controller" + "self-registration-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" - } - } - }, - "required": true - }, + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignUpResult" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -93120,7 +92516,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -93213,24 +92609,65 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/signup/acceptPrivacyPolicy": { + "/api/noauth/activateByEmailCode": { "post": { "tags": [ "sign-up-controller" ], - "summary": "Accept privacy policy (acceptPrivacyPolicy)", - "description": "Accept privacy policy by the current user.", - "operationId": "acceptPrivacyPolicy", + "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": "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" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JwtPair" } } } @@ -93340,32 +92777,57 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/acceptTermsOfUse": { - "post": { + "/api/noauth/activateEmail": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Accept Terms of Use (acceptTermsOfUse)", - "description": "Accept Terms of Use by the current user.", - "operationId": "acceptTermsOfUse", + "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" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string" } } } @@ -93382,7 +92844,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -93475,32 +92937,48 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/privacyPolicyAccepted": { + "/api/noauth/login": { "get": { "tags": [ "sign-up-controller" ], - "summary": "Check privacy policy (privacyPolicyAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "privacyPolicyAccepted", + "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": { - "type": "boolean" + "type": "string" } } } @@ -93610,35 +93088,54 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/signup/termsOfUseAccepted": { - "get": { + "/api/noauth/resendEmailActivation": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Check Terms Of User (termsOfUseAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "termsOfUseAccepted", + "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": { - "type": "boolean" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -93652,7 +93149,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -93745,43 +93242,34 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/solutions/templates/details/{solutionTemplateId}": { - "get": { + "/api/noauth/signup": { + "post": { "tags": [ - "solution-controller" + "sign-up-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" + "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/TenantSolutionTemplateDetails" + "$ref": "#/components/schemas/SignUpResult" } } } @@ -93798,7 +93286,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -93891,35 +93379,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/solutions/templates/infos": { - "get": { + "/api/signup/acceptPrivacyPolicy": { + "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": "Accept privacy policy (acceptPrivacyPolicy)", + "description": "Accept privacy policy by the current user.", + "operationId": "acceptPrivacyPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantSolutionTemplateInfo" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -93936,7 +93413,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -94040,32 +93517,21 @@ ] } }, - "/api/solutions/templates/instructions/{solutionTemplateId}": { - "get": { + "/api/signup/acceptTermsOfUse": { + "post": { "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": "Accept Terms of Use (acceptTermsOfUse)", + "description": "Accept Terms of Use by the current user.", + "operationId": "acceptTermsOfUse", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + "$ref": "#/components/schemas/JsonNode" } } } @@ -94082,7 +93548,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -94186,28 +93652,24 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/delete": { - "delete": { + "/api/signup/privacyPolicyAccepted": { + "get": { "tags": [ - "solution-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" - } - } + "sign-up-controller" ], + "summary": "Check privacy policy (privacyPolicyAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "privacyPolicyAccepted", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } }, "400": { "description": "Bad Request", @@ -94325,32 +93787,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" } } } @@ -94367,7 +93818,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -108261,7 +107712,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" @@ -112442,7 +111893,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" @@ -131445,6 +130896,9 @@ "tenantId": { "$ref": "#/components/schemas/TenantId" }, + "customerId": { + "$ref": "#/components/schemas/CustomerId" + }, "type": { "$ref": "#/components/schemas/JobType" }, @@ -131466,6 +130920,11 @@ }, "result": { "$ref": "#/components/schemas/JobResult" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true } }, "required": [ @@ -142271,6 +141730,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": [ { @@ -142940,35 +142426,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": [ @@ -142976,14 +142433,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.", @@ -144543,144 +143992,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.", @@ -145207,12 +144518,10 @@ "format": "int32" }, "min": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/SimpleValueSourceConfig" }, "max": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/SimpleValueSourceConfig" } } }, diff --git a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java index 188efebe..cd27a0e5 100644 --- a/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java +++ b/pe/src/main/java/org/thingsboard/client/api/ThingsboardApi.java @@ -265,7 +265,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.SystemInfo; @@ -279,9 +278,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.ThingsboardErrorResponse; import org.thingsboard.client.model.ToCoreEdqsRequest; @@ -1812,7 +1808,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. @@ -15434,7 +15507,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) @@ -15452,7 +15525,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) @@ -15552,7 +15625,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) @@ -15569,7 +15642,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) @@ -15776,7 +15849,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) @@ -15793,7 +15866,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) @@ -15890,7 +15963,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) @@ -15909,7 +15982,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) @@ -16096,7 +16169,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) @@ -16114,7 +16187,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) @@ -16475,7 +16548,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) @@ -16493,7 +16566,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) @@ -16590,12 +16663,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) @@ -16609,12 +16682,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) @@ -16878,7 +16951,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) @@ -16895,7 +16968,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) @@ -22119,7 +22192,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) @@ -22138,7 +22211,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) @@ -22442,7 +22515,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) @@ -22460,7 +22533,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) @@ -22563,7 +22636,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) @@ -22581,7 +22654,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) @@ -22684,7 +22757,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) @@ -22704,7 +22777,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) @@ -22934,7 +23007,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) @@ -22953,7 +23026,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) @@ -23180,7 +23253,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) @@ -23199,7 +23272,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) @@ -23650,7 +23723,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) @@ -23668,7 +23741,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) @@ -32179,7 +32252,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) @@ -32288,12 +32362,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(), @@ -32327,7 +32402,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"); @@ -32361,6 +32436,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())); @@ -37717,7 +37794,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 @@ -37729,7 +37806,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> @@ -37799,7 +37876,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) @@ -37818,7 +37895,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) @@ -38160,7 +38237,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 @@ -38172,7 +38249,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>> @@ -38256,11 +38333,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(); } @@ -38272,12 +38350,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(), @@ -38311,7 +38390,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"); @@ -38335,6 +38414,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())); @@ -39660,12 +39741,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 * @@ -50525,83 +50382,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. @@ -54054,7 +53834,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 */ @@ -54064,7 +53844,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> @@ -59092,7 +58872,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 @@ -59104,7 +58884,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> @@ -60892,7 +60672,9 @@ private HttpRequest.Builder sendAddonAccessErrorRequestBuilder(@Nonnull String a * @param acceptLanguage (optional) * @return List<Object> * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body, @Nullable String acceptLanguage) throws ApiException { ApiResponse> localVarResponse = sendChatMessageWithHttpInfo(chatId, xAuthorization, body, acceptLanguage, null); return localVarResponse.getData(); @@ -60908,7 +60690,9 @@ public List sendChatMessage(@Nonnull UUID chatId, @Nonnull String xAutho * @param headers Optional headers to include in the request * @return ApiResponse<List<Object>> * @throws ApiException if fails to make API call + * @deprecated */ + @Deprecated public ApiResponse> sendChatMessageWithHttpInfo(@Nonnull UUID chatId, @Nonnull String xAuthorization, @Nonnull String body, @Nullable String acceptLanguage, Map headers) throws ApiException { HttpRequest.Builder localVarRequestBuilder = sendChatMessageRequestBuilder(chatId, xAuthorization, body, acceptLanguage, headers); try { @@ -63063,7 +62847,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 @@ -63075,7 +62859,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> @@ -63844,79 +63628,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. diff --git a/pe/src/main/java/org/thingsboard/client/model/Job.java b/pe/src/main/java/org/thingsboard/client/model/Job.java index 09a0e429..1db4f0f1 100644 --- a/pe/src/main/java/org/thingsboard/client/model/Job.java +++ b/pe/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/pe/src/main/java/org/thingsboard/client/model/SimpleValueSourceConfig.java b/pe/src/main/java/org/thingsboard/client/model/SimpleValueSourceConfig.java new file mode 100644 index 00000000..bf5f2a8e --- /dev/null +++ b/pe/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/pe/src/main/java/org/thingsboard/client/model/SolutionInstallResponse.java b/pe/src/main/java/org/thingsboard/client/model/SolutionInstallResponse.java deleted file mode 100644 index 27a778c4..00000000 --- a/pe/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/pe/src/main/java/org/thingsboard/client/model/SolutionTemplateLevel.java b/pe/src/main/java/org/thingsboard/client/model/SolutionTemplateLevel.java deleted file mode 100644 index c1418d30..00000000 --- a/pe/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/pe/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateDetails.java b/pe/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateDetails.java deleted file mode 100644 index 3dfe8632..00000000 --- a/pe/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/pe/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInfo.java b/pe/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInfo.java deleted file mode 100644 index ca84b6f3..00000000 --- a/pe/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/pe/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInstructions.java b/pe/src/main/java/org/thingsboard/client/model/TenantSolutionTemplateInstructions.java deleted file mode 100644 index 236dfc75..00000000 --- a/pe/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/pe/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java b/pe/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java index d0d2ad23..3ac17c16 100644 --- a/pe/src/main/java/org/thingsboard/client/model/TimeSeriesChartYAxisSettings.java +++ b/pe/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();