diff --git a/ce/docs/AssetControllerApi.md b/ce/docs/AssetControllerApi.md index cd33ba1c..89308299 100644 --- a/ce/docs/AssetControllerApi.md +++ b/ce/docs/AssetControllerApi.md @@ -18,7 +18,7 @@ PageDataAsset client.get_edge_assets(edge_id: str, page_size: int, page: int, ty Asset client.get_tenant_asset_by_name(asset_name: str) # Get Tenant Asset (getTenantAssetByName) PageDataAssetInfo client.get_tenant_asset_infos(page_size: int, page: int, type: Optional[str] = None, asset_profile_id: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Tenant Asset Infos (getTenantAssetInfos) PageDataAsset client.get_tenant_assets(page_size: int, page: int, type: Optional[str] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Tenant Assets (getTenantAssets) -BulkImportResultAsset client.process_assets_bulk_import(bulk_import_request: BulkImportRequest) # Import the bulk of assets (processAssetsBulkImport) +BulkImportResultAsset client.process_asset_bulk_import(bulk_import_request: BulkImportRequest) # Import the bulk of assets (processAssetBulkImport) Asset client.save_asset(asset: Asset, name_conflict_policy: Optional[NameConflictPolicy] = None, uniquify_separator: Optional[str] = None, uniquify_strategy: Optional[UniquifyStrategy] = None) # Create Or Update Asset (saveAsset) Asset client.unassign_asset_from_customer(asset_id: str) # Unassign asset from customer (unassignAssetFromCustomer) Asset client.unassign_asset_from_edge(edge_id: str, asset_id: str) # Unassign asset from edge (unassignAssetFromEdge) @@ -412,15 +412,15 @@ Returns a page of assets owned by tenant. You can specify parameters to filter t **PageDataAsset** -## process_assets_bulk_import +## process_asset_bulk_import ```python -BulkImportResultAsset client.process_assets_bulk_import(bulk_import_request: BulkImportRequest) +BulkImportResultAsset client.process_asset_bulk_import(bulk_import_request: BulkImportRequest) ``` **POST** `/api/asset/bulk_import` -Import the bulk of assets (processAssetsBulkImport) +Import the bulk of assets (processAssetBulkImport) There's an ability to import the bulk of assets using the only .csv file. diff --git a/ce/docs/DomainControllerApi.md b/ce/docs/DomainControllerApi.md index 9d74fd7d..e5aeeb95 100644 --- a/ce/docs/DomainControllerApi.md +++ b/ce/docs/DomainControllerApi.md @@ -5,7 +5,7 @@ ```python None client.delete_domain(id: UUID) # Delete Domain by ID (deleteDomain) DomainInfo client.get_domain_info_by_id(id: UUID) # Get Domain info by Id (getDomainInfoById) -PageDataDomainInfo client.get_tenant_domain_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Domain infos (getTenantDomainInfos) +PageDataDomainInfo client.get_domain_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Domain infos (getDomainInfos) Domain client.save_domain(domain: Domain, oauth2_client_ids: Optional[List[str]] = None) # Save or Update Domain (saveDomain) None client.update_domain_oauth2_clients(id: UUID, request_body: List[UUID]) # Update oauth2 clients (updateDomainOauth2Clients) ``` @@ -59,15 +59,15 @@ Get Domain info by Id (getDomainInfoById) **DomainInfo** -## get_tenant_domain_infos +## get_domain_infos ```python -PageDataDomainInfo client.get_tenant_domain_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) +PageDataDomainInfo client.get_domain_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) ``` **GET** `/api/domain/infos` -Get Domain infos (getTenantDomainInfos) +Get Domain infos (getDomainInfos) Available for users with 'SYS_ADMIN' authority. diff --git a/ce/docs/OAuth2ControllerApi.md b/ce/docs/OAuth2ControllerApi.md index e2dbd1d6..d7c14c84 100644 --- a/ce/docs/OAuth2ControllerApi.md +++ b/ce/docs/OAuth2ControllerApi.md @@ -4,7 +4,7 @@ ```python None client.delete_oauth2_client(id: UUID) # Delete oauth2 client (deleteOauth2Client) -PageDataOAuth2ClientInfo client.find_tenant_o_auth2_client_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get OAuth2 Client infos (findTenantOAuth2ClientInfos) +PageDataOAuth2ClientInfo client.find_o_auth2_client_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get OAuth2 Client infos (findOAuth2ClientInfos) List[OAuth2ClientInfo] client.find_tenant_o_auth2_client_infos_by_ids(client_ids: List[str]) # Get OAuth2 Client infos By Ids (findTenantOAuth2ClientInfosByIds) str client.get_login_processing_url() # Get OAuth2 log in processing URL (getLoginProcessingUrl) OAuth2Client client.get_o_auth2_client_by_id(id: UUID) # Get OAuth2 Client by id (getOAuth2ClientById) @@ -37,15 +37,15 @@ Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause None (empty response body) -## find_tenant_o_auth2_client_infos +## find_o_auth2_client_infos ```python -PageDataOAuth2ClientInfo client.find_tenant_o_auth2_client_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) +PageDataOAuth2ClientInfo client.find_o_auth2_client_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) ``` **GET** `/api/oauth2/client/infos` -Get OAuth2 Client infos (findTenantOAuth2ClientInfos) +Get OAuth2 Client infos (findOAuth2ClientInfos) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. diff --git a/ce/spec/openapi.json b/ce/spec/openapi.json index a5adb2f5..58423655 100644 --- a/ce/spec/openapi.json +++ b/ce/spec/openapi.json @@ -12,7 +12,7 @@ "name": "Apache License Version 2.0", "url": "https://github.com/thingsboard/thingsboard/blob/master/LICENSE" }, - "version": "4.3.1.2-SNAPSHOT" + "version": "4.3.1.2" }, "servers": [ { @@ -9797,9 +9797,9 @@ "tags": [ "asset-controller" ], - "summary": "Import the bulk of assets (processAssetsBulkImport)", + "summary": "Import the bulk of assets (processAssetBulkImport)", "description": "There's an ability to import the bulk of assets using the only .csv file.", - "operationId": "processAssetsBulkImport", + "operationId": "processAssetBulkImport", "requestBody": { "content": { "application/json": { @@ -30295,9 +30295,9 @@ "tags": [ "domain-controller" ], - "summary": "Get Domain infos (getTenantDomainInfos)", + "summary": "Get Domain infos (getDomainInfos)", "description": "\n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDomainInfos", + "operationId": "getDomainInfos", "parameters": [ { "name": "pageSize", @@ -54535,9 +54535,9 @@ "tags": [ "o-auth-2-controller" ], - "summary": "Get OAuth2 Client infos (findTenantOAuth2ClientInfos)", + "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "findTenantOAuth2ClientInfos", + "operationId": "findOAuth2ClientInfos", "parameters": [ { "name": "pageSize", @@ -81908,21 +81908,31 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ADMIN_SETTINGS", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AffectedTenantAdministratorsFilter": { "allOf": [ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "AFFECTED_TENANT_ADMINISTRATORS" + } }, "AffectedUserFilter": { "allOf": [ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "AFFECTED_USER" + } }, "AggFunction": { "type": "string", @@ -81948,7 +81958,11 @@ } } } - ] + ], + "example": { + "type": "function", + "function": null + } }, "AggInput": { "discriminator": { @@ -81958,6 +81972,10 @@ "function": "#/components/schemas/AggFunctionInput" } }, + "example": { + "type": "key", + "key": null + }, "properties": { "type": { "type": "string" @@ -81981,6 +81999,11 @@ "CUSTOM": "#/components/schemas/CustomInterval" } }, + "example": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, "properties": { "type": { "type": "string" @@ -82003,7 +82026,11 @@ } } } - ] + ], + "example": { + "type": "key", + "key": null + } }, "AggMetric": { "type": "object", @@ -82088,6 +82115,22 @@ "OLLAMA": "#/components/schemas/OllamaChatModelConfig" } }, + "example": { + "provider": "OPENAI", + "providerConfig": { + "baseUrl": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "properties": { "provider": { "type": "string" @@ -82102,7 +82145,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "AI_MODEL" + } }, "AiModelId": { "type": "object", @@ -82113,7 +82174,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "AI_MODEL", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AiModelType": { "type": "string", @@ -82318,6 +82383,13 @@ } } ], + "example": { + "triggerType": "ALARM_ASSIGNMENT", + "alarmTypes": null, + "alarmSeverities": null, + "alarmStatuses": null, + "notifyOn": null + }, "required": [ "notifyOn" ] @@ -82341,6 +82413,10 @@ } } ], + "example": { + "triggerType": "ALARM_ASSIGNMENT", + "targets": null + }, "required": [ "targets" ] @@ -82388,6 +82464,41 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "ALARM", + "arguments": null, + "createRules": null, + "clearRule": { + "condition": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + }, + "alarmDetails": null, + "dashboardId": { + "entityType": "DASHBOARD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "propagate": null, + "propagateToOwner": null, + "propagateToTenant": null, + "propagateRelationTypes": null + }, "required": [ "arguments", "createRules" @@ -82541,7 +82652,15 @@ } } } - ] + ], + "example": { + "triggerType": "ALARM_COMMENT", + "alarmTypes": null, + "alarmSeverities": null, + "alarmStatuses": null, + "onlyUserComments": null, + "notifyOnCommentUpdate": null + } }, "AlarmCommentRecipientsConfig": { "allOf": [ @@ -82562,6 +82681,10 @@ } } ], + "example": { + "triggerType": "ALARM_COMMENT", + "targets": null + }, "required": [ "targets" ] @@ -82583,6 +82706,18 @@ "REPEATING": "#/components/schemas/RepeatingAlarmCondition" } }, + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + }, "properties": { "expression": { "$ref": "#/components/schemas/AlarmConditionExpression" @@ -82607,6 +82742,11 @@ "TBEL": "#/components/schemas/TbelAlarmConditionExpression" } }, + "example": { + "type": "SIMPLE", + "filters": null, + "operation": {} + }, "properties": { "type": { "type": "string" @@ -83028,7 +83168,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ALARM", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AlarmInfo": { "type": "object", @@ -83216,6 +83360,15 @@ } } ], + "example": { + "triggerType": "ALARM", + "alarmTypes": null, + "alarmSeverities": null, + "notifyOn": null, + "clearRule": { + "alarmStatuses": null + } + }, "required": [ "notifyOn" ] @@ -83254,6 +83407,14 @@ } } ], + "example": { + "type": "BOOLEAN", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "operation", "value" @@ -83285,7 +83446,12 @@ } } } - ] + ], + "example": { + "type": "COMPLEX", + "operation": {}, + "predicates": null + } }, "AlarmRuleComplexOperation": { "type": "string", @@ -83425,6 +83591,15 @@ "COMPLEX": "#/components/schemas/AlarmRuleComplexFilterPredicate" } }, + "example": { + "type": "STRING", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + }, + "ignoreCase": null + }, "properties": { "type": { "type": "string" @@ -83451,6 +83626,14 @@ } } ], + "example": { + "type": "NUMERIC", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "operation", "value" @@ -83487,6 +83670,15 @@ } } ], + "example": { + "type": "STRING", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + }, + "ignoreCase": null + }, "required": [ "operation", "value" @@ -83514,6 +83706,9 @@ "CUSTOM": "#/components/schemas/CustomTimeSchedule" } }, + "example": { + "type": "ANY_TIME" + }, "properties": { "type": { "type": "string" @@ -83588,14 +83783,21 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "ALL_USERS" + } }, "AllowCreateNewDevicesDeviceProfileProvisionConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "ALLOW_CREATE_NEW_DEVICES" + } }, "AmazonBedrockChatModelConfig": { "allOf": [ @@ -83640,6 +83842,21 @@ } } ], + "example": { + "provider": "AMAZON_BEDROCK", + "providerConfig": { + "region": null, + "accessKeyId": null, + "secretAccessKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -83711,6 +83928,20 @@ } } ], + "example": { + "provider": "ANTHROPIC", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -83732,7 +83963,10 @@ { "$ref": "#/components/schemas/AlarmSchedule" } - ] + ], + "example": { + "type": "ANY_TIME" + } }, "ApiFeature": { "type": "string", @@ -83811,7 +84045,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "API_KEY", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ApiKeyInfo": { "type": "object", @@ -83888,7 +84126,12 @@ } } } - ] + ], + "example": { + "triggerType": "API_USAGE_LIMIT", + "apiFeatures": null, + "notifyOn": null + } }, "ApiUsageLimitRecipientsConfig": { "allOf": [ @@ -83909,6 +84152,10 @@ } } ], + "example": { + "triggerType": "API_USAGE_LIMIT", + "targets": null + }, "required": [ "targets" ] @@ -83926,7 +84173,14 @@ } } } - ] + ], + "example": { + "type": "apiUsageState", + "customerId": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "ApiUsageStateId": { "type": "object", @@ -83937,7 +84191,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "API_USAGE_STATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ApiUsageStateValue": { "type": "string", @@ -84044,7 +84302,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ASSET" + } }, "AssetId": { "type": "object", @@ -84055,7 +84331,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ASSET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AssetInfo": { "type": "object", @@ -84195,7 +84475,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ASSET_PROFILE" + } }, "AssetProfileId": { "type": "object", @@ -84206,7 +84504,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ASSET_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AssetProfileInfo": { "type": "object", @@ -84291,7 +84593,26 @@ } } } - ] + ], + "example": { + "type": "assetSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "assetTypes": null + } }, "AssetTypeFilter": { "allOf": [ @@ -84317,7 +84638,13 @@ } } } - ] + ], + "example": { + "type": "assetType", + "assetTypes": null, + "assetNameFilter": null, + "assetType": null + } }, "AttributeData": { "type": "object", @@ -84444,7 +84771,15 @@ } } } - ] + ], + "example": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + } }, "AttributesOutput": { "allOf": [ @@ -84459,7 +84794,21 @@ } } } - ] + ], + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + }, + "type": "ATTRIBUTES" + } }, "AttributesOutputStrategy": { "discriminator": { @@ -84469,6 +84818,14 @@ "RULE_CHAIN": "#/components/schemas/AttributesRuleChainOutputStrategy" } }, + "example": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + }, "properties": { "type": { "type": "string" @@ -84483,7 +84840,10 @@ { "$ref": "#/components/schemas/AttributesOutputStrategy" } - ] + ], + "example": { + "type": "RULE_CHAIN" + } }, "AuditLog": { "type": "object", @@ -84721,7 +85081,13 @@ } } } - ] + ], + "example": { + "type": "AWS_SNS", + "accessKeyId": null, + "secretAccessKey": null, + "region": null + } }, "AzureOpenAiChatModelConfig": { "allOf": [ @@ -84774,6 +85140,23 @@ } } ], + "example": { + "provider": "AZURE_OPENAI", + "providerConfig": { + "endpoint": null, + "serviceVersion": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -84820,6 +85203,12 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "BACKUP_CODE", + "codes": null, + "codesLeft": null + }, "required": [ "codes" ] @@ -84839,7 +85228,11 @@ } } } - ] + ], + "example": { + "providerType": "BACKUP_CODE", + "codesQuantity": null + } }, "BadgePosition": { "type": "string", @@ -84865,6 +85258,11 @@ } } ], + "example": { + "type": "BASIC", + "username": null, + "password": null + }, "required": [ "password", "username" @@ -84887,7 +85285,21 @@ } } } - ] + ], + "example": { + "type": "BOOLEAN", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + } + } }, "BooleanOperation": { "type": "string", @@ -85121,6 +85533,19 @@ "ENTITY_AGGREGATION": "#/components/schemas/EntityAggregationCalculatedFieldConfiguration" } }, + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SIMPLE", + "arguments": null, + "expression": null, + "useLatestTs": null + }, "properties": { "output": { "$ref": "#/components/schemas/Output" @@ -85204,7 +85629,31 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_CALCULATED_FIELD", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "entityId": "57b6bafe-d600-423c-9267-fe31e5218986", + "entityType": "DEVICE", + "msgId": "dcf44612-2ce4-4e5d-b462-ebb9c5628228", + "msgType": "POST_TELEMETRY_REQUEST", + "arguments": { + "x": { + "ts": 1739432016629, + "value": 20 + }, + "y": { + "ts": 1739429717656, + "value": 12 + } + }, + "result": { + "x + y": 32 + } + } }, "CalculatedFieldId": { "type": "object", @@ -85215,7 +85664,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CALCULATED_FIELD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CalculatedFieldInfo": { "type": "object", @@ -85298,6 +85751,10 @@ "CURRENT_OWNER": "#/components/schemas/CurrentOwnerDynamicSourceConfiguration" } }, + "example": { + "type": "RELATION_PATH_QUERY", + "levels": null + }, "properties": { "type": { "type": "string" @@ -85328,7 +85785,11 @@ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "CHECK_PRE_PROVISIONED_DEVICES" + } }, "ChecksumAlgorithm": { "type": "string", @@ -85383,7 +85844,12 @@ } } } - ] + ], + "example": { + "spec": "CLIENT_ATTRIBUTES_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + } }, "CoapDeviceProfileTransportConfiguration": { "allOf": [ @@ -85401,7 +85867,22 @@ } } } - ] + ], + "example": { + "type": "COAP", + "coapDeviceTypeConfiguration": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + }, + "clientSettings": { + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } + } }, "CoapDeviceTransportConfiguration": { "allOf": [ @@ -85428,7 +85909,14 @@ } } } - ] + ], + "example": { + "type": "COAP", + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } }, "CoapDeviceTypeConfiguration": { "description": "CoAP device type configuration", @@ -85439,6 +85927,12 @@ "EFENTO": "#/components/schemas/EfentoCoapDeviceTypeConfiguration" } }, + "example": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + }, "properties": { "coapDeviceType": { "type": "string" @@ -85489,7 +85983,12 @@ } } } - ] + ], + "example": { + "type": "COMPLEX", + "operation": {}, + "predicates": null + } }, "ComplexOperation": { "type": "string", @@ -85517,7 +86016,14 @@ } } } - ] + ], + "example": { + "versionName": null, + "branch": null, + "type": "COMPLEX", + "syncStrategy": {}, + "entityTypes": null + } }, "ComponentClusteringMode": { "type": "string", @@ -85653,7 +86159,10 @@ { "$ref": "#/components/schemas/CfArgumentDynamicSourceConfiguration" } - ] + ], + "example": { + "type": "CURRENT_OWNER" + } }, "CustomInterval": { "allOf": [ @@ -85679,6 +86188,12 @@ } } ], + "example": { + "type": "CUSTOM", + "tz": null, + "offsetSec": null, + "durationSec": null + }, "required": [ "durationSec", "tz" @@ -85709,7 +86224,14 @@ } } } - ] + ], + "example": { + "type": "CUSTOM", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "path": "/alarmDetails/868c7083-032d-4f52-b8b4-7859aebb6a4e" + } }, "CustomTimeSchedule": { "allOf": [ @@ -85730,7 +86252,12 @@ } } } - ] + ], + "example": { + "type": "CUSTOM", + "timezone": null, + "items": null + } }, "CustomTimeScheduleItem": { "type": "object", @@ -85844,7 +86371,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "CUSTOMER" + } }, "CustomerId": { "type": "object", @@ -85855,7 +86400,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CustomerUsersFilter": { "allOf": [ @@ -85872,6 +86421,10 @@ } } ], + "example": { + "type": "CUSTOMER_USERS", + "customerId": null + }, "required": [ "customerId" ] @@ -85953,7 +86506,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DASHBOARD" + } }, "DashboardId": { "type": "object", @@ -85964,7 +86535,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DASHBOARD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DashboardInfo": { "type": "object", @@ -86053,7 +86628,14 @@ } } } - ] + ], + "example": { + "type": "DASHBOARD", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "dashboardId": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DataType": { "type": "string", @@ -86084,6 +86666,11 @@ } } ], + "example": { + "type": "DAY", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -86121,7 +86708,13 @@ } } } - ] + ], + "example": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + } }, "DefaultDeviceConfiguration": { "allOf": [ @@ -86129,7 +86722,10 @@ "$ref": "#/components/schemas/DeviceConfiguration" } ], - "description": "Default device configuration" + "description": "Default device configuration", + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceProfileConfiguration": { "allOf": [ @@ -86137,21 +86733,30 @@ "$ref": "#/components/schemas/DeviceProfileConfiguration" } ], - "description": "Default device profile configuration" + "description": "Default device profile configuration", + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceProfileTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceTransportConfiguration" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultMobilePage": { "allOf": [ @@ -86178,7 +86783,14 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "id": "HOME" + } }, "DefaultPageId": { "type": "string", @@ -86539,7 +87151,87 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "maxDevices": null, + "maxAssets": null, + "maxCustomers": null, + "maxUsers": null, + "maxDashboards": null, + "maxRuleChains": null, + "maxEdges": null, + "maxResourcesInBytes": null, + "maxOtaPackagesInBytes": null, + "maxResourceSize": null, + "transportTenantMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60", + "transportDeviceMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayDeviceMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "tenantEntityExportRateLimit": "20:1,600:60", + "tenantEntityImportRateLimit": "20:1,600:60", + "tenantNotificationRequestsRateLimit": "20:1,600:60", + "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60", + "maxTransportMessages": 10000000, + "maxTransportDataPoints": 10000000, + "maxREExecutions": 4000000, + "maxJSExecutions": 5000000, + "maxTbelExecutions": 5000000, + "maxDPStorageDays": 0, + "maxRuleNodeExecutionsPerMessage": 50, + "maxDebugModeDurationMinutes": 15, + "maxEmails": 0, + "smsEnabled": true, + "maxSms": 0, + "maxCreatedAlarms": 1000, + "tenantServerRestLimitsConfiguration": null, + "customerServerRestLimitsConfiguration": null, + "maxWsSessionsPerTenant": null, + "maxWsSessionsPerCustomer": null, + "maxWsSessionsPerRegularUser": null, + "maxWsSessionsPerPublicUser": null, + "wsMsgQueueLimitPerSession": null, + "maxWsSubscriptionsPerTenant": null, + "maxWsSubscriptionsPerCustomer": null, + "maxWsSubscriptionsPerRegularUser": null, + "maxWsSubscriptionsPerPublicUser": null, + "wsUpdatesPerSessionRateLimit": null, + "cassandraReadQueryTenantCoreRateLimits": null, + "cassandraWriteQueryTenantCoreRateLimits": null, + "cassandraReadQueryTenantRuleEngineRateLimits": null, + "cassandraWriteQueryTenantRuleEngineRateLimits": null, + "edgeEventRateLimits": null, + "edgeEventRateLimitsPerEdge": null, + "edgeUplinkMessagesRateLimits": null, + "edgeUplinkMessagesRateLimitsPerEdge": null, + "defaultStorageTtlDays": null, + "alarmsTtlDays": null, + "rpcTtlDays": null, + "queueStatsTtlDays": null, + "ruleEngineExceptionsTtlDays": null, + "warnThreshold": null, + "maxCalculatedFieldsPerEntity": 5, + "maxArgumentsPerCF": 10, + "minAllowedScheduledUpdateIntervalInSecForCF": 10, + "maxRelationLevelPerCfArgument": 2, + "maxRelatedEntitiesToReturnPerCfArgument": 100, + "maxDataPointsPerRollingArg": 1000, + "maxStateSizeInKBytes": 32, + "maxSingleValueArgumentSizeInKBytes": 2, + "minAllowedDeduplicationIntervalInSecForCF": 10, + "minAllowedAggregationIntervalInSecForCF": 60, + "intermediateAggregationIntervalInSecForCF": 300, + "cfReevaluationCheckInterval": 60, + "alarmsReevaluationInterval": 60 + } }, "DeliveryMethodNotificationTemplate": { "type": "object", @@ -86555,6 +87247,13 @@ "MOBILE_APP": "#/components/schemas/MobileAppDeliveryMethodNotificationTemplate" } }, + "example": { + "enabled": null, + "body": null, + "method": "WEB", + "subject": "New Message Received", + "additionalConfig": {} + }, "properties": { "enabled": { "type": "boolean" @@ -86680,6 +87379,12 @@ } } ], + "example": { + "triggerType": "DEVICE_ACTIVITY", + "devices": null, + "deviceProfiles": null, + "notifyOn": null + }, "required": [ "notifyOn" ] @@ -86703,6 +87408,10 @@ } } ], + "example": { + "triggerType": "DEVICE_ACTIVITY", + "targets": null + }, "required": [ "targets" ] @@ -86716,6 +87425,9 @@ "DEFAULT": "#/components/schemas/DefaultDeviceConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "$ref": "#/components/schemas/DeviceProfileType", @@ -86833,7 +87545,37 @@ } } } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE", + "credentials": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "createdTime": 1609459200000, + "deviceId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "credentialsType": {}, + "credentialsId": "Access token or other value that depends on the credentials type", + "credentialsValue": "Null in case of ACCESS_TOKEN. See model definition.", + "version": null + } + } }, "DeviceId": { "type": "object", @@ -86844,7 +87586,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DeviceInfo": { "type": "object", @@ -87034,6 +87780,9 @@ "DEFAULT": "#/components/schemas/DefaultDeviceProfileConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -87065,7 +87814,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE_PROFILE" + } }, "DeviceProfileId": { "type": "object", @@ -87076,7 +87843,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DEVICE_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DeviceProfileInfo": { "type": "object", @@ -87123,6 +87894,10 @@ "X509_CERTIFICATE_CHAIN": "#/components/schemas/X509CertificateChainProvisionConfiguration" } }, + "example": { + "provisionDeviceSecret": "secret123", + "type": "DISABLED" + }, "properties": { "provisionDeviceSecret": { "type": "string", @@ -87158,6 +87933,9 @@ "SNMP": "#/components/schemas/SnmpDeviceProfileTransportConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -87232,7 +88010,26 @@ } } } - ] + ], + "example": { + "type": "deviceSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "deviceTypes": null + } }, "DeviceTransportConfiguration": { "description": "Configuration for device transport", @@ -87246,6 +88043,9 @@ "SNMP": "#/components/schemas/SnmpDeviceTransportConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -87289,7 +88089,13 @@ } } } - ] + ], + "example": { + "type": "deviceType", + "deviceTypes": null, + "deviceNameFilter": null, + "deviceType": null + } }, "Direction": { "type": "string", @@ -87303,7 +88109,11 @@ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "DISABLED" + } }, "Domain": { "type": "object", @@ -87350,7 +88160,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DomainInfo": { "type": "object", @@ -87442,14 +88256,40 @@ } } ], - "description": "Dummy job configuration" + "description": "Dummy job configuration", + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "DUMMY", + "taskProcessingTimeMs": null, + "successfulTasksCount": null, + "failedTasksCount": null, + "permanentlyFailedTasksCount": null, + "errors": null, + "retries": null, + "taskProcessingTimeoutMs": null, + "generalError": null, + "submittedTasksBeforeGeneralError": null + } }, "DummyJobResult": { "allOf": [ { "$ref": "#/components/schemas/JobResult" } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "DUMMY" + } }, "DummyTaskFailure": { "type": "object", @@ -87498,6 +88338,23 @@ } } ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "DURATION", + "unit": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "unit", "value" @@ -87654,7 +88511,11 @@ } } } - ] + ], + "example": { + "triggerType": "EDGE_COMMUNICATION_FAILURE", + "edges": null + } }, "EdgeCommunicationFailureRecipientsConfig": { "allOf": [ @@ -87675,6 +88536,10 @@ } } ], + "example": { + "triggerType": "EDGE_COMMUNICATION_FAILURE", + "targets": null + }, "required": [ "targets" ] @@ -87704,7 +88569,12 @@ } } } - ] + ], + "example": { + "triggerType": "EDGE_CONNECTION", + "edges": null, + "notifyOn": null + } }, "EdgeConnectionRecipientsConfig": { "allOf": [ @@ -87725,6 +88595,10 @@ } } ], + "example": { + "triggerType": "EDGE_CONNECTION", + "targets": null + }, "required": [ "targets" ] @@ -87865,7 +88739,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "EDGE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EdgeInfo": { "type": "object", @@ -88011,7 +88889,26 @@ } } } - ] + ], + "example": { + "type": "edgeSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "edgeTypes": null + } }, "EdgeTypeFilter": { "allOf": [ @@ -88037,7 +88934,13 @@ } } } - ] + ], + "example": { + "type": "edgeType", + "edgeTypes": null, + "edgeNameFilter": null, + "edgeType": null + } }, "EdqsApiMode": { "type": "string", @@ -88088,7 +88991,10 @@ { "$ref": "#/components/schemas/CoapDeviceTypeConfiguration" } - ] + ], + "example": { + "coapDeviceType": "EFENTO" + } }, "EmailDeliveryMethodNotificationTemplate": { "allOf": [ @@ -88105,6 +89011,12 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "EMAIL", + "subject": null + }, "required": [ "subject" ] @@ -88124,6 +89036,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "EMAIL", + "email": null + }, "required": [ "email" ] @@ -88143,7 +89060,11 @@ } } } - ] + ], + "example": { + "providerType": "EMAIL", + "verificationCodeLifetime": null + } }, "EntitiesLimitNotificationRuleTriggerConfig": { "allOf": [ @@ -88167,7 +89088,12 @@ } } } - ] + ], + "example": { + "triggerType": "ENTITIES_LIMIT", + "entityTypes": null, + "threshold": null + } }, "EntitiesLimitRecipientsConfig": { "allOf": [ @@ -88188,6 +89114,10 @@ } } ], + "example": { + "triggerType": "ENTITIES_LIMIT", + "targets": null + }, "required": [ "targets" ] @@ -88218,7 +89148,14 @@ } } } - ] + ], + "example": { + "triggerType": "ENTITY_ACTION", + "entityTypes": null, + "created": null, + "updated": null, + "deleted": null + } }, "EntityActionRecipientsConfig": { "allOf": [ @@ -88239,6 +89176,10 @@ } } ], + "example": { + "triggerType": "ENTITY_ACTION", + "targets": null + }, "required": [ "targets" ] @@ -88277,6 +89218,27 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "ENTITY_AGGREGATION", + "arguments": null, + "metrics": null, + "interval": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, + "watermark": { + "duration": null + }, + "produceIntermediateResult": null + }, "required": [ "arguments", "interval", @@ -88463,6 +89425,24 @@ "AI_MODEL": "#/components/schemas/AiModelExportData" } }, + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "CUSTOMER" + }, "properties": { "entity": { "$ref": "#/components/schemas/ExportableEntity" @@ -88518,6 +89498,14 @@ "edgeSearchQuery": "#/components/schemas/EdgeSearchQueryFilter" } }, + "example": { + "type": "singleEntity", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, "properties": { "type": { "type": "string" @@ -88570,6 +89558,10 @@ "WIDGET_TYPE": "#/components/schemas/WidgetTypeId" } }, + "example": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, "properties": { "entityType": { "$ref": "#/components/schemas/EntityType", @@ -88651,7 +89643,12 @@ } } } - ] + ], + "example": { + "type": "entityList", + "entityType": {}, + "entityList": null + } }, "EntityLoadError": { "type": "object", @@ -88686,7 +89683,12 @@ } } } - ] + ], + "example": { + "type": "entityName", + "entityType": {}, + "entityNameFilter": null + } }, "EntityRelation": { "type": "object", @@ -88875,7 +89877,11 @@ } } } - ] + ], + "example": { + "type": "entityType", + "entityType": {} + } }, "EntityTypeLoadResult": { "type": "object", @@ -88969,7 +89975,13 @@ } } } - ] + ], + "example": { + "versionId": null, + "type": "ENTITY_TYPE", + "entityTypes": null, + "rollbackOnError": null + } }, "EntityVersion": { "type": "object", @@ -89065,7 +90077,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ENTITY_VIEW" + } }, "EntityViewId": { "type": "object", @@ -89076,7 +90106,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ENTITY_VIEW", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EntityViewInfo": { "type": "object", @@ -89217,7 +90251,26 @@ } } } - ] + ], + "example": { + "type": "entityViewSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityViewTypes": null + } }, "EntityViewTypeFilter": { "allOf": [ @@ -89243,7 +90296,13 @@ } } } - ] + ], + "example": { + "type": "entityViewType", + "entityViewTypes": null, + "entityViewNameFilter": null, + "entityViewType": null + } }, "ErrorEventFilter": { "allOf": [ @@ -89270,7 +90329,14 @@ } } } - ] + ], + "example": { + "eventType": "ERROR", + "notEmpty": null, + "server": "ip-172-31-24-152", + "method": "onClusterEventMsg", + "errorStr": "not present in the DB" + } }, "EscalatedNotificationRuleRecipientsConfig": { "allOf": [ @@ -89295,6 +90361,10 @@ } ], "description": "Escalated notification rule recipients configuration", + "example": { + "triggerType": "ALARM", + "escalationTable": null + }, "required": [ "escalationTable" ] @@ -89313,6 +90383,15 @@ "DEBUG_CALCULATED_FIELD": "#/components/schemas/CalculatedFieldDebugEventFilter" } }, + "example": { + "eventType": "STATS", + "notEmpty": null, + "server": "ip-172-31-24-152", + "minMessagesProcessed": 25, + "maxMessagesProcessed": 250, + "minErrorsOccurred": 30, + "maxErrorsOccurred": 300 + }, "properties": { "eventType": { "$ref": "#/components/schemas/EventType", @@ -89423,7 +90502,11 @@ } } } - ] + ], + "example": { + "status": "FAILURE", + "errorDetails": null + } }, "FeaturesInfo": { "type": "object", @@ -89516,6 +90599,23 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "GEOFENCING", + "entityCoordinates": { + "latitudeKeyName": null, + "longitudeKeyName": null + }, + "zoneGroups": null, + "scheduledUpdateEnabled": null, + "scheduledUpdateInterval": null + }, "required": [ "entityCoordinates", "output", @@ -89581,6 +90681,21 @@ } } ], + "example": { + "provider": "GITHUB_MODELS", + "providerConfig": { + "personalAccessToken": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -89652,6 +90767,22 @@ } } ], + "example": { + "provider": "GOOGLE_AI_GEMINI", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -89723,6 +90854,25 @@ } } ], + "example": { + "provider": "GOOGLE_VERTEX_AI_GEMINI", + "providerConfig": { + "fileName": null, + "projectId": null, + "location": null, + "serviceAccountKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -89867,6 +91017,11 @@ } } ], + "example": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -89928,6 +91083,20 @@ "DUMMY": "#/components/schemas/DummyJobConfiguration" } }, + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "DUMMY", + "taskProcessingTimeMs": null, + "successfulTasksCount": null, + "failedTasksCount": null, + "permanentlyFailedTasksCount": null, + "errors": null, + "retries": null, + "taskProcessingTimeoutMs": null, + "generalError": null, + "submittedTasksBeforeGeneralError": null + }, "properties": { "tasksKey": { "type": "string", @@ -89957,7 +91126,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "JOB", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "JobResult": { "type": "object", @@ -89968,6 +91141,18 @@ "DUMMY": "#/components/schemas/DummyJobResult" } }, + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "DUMMY" + }, "properties": { "successfulCount": { "type": "integer", @@ -90048,7 +91233,10 @@ { "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" } - ] + ], + "example": { + "transportPayloadType": "JSON" + } }, "JwtPair": { "type": "object", @@ -90122,6 +91310,21 @@ "COMPLEX": "#/components/schemas/ComplexFilterPredicate" } }, + "example": { + "type": "STRING", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + }, + "ignoreCase": null + }, "properties": { "type": { "type": "string" @@ -90226,7 +91429,15 @@ } } } - ] + ], + "example": { + "eventType": "LC_EVENT", + "notEmpty": null, + "server": "ip-172-31-24-152", + "event": "STARTED", + "status": "Success", + "errorStr": "not present in the DB" + } }, "LimitedApi": { "type": "string", @@ -90558,7 +91769,34 @@ } } } - ] + ], + "example": { + "type": "LWM2M", + "observeAttr": { + "keyName": null, + "observe": null, + "attribute": null, + "telemetry": null, + "attributeLwm2m": null, + "initAttrTelAsObsStrategy": null, + "observeStrategy": {} + }, + "bootstrapServerUpdateEnable": null, + "bootstrap": null, + "clientLwM2mSettings": { + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null, + "useObject19ForOtaInfo": null, + "fwUpdateStrategy": null, + "swUpdateStrategy": null, + "clientOnlyObserveAfterConnect": null, + "fwUpdateResource": null, + "swUpdateResource": null, + "defaultObjectIDVer": null + } + } }, "Lwm2mDeviceTransportConfiguration": { "allOf": [ @@ -90585,7 +91823,14 @@ } } } - ] + ], + "example": { + "type": "LWM2M", + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } }, "MapperType": { "type": "string", @@ -90635,7 +91880,23 @@ } } } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "MICROSOFT_TEAMS", + "subject": null, + "themeColor": null, + "button": { + "enabled": null, + "text": null, + "linkType": {}, + "link": null, + "dashboardId": null, + "dashboardState": null, + "setEntityIdInState": null + } + } }, "MicrosoftTeamsNotificationTargetConfig": { "allOf": [ @@ -90672,6 +91933,18 @@ } } ], + "example": { + "description": null, + "type": "MICROSOFT_TEAMS", + "webhookUrl": null, + "channelName": null, + "useOldApi": null, + "email": null, + "firstName": null, + "id": null, + "lastName": null, + "title": null + }, "required": [ "channelName", "webhookUrl" @@ -90728,6 +92001,21 @@ } } ], + "example": { + "provider": "MISTRAL_AI", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -90869,7 +92157,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "MOBILE_APP_BUNDLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "MobileAppBundleInfo": { "type": "object", @@ -90964,6 +92256,13 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "MOBILE_APP", + "subject": "New Message Received", + "additionalConfig": {} + }, "required": [ "subject" ] @@ -90977,7 +92276,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "MOBILE_APP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "MobileAppNotificationDeliveryMethodConfig": { "allOf": [ @@ -90997,6 +92300,11 @@ } } ], + "example": { + "method": "MOBILE_APP", + "firebaseServiceAccountCredentialsFileName": null, + "firebaseServiceAccountCredentials": null + }, "required": [ "firebaseServiceAccountCredentials" ] @@ -91054,6 +92362,13 @@ "CUSTOM": "#/components/schemas/CustomMobilePage" } }, + "example": { + "type": "DEFAULT", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "id": "HOME" + }, "properties": { "type": { "$ref": "#/components/schemas/MobilePageType" @@ -91103,6 +92418,11 @@ } } ], + "example": { + "type": "MONTH", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -91142,14 +92462,29 @@ } } } - ] + ], + "example": { + "type": "MQTT", + "deviceTelemetryTopic": null, + "deviceAttributesTopic": null, + "deviceAttributesSubscribeTopic": null, + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + }, + "sparkplug": null, + "sparkplugAttributesMetricNames": null, + "sendAckOnValidationException": null + } }, "MqttDeviceTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceTransportConfiguration" } - ] + ], + "example": { + "type": "MQTT" + } }, "NameConflictPolicy": { "type": "string", @@ -91163,7 +92498,10 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ] + ], + "example": { + "triggerType": "NEW_PLATFORM_VERSION" + } }, "NewPlatformVersionRecipientsConfig": { "allOf": [ @@ -91184,6 +92522,10 @@ } } ], + "example": { + "triggerType": "NEW_PLATFORM_VERSION", + "targets": null + }, "required": [ "targets" ] @@ -91205,6 +92547,14 @@ } } ], + "example": { + "type": "NO_DATA", + "unit": {}, + "duration": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "duration", "unit" @@ -91329,7 +92679,10 @@ { "$ref": "#/components/schemas/OllamaAuth" } - ] + ], + "example": { + "type": "NONE" + } }, "Notification": { "type": "object", @@ -91392,6 +92745,10 @@ "MOBILE_APP": "#/components/schemas/MobileAppNotificationDeliveryMethodConfig" } }, + "example": { + "method": "SLACK", + "botToken": null + }, "properties": { "method": { "type": "string" @@ -91410,7 +92767,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationInfo": { "type": "object", @@ -91521,7 +92882,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_REQUEST", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationRequestInfo": { "type": "object", @@ -91718,7 +93083,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_RULE" + } }, "NotificationRuleId": { "type": "object", @@ -91729,7 +93112,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_RULE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationRuleInfo": { "type": "object", @@ -91808,6 +93195,10 @@ "RESOURCES_SHORTAGE": "#/components/schemas/ResourceShortageRecipientsConfig" } }, + "example": { + "triggerType": "ENTITY_ACTION", + "targets": null + }, "properties": { "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" @@ -91836,6 +93227,15 @@ "RESOURCES_SHORTAGE": "#/components/schemas/ResourcesShortageNotificationRuleTriggerConfig" } }, + "example": { + "triggerType": "ALARM", + "alarmTypes": null, + "alarmSeverities": null, + "notifyOn": null, + "clearRule": { + "alarmStatuses": null + } + }, "properties": { "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" @@ -91924,6 +93324,13 @@ "MICROSOFT_TEAMS": "#/components/schemas/MicrosoftTeamsNotificationTargetConfig" } }, + "example": { + "description": null, + "type": "PLATFORM_USERS", + "usersFilter": { + "type": null + } + }, "properties": { "description": { "type": "string" @@ -91941,7 +93348,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_TARGET" + } }, "NotificationTargetId": { "type": "object", @@ -91952,7 +93377,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationTemplate": { "type": "object", @@ -92007,7 +93436,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_TEMPLATE" + } }, "NotificationTemplateId": { "type": "object", @@ -92018,7 +93465,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationType": { "type": "string", @@ -92059,7 +93510,21 @@ } } } - ] + ], + "example": { + "type": "NUMERIC", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + } + } }, "NumericOperation": { "type": "string", @@ -92236,7 +93701,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "OAUTH2_CLIENT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "OAuth2ClientInfo": { "type": "object", @@ -92532,6 +94001,9 @@ "TOKEN": "#/components/schemas/Token" } }, + "example": { + "type": "NONE" + }, "properties": { "type": { "type": "string" @@ -92592,6 +94064,24 @@ } } ], + "example": { + "provider": "OLLAMA", + "providerConfig": { + "baseUrl": null, + "auth": { + "type": null + } + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "contextLength": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -92663,6 +94153,22 @@ } } ], + "example": { + "provider": "OPENAI", + "providerConfig": { + "baseUrl": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -92684,7 +94190,10 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "ORIGINATOR_ENTITY_OWNER_USERS" + } }, "OtaPackage": { "type": "object", @@ -92792,7 +94301,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "OTA_PACKAGE" + } }, "OtaPackageId": { "type": "object", @@ -92803,7 +94330,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "OTA_PACKAGE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "OtaPackageInfo": { "type": "object", @@ -92962,6 +94493,15 @@ "ATTRIBUTES": "#/components/schemas/AttributesOutput" } }, + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": null + }, + "type": "TIME_SERIES" + }, "properties": { "decimalsByDefault": { "type": "integer", @@ -94729,6 +96269,13 @@ } } ], + "example": { + "description": null, + "type": "PLATFORM_USERS", + "usersFilter": { + "type": null + } + }, "required": [ "usersFilter" ] @@ -94832,6 +96379,23 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "PROPAGATION", + "arguments": null, + "expression": null, + "relation": { + "direction": {}, + "relationType": null + }, + "applyExpressionToResolvedArguments": null + }, "required": [ "arguments", "relation" @@ -94865,7 +96429,16 @@ } } } - ] + ], + "example": { + "transportPayloadType": "PROTOBUF", + "deviceTelemetryProtoSchema": null, + "deviceAttributesProtoSchema": null, + "deviceRpcRequestProtoSchema": null, + "deviceRpcResponseProtoSchema": null, + "enableCompatibilityWithJsonPayloadFormat": null, + "useJsonPayloadFormatForDefaultDownlinkTopics": null + } }, "QRCodeConfig": { "type": "object", @@ -94980,6 +96553,11 @@ } } ], + "example": { + "type": "QUARTER", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -95042,7 +96620,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "QUEUE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "QueueStats": { "type": "object", @@ -95077,7 +96659,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "QUEUE_STATS", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RPKLwM2MBootstrapServerCredential": { "allOf": [ @@ -95186,7 +96772,11 @@ } } } - ] + ], + "example": { + "triggerType": "RATE_LIMITS", + "apis": null + } }, "RateLimitsRecipientsConfig": { "allOf": [ @@ -95207,6 +96797,10 @@ } } ], + "example": { + "triggerType": "RATE_LIMITS", + "targets": null + }, "required": [ "targets" ] @@ -95267,6 +96861,26 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "RELATED_ENTITIES_AGGREGATION", + "relation": { + "direction": {}, + "relationType": null + }, + "arguments": null, + "deduplicationIntervalInSec": null, + "metrics": null, + "useLatestTs": null, + "scheduledUpdateInterval": null, + "scheduledUpdateEnabled": null + }, "required": [ "arguments", "metrics", @@ -95327,7 +96941,11 @@ } } } - ] + ], + "example": { + "type": "RELATION_PATH_QUERY", + "levels": null + } }, "RelationTypeGroup": { "type": "string", @@ -95391,7 +97009,29 @@ } } } - ] + ], + "example": { + "type": "relationsQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "multiRoot": null, + "multiRootEntitiesType": {}, + "multiRootEntityIds": null, + "direction": {}, + "filters": null, + "maxLevel": null, + "fetchLastLevelOnly": null, + "negate": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "RelationsSearchParameters": { "type": "object", @@ -95439,6 +97079,22 @@ } } ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "REPEATING", + "count": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "count" ] @@ -95585,6 +97241,10 @@ } } ], + "example": { + "triggerType": "RESOURCES_SHORTAGE", + "targets": null + }, "required": [ "targets" ] @@ -95635,7 +97295,13 @@ } } } - ] + ], + "example": { + "triggerType": "RESOURCES_SHORTAGE", + "cpuThreshold": null, + "ramThreshold": null, + "storageThreshold": null + } }, "Rpc": { "type": "object", @@ -95698,7 +97364,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RPC", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RpcStatus": { "type": "string", @@ -95856,7 +97526,15 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_RULE_CHAIN", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "message": null + } }, "RuleChainExportData": { "allOf": [ @@ -95871,7 +97549,36 @@ } } } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "RULE_CHAIN", + "metaData": { + "ruleChainId": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "version": null, + "firstNodeIndex": null, + "nodes": null, + "connections": null, + "ruleChainConnections": null + } + } }, "RuleChainId": { "type": "object", @@ -95882,7 +97589,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RuleChainImportResult": { "type": "object", @@ -96039,7 +97750,16 @@ } } } - ] + ], + "example": { + "triggerType": "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "ruleChains": null, + "ruleChainEvents": null, + "onlyRuleChainLifecycleFailures": null, + "trackRuleNodeEvents": null, + "ruleNodeEvents": null, + "onlyRuleNodeLifecycleFailures": null + } }, "RuleEngineComponentLifecycleEventRecipientsConfig": { "allOf": [ @@ -96060,6 +97780,10 @@ } } ], + "example": { + "triggerType": "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "targets": null + }, "required": [ "targets" ] @@ -96209,7 +97933,22 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_RULE_NODE", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "msgDirectionType": "IN", + "entityId": "de9d54a0-2b7a-11ec-a3cc-23386423d98f", + "entityType": "DEVICE", + "msgId": "de9d54a0-2b7a-11ec-a3cc-23386423d98f", + "msgType": "POST_TELEMETRY_REQUEST", + "relationType": "Success", + "dataSearch": "humidity", + "metadataSearch": "deviceName" + } }, "RuleNodeId": { "type": "object", @@ -96220,7 +97959,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SaveDeviceWithCredentialsRequest": { "type": "object", @@ -96365,6 +98108,18 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SCRIPT", + "arguments": null, + "expression": null + }, "required": [ "arguments" ] @@ -96434,7 +98189,11 @@ } } } - ] + ], + "example": { + "spec": "SHARED_ATTRIBUTES_SETTING", + "mappings": null + } }, "ShortCustomerInfo": { "type": "object", @@ -96458,7 +98217,19 @@ { "$ref": "#/components/schemas/AlarmCondition" } - ] + ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + } }, "SimpleAlarmConditionExpression": { "allOf": [ @@ -96481,6 +98252,11 @@ } } ], + "example": { + "type": "SIMPLE", + "filters": null, + "operation": {} + }, "required": [ "filters" ] @@ -96509,6 +98285,19 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SIMPLE", + "arguments": null, + "expression": null, + "useLatestTs": null + }, "required": [ "arguments" ] @@ -96526,7 +98315,15 @@ } } } - ] + ], + "example": { + "type": "singleEntity", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "SingleEntityVersionCreateRequest": { "allOf": [ @@ -96544,7 +98341,22 @@ } } } - ] + ], + "example": { + "versionName": null, + "branch": null, + "type": "SINGLE_ENTITY", + "entityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "saveRelations": null, + "saveAttributes": null, + "saveCredentials": null, + "saveCalculatedFields": null + } + } }, "SingleEntityVersionLoadRequest": { "allOf": [ @@ -96562,7 +98374,21 @@ } } } - ] + ], + "example": { + "versionId": null, + "type": "SINGLE_ENTITY", + "externalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "loadRelations": null, + "loadAttributes": null, + "loadCredentials": null, + "loadCalculatedFields": null + } + } }, "SlackConversation": { "type": "object", @@ -96607,7 +98433,12 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "SLACK" + } }, "SlackNotificationDeliveryMethodConfig": { "allOf": [ @@ -96624,6 +98455,10 @@ } } ], + "example": { + "method": "SLACK", + "botToken": null + }, "required": [ "botToken" ] @@ -96645,6 +98480,19 @@ } } ], + "example": { + "description": null, + "type": "SLACK", + "conversationType": {}, + "conversation": { + "type": {}, + "id": null, + "name": null, + "wholeName": null, + "email": null, + "title": null + } + }, "required": [ "conversation" ] @@ -96739,6 +98587,24 @@ } } ], + "example": { + "type": "SMPP", + "protocolVersion": "3.3, 3.4", + "host": null, + "port": null, + "systemId": null, + "password": null, + "systemType": null, + "bindType": {}, + "serviceType": null, + "sourceAddress": null, + "sourceTon": null, + "sourceNpi": null, + "destinationTon": null, + "destinationNpi": null, + "addressRange": null, + "codingScheme": null + }, "required": [ "host", "password", @@ -96752,7 +98618,12 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "SMS" + } }, "SmsProviderConfiguration": { "description": "Base configuration for SMS providers", @@ -96764,6 +98635,12 @@ "SMPP": "#/components/schemas/SmppSmsProviderConfiguration" } }, + "example": { + "type": "AWS_SNS", + "accessKeyId": null, + "secretAccessKey": null, + "region": null + }, "properties": { "type": { "type": "string" @@ -96789,6 +98666,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "SMS", + "phoneNumber": null + }, "required": [ "phoneNumber" ] @@ -96814,6 +98696,11 @@ } } ], + "example": { + "providerType": "SMS", + "verificationCodeLifetime": null, + "smsVerificationMessageTemplate": null + }, "required": [ "smsVerificationMessageTemplate" ] @@ -96831,6 +98718,11 @@ "TO_SERVER_RPC_REQUEST": "#/components/schemas/ToServerRpcRequestSnmpCommunicationConfig" } }, + "example": { + "spec": "TELEMETRY_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + }, "properties": { "spec": { "$ref": "#/components/schemas/SnmpCommunicationSpec", @@ -96875,7 +98767,13 @@ } } } - ] + ], + "example": { + "type": "SNMP", + "timeoutMs": null, + "retries": null, + "communicationConfigs": null + } }, "SnmpDeviceTransportConfiguration": { "allOf": [ @@ -96924,7 +98822,22 @@ } } } - ] + ], + "example": { + "type": "SNMP", + "host": null, + "port": null, + "protocolVersion": {}, + "community": null, + "username": null, + "securityName": null, + "contextName": null, + "authenticationProtocol": {}, + "authenticationPassphrase": null, + "privacyProtocol": {}, + "privacyPassphrase": null, + "engineId": null + } }, "SnmpMapping": { "type": "object", @@ -96977,7 +98890,14 @@ } } } - ] + ], + "example": { + "type": "SPECIFIC_TIME", + "timezone": null, + "daysOfWeek": null, + "startsOn": null, + "endsOn": null + } }, "StarredDashboardInfo": { "type": "object", @@ -97038,7 +98958,16 @@ } } } - ] + ], + "example": { + "eventType": "STATS", + "notEmpty": null, + "server": "ip-172-31-24-152", + "minMessagesProcessed": 25, + "maxMessagesProcessed": 250, + "minErrorsOccurred": 30, + "maxErrorsOccurred": 300 + } }, "StoreInfo": { "type": "object", @@ -97074,7 +99003,22 @@ } } } - ] + ], + "example": { + "type": "STRING", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + }, + "ignoreCase": null + } }, "StringOperation": { "type": "string", @@ -97125,7 +99069,11 @@ } } } - ] + ], + "example": { + "status": "SUCCESS", + "generatedContent": null + } }, "SyncStrategy": { "type": "string", @@ -97139,7 +99087,10 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "SYSTEM_ADMINISTRATORS" + } }, "SystemInfo": { "type": "object", @@ -97206,7 +99157,10 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ] + ], + "example": { + "triggerType": "TASK_PROCESSING_FAILURE" + } }, "TaskProcessingFailureRecipientsConfig": { "allOf": [ @@ -97227,6 +99181,10 @@ } } ], + "example": { + "triggerType": "TASK_PROCESSING_FAILURE", + "targets": null + }, "required": [ "targets" ] @@ -97293,6 +99251,10 @@ "FAILURE": "#/components/schemas/Failure" } }, + "example": { + "status": "SUCCESS", + "generatedContent": null + }, "properties": { "status": { "type": "string", @@ -97311,6 +99273,10 @@ "TEXT": "#/components/schemas/TbTextContent" } }, + "example": { + "contentType": "TEXT", + "text": "What is the weather like in Kyiv today?" + }, "properties": { "contentType": { "type": "string" @@ -97443,7 +99409,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "TB_RESOURCE" + } }, "TbResourceId": { "type": "object", @@ -97454,7 +99438,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TB_RESOURCE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TbResourceInfo": { "type": "object", @@ -97551,6 +99539,10 @@ } ], "description": "Text-based content part of a user's prompt", + "example": { + "contentType": "TEXT", + "text": "What is the weather like in Kyiv today?" + }, "required": [ "text" ] @@ -97585,6 +99577,10 @@ } } ], + "example": { + "type": "TBEL", + "expression": null + }, "required": [ "expression" ] @@ -97691,7 +99687,12 @@ } } } - ] + ], + "example": { + "spec": "TELEMETRY_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + } }, "Tenant": { "type": "object", @@ -97811,7 +99812,12 @@ } } } - ] + ], + "example": { + "type": "TENANT_ADMINISTRATORS", + "tenantsIds": null, + "tenantProfilesIds": null + } }, "TenantId": { "type": "object", @@ -97822,7 +99828,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TenantInfo": { "type": "object", @@ -97975,6 +99985,86 @@ "DEFAULT": "#/components/schemas/DefaultTenantProfileConfiguration" } }, + "example": { + "type": "DEFAULT", + "maxDevices": null, + "maxAssets": null, + "maxCustomers": null, + "maxUsers": null, + "maxDashboards": null, + "maxRuleChains": null, + "maxEdges": null, + "maxResourcesInBytes": null, + "maxOtaPackagesInBytes": null, + "maxResourceSize": null, + "transportTenantMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60", + "transportDeviceMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayDeviceMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "tenantEntityExportRateLimit": "20:1,600:60", + "tenantEntityImportRateLimit": "20:1,600:60", + "tenantNotificationRequestsRateLimit": "20:1,600:60", + "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60", + "maxTransportMessages": 10000000, + "maxTransportDataPoints": 10000000, + "maxREExecutions": 4000000, + "maxJSExecutions": 5000000, + "maxTbelExecutions": 5000000, + "maxDPStorageDays": 0, + "maxRuleNodeExecutionsPerMessage": 50, + "maxDebugModeDurationMinutes": 15, + "maxEmails": 0, + "smsEnabled": true, + "maxSms": 0, + "maxCreatedAlarms": 1000, + "tenantServerRestLimitsConfiguration": null, + "customerServerRestLimitsConfiguration": null, + "maxWsSessionsPerTenant": null, + "maxWsSessionsPerCustomer": null, + "maxWsSessionsPerRegularUser": null, + "maxWsSessionsPerPublicUser": null, + "wsMsgQueueLimitPerSession": null, + "maxWsSubscriptionsPerTenant": null, + "maxWsSubscriptionsPerCustomer": null, + "maxWsSubscriptionsPerRegularUser": null, + "maxWsSubscriptionsPerPublicUser": null, + "wsUpdatesPerSessionRateLimit": null, + "cassandraReadQueryTenantCoreRateLimits": null, + "cassandraWriteQueryTenantCoreRateLimits": null, + "cassandraReadQueryTenantRuleEngineRateLimits": null, + "cassandraWriteQueryTenantRuleEngineRateLimits": null, + "edgeEventRateLimits": null, + "edgeEventRateLimitsPerEdge": null, + "edgeUplinkMessagesRateLimits": null, + "edgeUplinkMessagesRateLimitsPerEdge": null, + "defaultStorageTtlDays": null, + "alarmsTtlDays": null, + "rpcTtlDays": null, + "queueStatsTtlDays": null, + "ruleEngineExceptionsTtlDays": null, + "warnThreshold": null, + "maxCalculatedFieldsPerEntity": 5, + "maxArgumentsPerCF": 10, + "minAllowedScheduledUpdateIntervalInSecForCF": 10, + "maxRelationLevelPerCfArgument": 2, + "maxRelatedEntitiesToReturnPerCfArgument": 100, + "maxDataPointsPerRollingArg": 1000, + "maxStateSizeInKBytes": 32, + "maxSingleValueArgumentSizeInKBytes": 2, + "minAllowedDeduplicationIntervalInSecForCF": 10, + "minAllowedAggregationIntervalInSecForCF": 60, + "intermediateAggregationIntervalInSecForCF": 300, + "cfReevaluationCheckInterval": 60, + "alarmsReevaluationInterval": 60 + }, "properties": { "type": { "type": "string" @@ -98009,7 +100099,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TENANT_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TenantProfileQueueConfiguration": { "type": "object", @@ -98167,7 +100261,15 @@ } } } - ] + ], + "example": { + "type": "IMMEDIATE", + "ttl": null, + "saveTimeSeries": null, + "saveLatest": null, + "sendWsUpdate": null, + "processCfs": null + } }, "TimeSeriesOutput": { "allOf": [ @@ -98182,7 +100284,16 @@ } } } - ] + ], + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": null + }, + "type": "TIME_SERIES" + } }, "TimeSeriesOutputStrategy": { "discriminator": { @@ -98192,6 +100303,14 @@ "RULE_CHAIN": "#/components/schemas/TimeSeriesRuleChainOutputStrategy" } }, + "example": { + "type": "IMMEDIATE", + "ttl": null, + "saveTimeSeries": null, + "saveLatest": null, + "sendWsUpdate": null, + "processCfs": null + }, "properties": { "type": { "type": "string" @@ -98206,7 +100325,10 @@ { "$ref": "#/components/schemas/TimeSeriesOutputStrategy" } - ] + ], + "example": { + "type": "RULE_CHAIN" + } }, "TimeUnit": { "type": "string", @@ -98247,7 +100369,11 @@ } } } - ] + ], + "example": { + "spec": "TO_DEVICE_RPC_REQUEST", + "mappings": null + } }, "ToServerRpcRequestSnmpCommunicationConfig": { "allOf": [ @@ -98265,7 +100391,11 @@ } } } - ] + ], + "example": { + "spec": "TO_SERVER_RPC_REQUEST", + "mappings": null + } }, "Token": { "allOf": [ @@ -98281,6 +100411,10 @@ } } ], + "example": { + "type": "TOKEN", + "token": null + }, "required": [ "token" ] @@ -98301,6 +100435,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "TOTP", + "authUrl": null + }, "required": [ "authUrl" ] @@ -98320,6 +100459,10 @@ } } ], + "example": { + "providerType": "TOTP", + "issuerName": null + }, "required": [ "issuerName" ] @@ -98333,6 +100476,9 @@ "PROTOBUF": "#/components/schemas/ProtoTransportPayloadConfiguration" } }, + "example": { + "transportPayloadType": "JSON" + }, "properties": { "transportPayloadType": { "type": "string" @@ -98411,7 +100557,13 @@ } } } - ] + ], + "example": { + "type": "TWILIO", + "accountSid": null, + "accountToken": null, + "numberFrom": null + } }, "TwoFaAccountConfig": { "type": "object", @@ -98425,6 +100577,11 @@ "BACKUP_CODE": "#/components/schemas/BackupCodeTwoFaAccountConfig" } }, + "example": { + "useByDefault": null, + "providerType": "TOTP", + "authUrl": null + }, "properties": { "useByDefault": { "type": "boolean" @@ -98456,6 +100613,10 @@ "BACKUP_CODE": "#/components/schemas/BackupCodeTwoFaProviderConfig" } }, + "example": { + "providerType": "TOTP", + "issuerName": null + }, "properties": { "providerType": { "type": "string" @@ -98773,7 +100934,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "UserListFilter": { "allOf": [ @@ -98794,6 +100959,10 @@ } } ], + "example": { + "type": "USER_LIST", + "usersIds": null + }, "required": [ "usersIds" ] @@ -98899,6 +101068,10 @@ "AFFECTED_USER": "#/components/schemas/AffectedUserFilter" } }, + "example": { + "type": "USER_LIST", + "usersIds": null + }, "properties": { "type": { "type": "string" @@ -98936,6 +101109,21 @@ "COMPLEX": "#/components/schemas/ComplexVersionCreateRequest" } }, + "example": { + "versionName": null, + "branch": null, + "type": "SINGLE_ENTITY", + "entityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "saveRelations": null, + "saveAttributes": null, + "saveCredentials": null, + "saveCalculatedFields": null + } + }, "properties": { "versionName": { "type": "string" @@ -99012,6 +101200,20 @@ "ENTITY_TYPE": "#/components/schemas/EntityTypeVersionLoadRequest" } }, + "example": { + "versionId": null, + "type": "SINGLE_ENTITY", + "externalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "loadRelations": null, + "loadAttributes": null, + "loadCredentials": null, + "loadCalculatedFields": null + } + }, "properties": { "versionId": { "type": "string" @@ -99088,6 +101290,13 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "WEB", + "subject": "New Message Received", + "additionalConfig": {} + }, "required": [ "subject" ] @@ -99117,7 +101326,14 @@ } } } - ] + ], + "example": { + "type": "WEB_VIEW", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "url": "/url" + } }, "WeekInterval": { "allOf": [ @@ -99138,6 +101354,11 @@ } } ], + "example": { + "type": "WEEK", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -99161,6 +101382,11 @@ } } ], + "example": { + "type": "WEEK_SUN_SAT", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -99305,7 +101531,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "WIDGET_TYPE" + } }, "WidgetTypeId": { "type": "object", @@ -99316,7 +101560,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "WIDGET_TYPE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "WidgetTypeInfo": { "type": "object", @@ -99478,7 +101726,27 @@ } } } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "WIDGETS_BUNDLE", + "widgets": null, + "fqns": null + } }, "WidgetsBundleId": { "type": "object", @@ -99489,7 +101757,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "WIDGETS_BUNDLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "X509CertificateChainProvisionConfiguration": { "allOf": [ @@ -99507,7 +101779,13 @@ } } } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "X509_CERTIFICATE_CHAIN", + "certificateRegExPattern": null, + "allowCreateNewDevicesByX509Certificate": null + } }, "X509LwM2MBootstrapServerCredential": { "allOf": [ @@ -99618,6 +101896,11 @@ } } ], + "example": { + "type": "YEAR", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] diff --git a/ce/tb_ce_client/_auth.py b/ce/tb_ce_client/_auth.py index 4ada8e58..1c793d11 100644 --- a/ce/tb_ce_client/_auth.py +++ b/ce/tb_ce_client/_auth.py @@ -20,11 +20,13 @@ This file lives in common/ and is copied verbatim into each edition package directory by generate-client.sh. Use only relative imports and stdlib; no edition-specific imports. """ + import base64 import json import logging import threading import time + import urllib3 logger = logging.getLogger(__name__) @@ -37,12 +39,14 @@ # _TokenInfo # --------------------------------------------------------------------------- + class _TokenInfo: """Immutable value object holding JWT token state. All timestamps are in milliseconds since epoch. clock_diff = iat_ms_from_server - local_now_ms at login time (may be negative). """ + __slots__ = ("token", "refresh_token", "token_exp_ts", "refresh_exp_ts", "clock_diff") def __init__( @@ -55,9 +59,9 @@ def __init__( ): self.token = token self.refresh_token = refresh_token - self.token_exp_ts = token_exp_ts # -1 means unknown / invalid + self.token_exp_ts = token_exp_ts # -1 means unknown / invalid self.refresh_exp_ts = refresh_exp_ts # -1 means unknown / invalid - self.clock_diff = clock_diff # server_clock - local_clock offset in ms + self.clock_diff = clock_diff # server_clock - local_clock offset in ms # Sentinel used before first login @@ -68,6 +72,7 @@ def __init__( # JWT helpers # --------------------------------------------------------------------------- + def _parse_jwt_claim_ms(jwt: str, claim: str) -> int: """Decode JWT payload (base64url) and return the named claim value * 1000 (ms). @@ -90,6 +95,7 @@ def _parse_jwt_claim_ms(jwt: str, claim: str) -> int: # _AuthManager # --------------------------------------------------------------------------- + class _AuthManager: """Manages JWT token state and implements the refresh_api_key_hook. @@ -229,9 +235,7 @@ def _raw_post(self, path: str, body: bytes) -> dict: headers={"Content-Type": "application/json"}, ) if response.status != 200: - raise RuntimeError( - f"Auth request to {path} returned HTTP {response.status}" - ) + raise RuntimeError(f"Auth request to {path} returned HTTP {response.status}") return json.loads(response.data) def _build_token_info(self, token: str, refresh_token: str) -> "_TokenInfo": diff --git a/ce/tb_ce_client/_controller_map.py b/ce/tb_ce_client/_controller_map.py index 690314c0..96e6367b 100644 --- a/ce/tb_ce_client/_controller_map.py +++ b/ce/tb_ce_client/_controller_map.py @@ -361,12 +361,12 @@ "find_missing_to_related_rule_chains": ("tb_ce_client.api.edge_controller_api", "EdgeControllerApi"), "find_missing_to_related_rule_chains_with_http_info": ("tb_ce_client.api.edge_controller_api", "EdgeControllerApi"), "find_missing_to_related_rule_chains_without_preload_content": ("tb_ce_client.api.edge_controller_api", "EdgeControllerApi"), - "find_tenant_o_auth2_client_infos": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), + "find_o_auth2_client_infos": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), + "find_o_auth2_client_infos_with_http_info": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), + "find_o_auth2_client_infos_without_preload_content": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), "find_tenant_o_auth2_client_infos_by_ids": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), "find_tenant_o_auth2_client_infos_by_ids_with_http_info": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), "find_tenant_o_auth2_client_infos_by_ids_without_preload_content": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), - "find_tenant_o_auth2_client_infos_with_http_info": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), - "find_tenant_o_auth2_client_infos_without_preload_content": ("tb_ce_client.api.o_auth2_controller_api", "OAuth2ControllerApi"), "find_users_by_query": ("tb_ce_client.api.user_controller_api", "UserControllerApi"), "find_users_by_query_with_http_info": ("tb_ce_client.api.user_controller_api", "UserControllerApi"), "find_users_by_query_without_preload_content": ("tb_ce_client.api.user_controller_api", "UserControllerApi"), @@ -640,6 +640,9 @@ "get_domain_info_by_id": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), "get_domain_info_by_id_with_http_info": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), "get_domain_info_by_id_without_preload_content": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), + "get_domain_infos": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), + "get_domain_infos_with_http_info": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), + "get_domain_infos_without_preload_content": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), "get_edge_assets": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), "get_edge_assets_with_http_info": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), "get_edge_assets_without_preload_content": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), @@ -964,9 +967,6 @@ "get_tenant_devices": ("tb_ce_client.api.device_controller_api", "DeviceControllerApi"), "get_tenant_devices_with_http_info": ("tb_ce_client.api.device_controller_api", "DeviceControllerApi"), "get_tenant_devices_without_preload_content": ("tb_ce_client.api.device_controller_api", "DeviceControllerApi"), - "get_tenant_domain_infos": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), - "get_tenant_domain_infos_with_http_info": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), - "get_tenant_domain_infos_without_preload_content": ("tb_ce_client.api.domain_controller_api", "DomainControllerApi"), "get_tenant_edge_by_name": ("tb_ce_client.api.edge_controller_api", "EdgeControllerApi"), "get_tenant_edge_by_name_with_http_info": ("tb_ce_client.api.edge_controller_api", "EdgeControllerApi"), "get_tenant_edge_by_name_without_preload_content": ("tb_ce_client.api.edge_controller_api", "EdgeControllerApi"), @@ -1189,9 +1189,9 @@ "mark_notification_as_read": ("tb_ce_client.api.notification_controller_api", "NotificationControllerApi"), "mark_notification_as_read_with_http_info": ("tb_ce_client.api.notification_controller_api", "NotificationControllerApi"), "mark_notification_as_read_without_preload_content": ("tb_ce_client.api.notification_controller_api", "NotificationControllerApi"), - "process_assets_bulk_import": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), - "process_assets_bulk_import_with_http_info": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), - "process_assets_bulk_import_without_preload_content": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), + "process_asset_bulk_import": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), + "process_asset_bulk_import_with_http_info": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), + "process_asset_bulk_import_without_preload_content": ("tb_ce_client.api.asset_controller_api", "AssetControllerApi"), "process_devices_bulk_import": ("tb_ce_client.api.device_controller_api", "DeviceControllerApi"), "process_devices_bulk_import_with_http_info": ("tb_ce_client.api.device_controller_api", "DeviceControllerApi"), "process_devices_bulk_import_without_preload_content": ("tb_ce_client.api.device_controller_api", "DeviceControllerApi"), diff --git a/ce/tb_ce_client/_retry.py b/ce/tb_ce_client/_retry.py index f7c1727b..f64729df 100644 --- a/ce/tb_ce_client/_retry.py +++ b/ce/tb_ce_client/_retry.py @@ -24,6 +24,7 @@ - After exhausting retries, returns the last 429 response (no exception raised) - Drains response body before each retry to avoid connection pool exhaustion """ + import logging import random import time @@ -36,7 +37,9 @@ class _RetryingRESTClient(RESTClientObject): """RESTClientObject subclass that transparently retries HTTP 429 responses.""" - def __init__(self, configuration, max_retries: int, initial_delay_ms: int, max_delay_ms: int) -> None: + def __init__( + self, configuration, max_retries: int, initial_delay_ms: int, max_delay_ms: int + ) -> None: """ Initialise the retrying REST client. @@ -54,7 +57,9 @@ def __init__(self, configuration, max_retries: int, initial_delay_ms: int, max_d # Public API # ------------------------------------------------------------------ - def request(self, method, url, headers=None, body=None, post_params=None, _request_timeout=None): + def request( + self, method, url, headers=None, body=None, post_params=None, _request_timeout=None + ): """Make an HTTP request, retrying up to max_retries times on 429. All arguments are forwarded verbatim to RESTClientObject.request(). @@ -64,7 +69,8 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque returned — callers are responsible for inspecting the status code. """ response = super().request( - method, url, + method, + url, headers=headers, body=body, post_params=post_params, @@ -89,7 +95,8 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque time.sleep(delay_s) response = super().request( - method, url, + method, + url, headers=headers, body=body, post_params=post_params, diff --git a/ce/tb_ce_client/api/admin_controller_api.py b/ce/tb_ce_client/api/admin_controller_api.py index 79f37b2c..0fc202a7 100644 --- a/ce/tb_ce_client/api/admin_controller_api.py +++ b/ce/tb_ce_client/api/admin_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/ai_model_controller_api.py b/ce/tb_ce_client/api/ai_model_controller_api.py index 165eefb3..707c1526 100644 --- a/ce/tb_ce_client/api/ai_model_controller_api.py +++ b/ce/tb_ce_client/api/ai_model_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/alarm_comment_controller_api.py b/ce/tb_ce_client/api/alarm_comment_controller_api.py index 04783278..4223d1e8 100644 --- a/ce/tb_ce_client/api/alarm_comment_controller_api.py +++ b/ce/tb_ce_client/api/alarm_comment_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/alarm_controller_api.py b/ce/tb_ce_client/api/alarm_controller_api.py index 3ffcd8ff..753f0108 100644 --- a/ce/tb_ce_client/api/alarm_controller_api.py +++ b/ce/tb_ce_client/api/alarm_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/alarm_rule_controller_api.py b/ce/tb_ce_client/api/alarm_rule_controller_api.py index f2043441..de39bc10 100644 --- a/ce/tb_ce_client/api/alarm_rule_controller_api.py +++ b/ce/tb_ce_client/api/alarm_rule_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/api_key_controller_api.py b/ce/tb_ce_client/api/api_key_controller_api.py index 36c379fe..583cca31 100644 --- a/ce/tb_ce_client/api/api_key_controller_api.py +++ b/ce/tb_ce_client/api/api_key_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/asset_controller_api.py b/ce/tb_ce_client/api/asset_controller_api.py index bd37e165..6a43694c 100644 --- a/ce/tb_ce_client/api/asset_controller_api.py +++ b/ce/tb_ce_client/api/asset_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -4801,7 +4801,7 @@ def _get_tenant_assets_serialize( @validate_call - def process_assets_bulk_import( + def process_asset_bulk_import( self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ @@ -4817,7 +4817,7 @@ def process_assets_bulk_import( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BulkImportResultAsset: - """Import the bulk of assets (processAssetsBulkImport) + """Import the bulk of assets (processAssetBulkImport) There's an ability to import the bulk of assets using the only .csv file. @@ -4845,7 +4845,7 @@ def process_assets_bulk_import( :return: Returns the result object. """ # noqa: E501 - _param = self._process_assets_bulk_import_serialize( + _param = self._process_asset_bulk_import_serialize( bulk_import_request=bulk_import_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4873,7 +4873,7 @@ def process_assets_bulk_import( @validate_call - def process_assets_bulk_import_with_http_info( + def process_asset_bulk_import_with_http_info( self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ @@ -4889,7 +4889,7 @@ def process_assets_bulk_import_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BulkImportResultAsset]: - """Import the bulk of assets (processAssetsBulkImport) + """Import the bulk of assets (processAssetBulkImport) There's an ability to import the bulk of assets using the only .csv file. @@ -4917,7 +4917,7 @@ def process_assets_bulk_import_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._process_assets_bulk_import_serialize( + _param = self._process_asset_bulk_import_serialize( bulk_import_request=bulk_import_request, _request_auth=_request_auth, _content_type=_content_type, @@ -4945,7 +4945,7 @@ def process_assets_bulk_import_with_http_info( @validate_call - def process_assets_bulk_import_without_preload_content( + def process_asset_bulk_import_without_preload_content( self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ @@ -4961,7 +4961,7 @@ def process_assets_bulk_import_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import the bulk of assets (processAssetsBulkImport) + """Import the bulk of assets (processAssetBulkImport) There's an ability to import the bulk of assets using the only .csv file. @@ -4989,7 +4989,7 @@ def process_assets_bulk_import_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._process_assets_bulk_import_serialize( + _param = self._process_asset_bulk_import_serialize( bulk_import_request=bulk_import_request, _request_auth=_request_auth, _content_type=_content_type, @@ -5012,7 +5012,7 @@ def process_assets_bulk_import_without_preload_content( return response_data.response - def _process_assets_bulk_import_serialize( + def _process_asset_bulk_import_serialize( self, bulk_import_request, _request_auth, diff --git a/ce/tb_ce_client/api/asset_profile_controller_api.py b/ce/tb_ce_client/api/asset_profile_controller_api.py index a85c80a2..c0556713 100644 --- a/ce/tb_ce_client/api/asset_profile_controller_api.py +++ b/ce/tb_ce_client/api/asset_profile_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/audit_log_controller_api.py b/ce/tb_ce_client/api/audit_log_controller_api.py index 2500adca..9cfd0f4a 100644 --- a/ce/tb_ce_client/api/audit_log_controller_api.py +++ b/ce/tb_ce_client/api/audit_log_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/auth_controller_api.py b/ce/tb_ce_client/api/auth_controller_api.py index cfa1a5f7..38d4d5df 100644 --- a/ce/tb_ce_client/api/auth_controller_api.py +++ b/ce/tb_ce_client/api/auth_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/calculated_field_controller_api.py b/ce/tb_ce_client/api/calculated_field_controller_api.py index e629b840..6478bbd5 100644 --- a/ce/tb_ce_client/api/calculated_field_controller_api.py +++ b/ce/tb_ce_client/api/calculated_field_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/component_descriptor_controller_api.py b/ce/tb_ce_client/api/component_descriptor_controller_api.py index 7f36150e..bc6c6944 100644 --- a/ce/tb_ce_client/api/component_descriptor_controller_api.py +++ b/ce/tb_ce_client/api/component_descriptor_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/customer_controller_api.py b/ce/tb_ce_client/api/customer_controller_api.py index 3a26d46c..a7266e1c 100644 --- a/ce/tb_ce_client/api/customer_controller_api.py +++ b/ce/tb_ce_client/api/customer_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/dashboard_controller_api.py b/ce/tb_ce_client/api/dashboard_controller_api.py index e8e25038..3db622cd 100644 --- a/ce/tb_ce_client/api/dashboard_controller_api.py +++ b/ce/tb_ce_client/api/dashboard_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/device_connectivity_controller_api.py b/ce/tb_ce_client/api/device_connectivity_controller_api.py index c1fe7189..57d41ac3 100644 --- a/ce/tb_ce_client/api/device_connectivity_controller_api.py +++ b/ce/tb_ce_client/api/device_connectivity_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/device_controller_api.py b/ce/tb_ce_client/api/device_controller_api.py index 4c9e88b5..2070993d 100644 --- a/ce/tb_ce_client/api/device_controller_api.py +++ b/ce/tb_ce_client/api/device_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/device_profile_controller_api.py b/ce/tb_ce_client/api/device_profile_controller_api.py index f24ad95b..1f8aee30 100644 --- a/ce/tb_ce_client/api/device_profile_controller_api.py +++ b/ce/tb_ce_client/api/device_profile_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/domain_controller_api.py b/ce/tb_ce_client/api/domain_controller_api.py index 52b4630d..a1199ca4 100644 --- a/ce/tb_ce_client/api/domain_controller_api.py +++ b/ce/tb_ce_client/api/domain_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -612,7 +612,7 @@ def _get_domain_info_by_id_serialize( @validate_call - def get_tenant_domain_infos( + def get_domain_infos( self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], @@ -632,7 +632,7 @@ def get_tenant_domain_infos( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PageDataDomainInfo: - """Get Domain infos (getTenantDomainInfos) + """Get Domain infos (getDomainInfos) Available for users with 'SYS_ADMIN' authority. @@ -668,7 +668,7 @@ def get_tenant_domain_infos( :return: Returns the result object. """ # noqa: E501 - _param = self._get_tenant_domain_infos_serialize( + _param = self._get_domain_infos_serialize( page_size=page_size, page=page, text_search=text_search, @@ -700,7 +700,7 @@ def get_tenant_domain_infos( @validate_call - def get_tenant_domain_infos_with_http_info( + def get_domain_infos_with_http_info( self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], @@ -720,7 +720,7 @@ def get_tenant_domain_infos_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PageDataDomainInfo]: - """Get Domain infos (getTenantDomainInfos) + """Get Domain infos (getDomainInfos) Available for users with 'SYS_ADMIN' authority. @@ -756,7 +756,7 @@ def get_tenant_domain_infos_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_tenant_domain_infos_serialize( + _param = self._get_domain_infos_serialize( page_size=page_size, page=page, text_search=text_search, @@ -788,7 +788,7 @@ def get_tenant_domain_infos_with_http_info( @validate_call - def get_tenant_domain_infos_without_preload_content( + def get_domain_infos_without_preload_content( self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], @@ -808,7 +808,7 @@ def get_tenant_domain_infos_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Domain infos (getTenantDomainInfos) + """Get Domain infos (getDomainInfos) Available for users with 'SYS_ADMIN' authority. @@ -844,7 +844,7 @@ def get_tenant_domain_infos_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_tenant_domain_infos_serialize( + _param = self._get_domain_infos_serialize( page_size=page_size, page=page, text_search=text_search, @@ -871,7 +871,7 @@ def get_tenant_domain_infos_without_preload_content( return response_data.response - def _get_tenant_domain_infos_serialize( + def _get_domain_infos_serialize( self, page_size, page, diff --git a/ce/tb_ce_client/api/edge_controller_api.py b/ce/tb_ce_client/api/edge_controller_api.py index 88c0b32e..1fdd6917 100644 --- a/ce/tb_ce_client/api/edge_controller_api.py +++ b/ce/tb_ce_client/api/edge_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/edge_event_controller_api.py b/ce/tb_ce_client/api/edge_event_controller_api.py index 231fc5b1..a8efc9fb 100644 --- a/ce/tb_ce_client/api/edge_event_controller_api.py +++ b/ce/tb_ce_client/api/edge_event_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/entities_version_control_controller_api.py b/ce/tb_ce_client/api/entities_version_control_controller_api.py index edfa6be3..bb6f6b6c 100644 --- a/ce/tb_ce_client/api/entities_version_control_controller_api.py +++ b/ce/tb_ce_client/api/entities_version_control_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/entity_query_controller_api.py b/ce/tb_ce_client/api/entity_query_controller_api.py index 8d338f22..11db9a69 100644 --- a/ce/tb_ce_client/api/entity_query_controller_api.py +++ b/ce/tb_ce_client/api/entity_query_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/entity_relation_controller_api.py b/ce/tb_ce_client/api/entity_relation_controller_api.py index 1ac3d762..5ae3dafd 100644 --- a/ce/tb_ce_client/api/entity_relation_controller_api.py +++ b/ce/tb_ce_client/api/entity_relation_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/entity_view_controller_api.py b/ce/tb_ce_client/api/entity_view_controller_api.py index 1be1e011..a8f9805c 100644 --- a/ce/tb_ce_client/api/entity_view_controller_api.py +++ b/ce/tb_ce_client/api/entity_view_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/event_controller_api.py b/ce/tb_ce_client/api/event_controller_api.py index f665879b..549ccf2d 100644 --- a/ce/tb_ce_client/api/event_controller_api.py +++ b/ce/tb_ce_client/api/event_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/image_controller_api.py b/ce/tb_ce_client/api/image_controller_api.py index b5b3614c..05898ae0 100644 --- a/ce/tb_ce_client/api/image_controller_api.py +++ b/ce/tb_ce_client/api/image_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/job_controller_api.py b/ce/tb_ce_client/api/job_controller_api.py index 91fb3d0e..87545b13 100644 --- a/ce/tb_ce_client/api/job_controller_api.py +++ b/ce/tb_ce_client/api/job_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/login_endpoint_api.py b/ce/tb_ce_client/api/login_endpoint_api.py index e322e172..1cf613ef 100644 --- a/ce/tb_ce_client/api/login_endpoint_api.py +++ b/ce/tb_ce_client/api/login_endpoint_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/lwm2m_controller_api.py b/ce/tb_ce_client/api/lwm2m_controller_api.py index bbea89c1..0adcddca 100644 --- a/ce/tb_ce_client/api/lwm2m_controller_api.py +++ b/ce/tb_ce_client/api/lwm2m_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/mail_config_template_controller_api.py b/ce/tb_ce_client/api/mail_config_template_controller_api.py index 35780557..d754b5b9 100644 --- a/ce/tb_ce_client/api/mail_config_template_controller_api.py +++ b/ce/tb_ce_client/api/mail_config_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/mobile_app_bundle_controller_api.py b/ce/tb_ce_client/api/mobile_app_bundle_controller_api.py index dfa78afe..887854c9 100644 --- a/ce/tb_ce_client/api/mobile_app_bundle_controller_api.py +++ b/ce/tb_ce_client/api/mobile_app_bundle_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/mobile_app_controller_api.py b/ce/tb_ce_client/api/mobile_app_controller_api.py index dbba2315..605c84fe 100644 --- a/ce/tb_ce_client/api/mobile_app_controller_api.py +++ b/ce/tb_ce_client/api/mobile_app_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/notification_controller_api.py b/ce/tb_ce_client/api/notification_controller_api.py index 71f03e42..f070fb26 100644 --- a/ce/tb_ce_client/api/notification_controller_api.py +++ b/ce/tb_ce_client/api/notification_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/notification_rule_controller_api.py b/ce/tb_ce_client/api/notification_rule_controller_api.py index 6906ef1e..63502eca 100644 --- a/ce/tb_ce_client/api/notification_rule_controller_api.py +++ b/ce/tb_ce_client/api/notification_rule_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/notification_target_controller_api.py b/ce/tb_ce_client/api/notification_target_controller_api.py index a91bb262..f18fd504 100644 --- a/ce/tb_ce_client/api/notification_target_controller_api.py +++ b/ce/tb_ce_client/api/notification_target_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/notification_template_controller_api.py b/ce/tb_ce_client/api/notification_template_controller_api.py index 6a632621..1e1db609 100644 --- a/ce/tb_ce_client/api/notification_template_controller_api.py +++ b/ce/tb_ce_client/api/notification_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/o_auth2_config_template_controller_api.py b/ce/tb_ce_client/api/o_auth2_config_template_controller_api.py index c56c164a..5793462e 100644 --- a/ce/tb_ce_client/api/o_auth2_config_template_controller_api.py +++ b/ce/tb_ce_client/api/o_auth2_config_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/o_auth2_controller_api.py b/ce/tb_ce_client/api/o_auth2_controller_api.py index 66e9db7c..444d7dad 100644 --- a/ce/tb_ce_client/api/o_auth2_controller_api.py +++ b/ce/tb_ce_client/api/o_auth2_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -336,7 +336,7 @@ def _delete_oauth2_client_serialize( @validate_call - def find_tenant_o_auth2_client_infos( + def find_o_auth2_client_infos( self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], @@ -356,7 +356,7 @@ def find_tenant_o_auth2_client_infos( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PageDataOAuth2ClientInfo: - """Get OAuth2 Client infos (findTenantOAuth2ClientInfos) + """Get OAuth2 Client infos (findOAuth2ClientInfos) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -392,7 +392,7 @@ def find_tenant_o_auth2_client_infos( :return: Returns the result object. """ # noqa: E501 - _param = self._find_tenant_o_auth2_client_infos_serialize( + _param = self._find_o_auth2_client_infos_serialize( page_size=page_size, page=page, text_search=text_search, @@ -424,7 +424,7 @@ def find_tenant_o_auth2_client_infos( @validate_call - def find_tenant_o_auth2_client_infos_with_http_info( + def find_o_auth2_client_infos_with_http_info( self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], @@ -444,7 +444,7 @@ def find_tenant_o_auth2_client_infos_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PageDataOAuth2ClientInfo]: - """Get OAuth2 Client infos (findTenantOAuth2ClientInfos) + """Get OAuth2 Client infos (findOAuth2ClientInfos) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -480,7 +480,7 @@ def find_tenant_o_auth2_client_infos_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._find_tenant_o_auth2_client_infos_serialize( + _param = self._find_o_auth2_client_infos_serialize( page_size=page_size, page=page, text_search=text_search, @@ -512,7 +512,7 @@ def find_tenant_o_auth2_client_infos_with_http_info( @validate_call - def find_tenant_o_auth2_client_infos_without_preload_content( + def find_o_auth2_client_infos_without_preload_content( self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], @@ -532,7 +532,7 @@ def find_tenant_o_auth2_client_infos_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get OAuth2 Client infos (findTenantOAuth2ClientInfos) + """Get OAuth2 Client infos (findOAuth2ClientInfos) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. @@ -568,7 +568,7 @@ def find_tenant_o_auth2_client_infos_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._find_tenant_o_auth2_client_infos_serialize( + _param = self._find_o_auth2_client_infos_serialize( page_size=page_size, page=page, text_search=text_search, @@ -595,7 +595,7 @@ def find_tenant_o_auth2_client_infos_without_preload_content( return response_data.response - def _find_tenant_o_auth2_client_infos_serialize( + def _find_o_auth2_client_infos_serialize( self, page_size, page, diff --git a/ce/tb_ce_client/api/ota_package_controller_api.py b/ce/tb_ce_client/api/ota_package_controller_api.py index 872b3d94..80ef734f 100644 --- a/ce/tb_ce_client/api/ota_package_controller_api.py +++ b/ce/tb_ce_client/api/ota_package_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/qr_code_settings_controller_api.py b/ce/tb_ce_client/api/qr_code_settings_controller_api.py index d3e90a9b..f2101d14 100644 --- a/ce/tb_ce_client/api/qr_code_settings_controller_api.py +++ b/ce/tb_ce_client/api/qr_code_settings_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/queue_controller_api.py b/ce/tb_ce_client/api/queue_controller_api.py index 940abc01..70806d5d 100644 --- a/ce/tb_ce_client/api/queue_controller_api.py +++ b/ce/tb_ce_client/api/queue_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/queue_stats_controller_api.py b/ce/tb_ce_client/api/queue_stats_controller_api.py index 1e9914e7..04e5894d 100644 --- a/ce/tb_ce_client/api/queue_stats_controller_api.py +++ b/ce/tb_ce_client/api/queue_stats_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/rpc_v1_controller_api.py b/ce/tb_ce_client/api/rpc_v1_controller_api.py index b7631567..333b212f 100644 --- a/ce/tb_ce_client/api/rpc_v1_controller_api.py +++ b/ce/tb_ce_client/api/rpc_v1_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/rpc_v2_controller_api.py b/ce/tb_ce_client/api/rpc_v2_controller_api.py index d70937f4..96a36f36 100644 --- a/ce/tb_ce_client/api/rpc_v2_controller_api.py +++ b/ce/tb_ce_client/api/rpc_v2_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/rule_chain_controller_api.py b/ce/tb_ce_client/api/rule_chain_controller_api.py index 3207d6db..ca389628 100644 --- a/ce/tb_ce_client/api/rule_chain_controller_api.py +++ b/ce/tb_ce_client/api/rule_chain_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/rule_engine_controller_api.py b/ce/tb_ce_client/api/rule_engine_controller_api.py index 851cb079..7e01256c 100644 --- a/ce/tb_ce_client/api/rule_engine_controller_api.py +++ b/ce/tb_ce_client/api/rule_engine_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/tb_resource_controller_api.py b/ce/tb_ce_client/api/tb_resource_controller_api.py index 40b8f0b9..98e83f44 100644 --- a/ce/tb_ce_client/api/tb_resource_controller_api.py +++ b/ce/tb_ce_client/api/tb_resource_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/telemetry_controller_api.py b/ce/tb_ce_client/api/telemetry_controller_api.py index 202ee941..b1bd05f0 100644 --- a/ce/tb_ce_client/api/telemetry_controller_api.py +++ b/ce/tb_ce_client/api/telemetry_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/tenant_controller_api.py b/ce/tb_ce_client/api/tenant_controller_api.py index fa5cdc69..79c35b7e 100644 --- a/ce/tb_ce_client/api/tenant_controller_api.py +++ b/ce/tb_ce_client/api/tenant_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/tenant_profile_controller_api.py b/ce/tb_ce_client/api/tenant_profile_controller_api.py index b1b79ccb..1015a06e 100644 --- a/ce/tb_ce_client/api/tenant_profile_controller_api.py +++ b/ce/tb_ce_client/api/tenant_profile_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/trendz_controller_api.py b/ce/tb_ce_client/api/trendz_controller_api.py index 76b35f6e..6771dbf2 100644 --- a/ce/tb_ce_client/api/trendz_controller_api.py +++ b/ce/tb_ce_client/api/trendz_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/two_factor_auth_config_controller_api.py b/ce/tb_ce_client/api/two_factor_auth_config_controller_api.py index d807ef8a..a35fe3e7 100644 --- a/ce/tb_ce_client/api/two_factor_auth_config_controller_api.py +++ b/ce/tb_ce_client/api/two_factor_auth_config_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/two_factor_auth_controller_api.py b/ce/tb_ce_client/api/two_factor_auth_controller_api.py index 754f5675..b20a0b4f 100644 --- a/ce/tb_ce_client/api/two_factor_auth_controller_api.py +++ b/ce/tb_ce_client/api/two_factor_auth_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/ui_settings_controller_api.py b/ce/tb_ce_client/api/ui_settings_controller_api.py index 24320c44..b9f02bf1 100644 --- a/ce/tb_ce_client/api/ui_settings_controller_api.py +++ b/ce/tb_ce_client/api/ui_settings_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/usage_info_controller_api.py b/ce/tb_ce_client/api/usage_info_controller_api.py index 8dad8c15..ee766af0 100644 --- a/ce/tb_ce_client/api/usage_info_controller_api.py +++ b/ce/tb_ce_client/api/usage_info_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/user_controller_api.py b/ce/tb_ce_client/api/user_controller_api.py index 0560c68d..4fff5efa 100644 --- a/ce/tb_ce_client/api/user_controller_api.py +++ b/ce/tb_ce_client/api/user_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/widget_type_controller_api.py b/ce/tb_ce_client/api/widget_type_controller_api.py index 7cdb54a9..3e6c34a3 100644 --- a/ce/tb_ce_client/api/widget_type_controller_api.py +++ b/ce/tb_ce_client/api/widget_type_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api/widgets_bundle_controller_api.py b/ce/tb_ce_client/api/widgets_bundle_controller_api.py index e038e198..cfdbc49c 100644 --- a/ce/tb_ce_client/api/widgets_bundle_controller_api.py +++ b/ce/tb_ce_client/api/widgets_bundle_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/api_client.py b/ce/tb_ce_client/api_client.py index 1fa35fa4..a92abf02 100644 --- a/ce/tb_ce_client/api_client.py +++ b/ce/tb_ce_client/api_client.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/ce/tb_ce_client/client.pyi b/ce/tb_ce_client/client.pyi index eb38c579..68adf76d 100644 --- a/ce/tb_ce_client/client.pyi +++ b/ce/tb_ce_client/client.pyi @@ -430,10 +430,10 @@ class ThingsboardClient: def get_tenant_assets_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], type: Annotated[Optional[StrictStr], Field(description="Asset type")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the asset name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataAsset]: ... def get_tenant_assets_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], type: Annotated[Optional[StrictStr], Field(description="Asset type")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the asset name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_tenant_assets_serialize(self, page_size, page, type, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def process_assets_bulk_import(self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> BulkImportResultAsset: ... - def process_assets_bulk_import_with_http_info(self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[BulkImportResultAsset]: ... - def process_assets_bulk_import_without_preload_content(self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _process_assets_bulk_import_serialize(self, bulk_import_request, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def process_asset_bulk_import(self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> BulkImportResultAsset: ... + def process_asset_bulk_import_with_http_info(self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[BulkImportResultAsset]: ... + def process_asset_bulk_import_without_preload_content(self, bulk_import_request: BulkImportRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _process_asset_bulk_import_serialize(self, bulk_import_request, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def save_asset(self, asset: Annotated[Asset, Field(description="A JSON value representing the asset.")], name_conflict_policy: Annotated[Optional[Any], Field(description="Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")] = ..., uniquify_separator: Annotated[Optional[StrictStr], Field(description="Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.")] = ..., uniquify_strategy: Annotated[Optional[Any], Field(description="Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> Asset: ... def save_asset_with_http_info(self, asset: Annotated[Asset, Field(description="A JSON value representing the asset.")], name_conflict_policy: Annotated[Optional[Any], Field(description="Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")] = ..., uniquify_separator: Annotated[Optional[StrictStr], Field(description="Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.")] = ..., uniquify_strategy: Annotated[Optional[Any], Field(description="Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[Asset]: ... def save_asset_without_preload_content(self, asset: Annotated[Asset, Field(description="A JSON value representing the asset.")], name_conflict_policy: Annotated[Optional[Any], Field(description="Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.")] = ..., uniquify_separator: Annotated[Optional[StrictStr], Field(description="Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.")] = ..., uniquify_strategy: Annotated[Optional[Any], Field(description="Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... @@ -926,10 +926,10 @@ class ThingsboardClient: def get_domain_info_by_id_with_http_info(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[DomainInfo]: ... def get_domain_info_by_id_without_preload_content(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_domain_info_by_id_serialize(self, id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_tenant_domain_infos(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on domain's name")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataDomainInfo: ... - def get_tenant_domain_infos_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on domain's name")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataDomainInfo]: ... - def get_tenant_domain_infos_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on domain's name")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _get_tenant_domain_infos_serialize(self, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_domain_infos(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on domain's name")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataDomainInfo: ... + def get_domain_infos_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on domain's name")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataDomainInfo]: ... + def get_domain_infos_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on domain's name")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_domain_infos_serialize(self, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def save_domain(self, domain: Domain, oauth2_client_ids: Annotated[Optional[List[StrictStr]], Field(description="A list of oauth2 client registration ids, separated by comma ','")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> Domain: ... def save_domain_with_http_info(self, domain: Domain, oauth2_client_ids: Annotated[Optional[List[StrictStr]], Field(description="A list of oauth2 client registration ids, separated by comma ','")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[Domain]: ... def save_domain_without_preload_content(self, domain: Domain, oauth2_client_ids: Annotated[Optional[List[StrictStr]], Field(description="A list of oauth2 client registration ids, separated by comma ','")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... @@ -1606,10 +1606,10 @@ class ThingsboardClient: def delete_oauth2_client_with_http_info(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... def delete_oauth2_client_without_preload_content(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _delete_oauth2_client_serialize(self, id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def find_tenant_o_auth2_client_infos(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on client's title")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataOAuth2ClientInfo: ... - def find_tenant_o_auth2_client_infos_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on client's title")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataOAuth2ClientInfo]: ... - def find_tenant_o_auth2_client_infos_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on client's title")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _find_tenant_o_auth2_client_infos_serialize(self, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def find_o_auth2_client_infos(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on client's title")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataOAuth2ClientInfo: ... + def find_o_auth2_client_infos_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on client's title")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataOAuth2ClientInfo]: ... + def find_o_auth2_client_infos_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="Case-insensitive 'substring' filter based on client's title")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _find_o_auth2_client_infos_serialize(self, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def find_tenant_o_auth2_client_infos_by_ids(self, client_ids: Annotated[List[StrictStr], Field(description="A list of oauth2 ids, separated by comma ','")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> List[OAuth2ClientInfo]: ... def find_tenant_o_auth2_client_infos_by_ids_with_http_info(self, client_ids: Annotated[List[StrictStr], Field(description="A list of oauth2 ids, separated by comma ','")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[List[OAuth2ClientInfo]]: ... def find_tenant_o_auth2_client_infos_by_ids_without_preload_content(self, client_ids: Annotated[List[StrictStr], Field(description="A list of oauth2 ids, separated by comma ','")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... diff --git a/ce/tb_ce_client/configuration.py b/ce/tb_ce_client/configuration.py index 35d6a7cc..5993b6a0 100644 --- a/ce/tb_ce_client/configuration.py +++ b/ce/tb_ce_client/configuration.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -549,7 +549,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 4.3.1.2-SNAPSHOT\n"\ + "Version of the API: 4.3.1.2\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/ce/tb_ce_client/exceptions.py b/ce/tb_ce_client/exceptions.py index 43078f93..df4aaa2f 100644 --- a/ce/tb_ce_client/exceptions.py +++ b/ce/tb_ce_client/exceptions.py @@ -18,7 +18,7 @@ ThingsBoard open-source IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2 Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/paas/docs/AiChatModelConfigObject.md b/paas/docs/AiChatModelConfig.md similarity index 71% rename from paas/docs/AiChatModelConfigObject.md rename to paas/docs/AiChatModelConfig.md index f06e9ed5..bfcd886e 100644 --- a/paas/docs/AiChatModelConfigObject.md +++ b/paas/docs/AiChatModelConfig.md @@ -1,13 +1,13 @@ -# AiChatModelConfigObject +# AiChatModelConfig -`tb_paas_client.models.AiChatModelConfigObject` +`tb_paas_client.models.AiChatModelConfig` ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] | @@ -23,6 +23,6 @@ - **Package:** `tb_paas_client.models` - **Attribute access:** `obj.model_type`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AiChatModelConfigObject.model_validate(data)` or `AiChatModelConfigObject.model_validate_json(json_str)` +- **Deserialize:** `AiChatModelConfig.model_validate(data)` or `AiChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AiModel.md b/paas/docs/AiModel.md index b8d131d5..a00ebfb7 100644 --- a/paas/docs/AiModel.md +++ b/paas/docs/AiModel.md @@ -9,8 +9,8 @@ |------------ | ------------- | ------------- | -------------| | **id** | [**AiModelId**](AiModelId.md) | | [optional] | | **created_time** | **int** | Entity creation timestamp in milliseconds since Unix epoch | [optional] [readonly] | -| **tenant_id** | [**TenantId**](TenantId.md) | JSON object representing the ID of the tenant associated with this AI model | [readonly] | -| **version** | **int** | Version of the AI model record; increments automatically whenever the record is changed | [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | JSON object representing the ID of the tenant associated with this AI model | [optional] [readonly] | +| **version** | **int** | Version of the AI model record; increments automatically whenever the record is changed | [optional] [readonly] | | **name** | **str** | Display name for this AI model configuration; not the technical model identifier | | | **configuration** | [**AiModelConfig**](AiModelConfig.md) | Configuration of the AI model | [optional] | @@ -28,7 +28,6 @@ #### AmazonBedrockChatModelConfig *(extends AiModelConfig, provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AmazonBedrockProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -36,11 +35,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(extends AiModelConfig, provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AnthropicProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -49,11 +48,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(extends AiModelConfig, provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AzureOpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -63,11 +62,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(extends AiModelConfig, provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GitHubModelsProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -77,11 +76,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -92,11 +91,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleVertexAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -107,11 +106,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(extends AiModelConfig, provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | MistralAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -121,11 +120,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(extends AiModelConfig, provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OllamaProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -135,11 +134,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(extends AiModelConfig, provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -149,19 +148,20 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | base_url | str | | [optional] | | api_key | str | | [optional] | +#### AiModelType (enum) +`CHAT` + #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/paas/docs/AiModelConfig.md b/paas/docs/AiModelConfig.md index dd10dee5..9343d84e 100644 --- a/paas/docs/AiModelConfig.md +++ b/paas/docs/AiModelConfig.md @@ -18,7 +18,6 @@ Root configuration for AI models #### AmazonBedrockChatModelConfig *(provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AmazonBedrockProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -26,11 +25,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AnthropicProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -39,11 +38,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AzureOpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -53,11 +52,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GitHubModelsProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -67,11 +66,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -82,11 +81,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleVertexAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -97,11 +96,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | MistralAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -111,11 +110,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OllamaProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -125,11 +124,11 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -139,12 +138,10 @@ Root configuration for AI models | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | ## Referenced Types -#### AiModelType (enum) -`CHAT` - #### AmazonBedrockProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -152,6 +149,9 @@ Root configuration for AI models | access_key_id | str | | | | secret_access_key | str | | | +#### AiModelType (enum) +`CHAT` + #### AnthropicProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/paas/docs/AiModelExportData.md b/paas/docs/AiModelExportData.md index 3a811ae7..ff646b71 100644 --- a/paas/docs/AiModelExportData.md +++ b/paas/docs/AiModelExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/AiSolutionControllerApi.md b/paas/docs/AiSolutionControllerApi.md index 631e5291..41c5bf18 100644 --- a/paas/docs/AiSolutionControllerApi.md +++ b/paas/docs/AiSolutionControllerApi.md @@ -7,10 +7,8 @@ object client.chat(solution_id: UUID, step: SolutionStep, body: str) # chat None client.clear_step(solution_id: UUID, step: SolutionStep) # clearStep object client.create_solution(solution_id: UUID) # createSolution None client.delete_solution(solution_id: UUID) # deleteSolution -object client.export_solution(solution_id: UUID) # exportSolution object client.get_solution(solution_id: UUID) # getSolution object client.get_solutions() # getSolutions -object client.import_solution(body: object) # importSolution object client.install_solution(solution_id: UUID, x_authorization: str) # installSolution object client.start_new() # startNew object client.uninstall_solution(solution_id: UUID, x_authorization: str) # uninstallSolution @@ -109,28 +107,6 @@ deleteSolution None (empty response body) -## export_solution - -```python -object client.export_solution(solution_id: UUID) -``` - -**GET** `/api/ai/solution/{solutionId}/export` - -exportSolution - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **solution_id** | **UUID** | | | - -### Return type - -**object** - - ## get_solution ```python @@ -168,28 +144,6 @@ getSolutions **object** -## import_solution - -```python -object client.import_solution(body: object) -``` - -**POST** `/api/ai/solution/import` - -importSolution - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **body** | **object** | | | - -### Return type - -**object** - - ## install_solution ```python diff --git a/paas/docs/AlarmCalculatedFieldConfiguration.md b/paas/docs/AlarmCalculatedFieldConfiguration.md index 5a7c772b..9824b4d1 100644 --- a/paas/docs/AlarmCalculatedFieldConfiguration.md +++ b/paas/docs/AlarmCalculatedFieldConfiguration.md @@ -10,13 +10,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **arguments** | [**Dict[str, Argument]**](Argument.md) | | | -| **clear_rule** | [**AlarmRuleDefinition**](AlarmRuleDefinition.md) | | [optional] | -| **create_rules** | [**Dict[str, AlarmRuleDefinition]**](AlarmRuleDefinition.md) | | | +| **create_rules** | [**Dict[str, AlarmRule]**](AlarmRule.md) | | | +| **clear_rule** | [**AlarmRule**](AlarmRule.md) | | [optional] | | **propagate** | **bool** | | [optional] | -| **propagate_relation_types** | **List[str]** | | [optional] | | **propagate_to_owner** | **bool** | | [optional] | | **propagate_to_owner_hierarchy** | **bool** | | [optional] | | **propagate_to_tenant** | **bool** | | [optional] | +| **propagate_relation_types** | **List[str]** | | [optional] | @@ -27,8 +27,8 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### Argument | Name | Type | Description | Notes | @@ -40,19 +40,19 @@ | limit | int | | [optional] | | time_window | int | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -86,26 +86,26 @@ | type | ArgumentType | | [optional] | | scope | AttributeScope | | [optional] | -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AttributeScope (enum) `CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` @@ -124,19 +124,19 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | #### TimeSeriesOutputStrategy | Name | Type | Description | Notes | @@ -178,27 +178,27 @@ | direction | EntitySearchDirection | | | | relation_type | str | | | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -218,17 +218,20 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -237,46 +240,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -285,7 +285,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -294,7 +294,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/AlarmCondition.md b/paas/docs/AlarmCondition.md index 573ec355..7d72b19c 100644 --- a/paas/docs/AlarmCondition.md +++ b/paas/docs/AlarmCondition.md @@ -7,181 +7,180 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **condition** | [**List[AlarmConditionFilter]**](AlarmConditionFilter.md) | | [optional] | -| **spec** | [**AlarmConditionSpec**](AlarmConditionSpec.md) | JSON object representing alarm condition type | [optional] | +| **expression** | [**AlarmConditionExpression**](AlarmConditionExpression.md) | | | +| **schedule** | [**AlarmConditionValueAlarmSchedule**](AlarmConditionValueAlarmSchedule.md) | | [optional] | +| **type** | **str** | | | -## Referenced Types +## Subtypes -#### AlarmConditionFilter +#### DurationAlarmCondition *(type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| value_type | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | object | | [optional] | +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | -#### AlarmConditionSpec +#### RepeatingAlarmCondition *(type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### SimpleAlarmCondition *(type=`SIMPLE`)* +*(no additional properties)* + +## Referenced Types + +#### AlarmConditionExpression | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | +| expression | str | | | -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* +#### AlarmConditionValueAlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` -#### AlarmConditionFilterKey +#### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### KeyFilterPredicate +#### AlarmConditionValueInteger | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | +| type | str | | | -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* + +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | +| timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | +| timezone | str | | [optional] | +| days_of_week | List[int] | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignore_case | bool | | [optional] | +| argument | str | | | +| value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` -#### FilterPredicateValueLong +#### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | +| type | str | | | -#### FilterPredicateValueInteger +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | -#### FilterPredicateValueString +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### FilterPredicateValueDouble +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | -#### FilterPredicateValueBoolean +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### DynamicValueInteger +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| enabled | bool | | [optional] | +| day_of_week | int | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### AlarmRuleStringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` -#### DynamicValueString +#### AlarmConditionValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| static_value | str | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### DynamicValueDouble +#### AlarmRuleNumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| static_value | float | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### DynamicValueBoolean +#### AlarmRuleBooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` +| static_value | bool | | [optional] | +| dynamic_value_argument | str | | [optional] | --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.condition`, `obj.name`, etc. +- **Attribute access:** `obj.expression`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AlarmCondition.model_validate(data)` or `AlarmCondition.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmConditionExpression.md b/paas/docs/AlarmConditionExpression.md index e68c9646..355903c6 100644 --- a/paas/docs/AlarmConditionExpression.md +++ b/paas/docs/AlarmConditionExpression.md @@ -16,8 +16,8 @@ #### SimpleAlarmConditionExpression *(type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(type=`TBEL`)* | Name | Type | Description | Notes | @@ -26,17 +26,20 @@ ## Referenced Types -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -45,38 +48,35 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -85,7 +85,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -94,7 +94,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -103,15 +103,15 @@ | static_value | bool | | [optional] | | dynamic_value_argument | str | | [optional] | +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + #### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - --- ### Conventions diff --git a/paas/docs/AlarmConditionFilter.md b/paas/docs/AlarmConditionFilter.md index e65bfbaa..d6708e4e 100644 --- a/paas/docs/AlarmConditionFilter.md +++ b/paas/docs/AlarmConditionFilter.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **value_type** | [**EntityKeyValueType**](EntityKeyValueType.md) | String representation of the type of the value | [optional] | -| **key** | [**AlarmConditionFilterKey**](AlarmConditionFilterKey.md) | JSON object for specifying alarm condition by specific key | [optional] | -| **predicate** | [**KeyFilterPredicate**](KeyFilterPredicate.md) | JSON object representing filter condition | [optional] | -| **value** | **object** | | [optional] | +| **argument** | **str** | | | +| **value_type** | [**EntityKeyValueType**](EntityKeyValueType.md) | | | +| **operation** | [**AlarmRuleComplexOperation**](AlarmRuleComplexOperation.md) | | [optional] | +| **predicates** | [**List[AlarmRuleKeyFilterPredicate]**](AlarmRuleKeyFilterPredicate.md) | | | @@ -19,111 +19,87 @@ #### EntityKeyValueType (enum) `STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` -#### AlarmConditionFilterKey +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` + +#### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | +| type | str | | | -#### KeyFilterPredicate +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | | ignore_case | bool | | [optional] | -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` -#### FilterPredicateValueString +#### AlarmConditionValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | +| static_value | str | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` -#### FilterPredicateValueDouble +#### AlarmConditionValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | +| static_value | float | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` -#### FilterPredicateValueBoolean +#### AlarmConditionValueBoolean | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | +| static_value | bool | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### ComplexOperation (enum) -`AND` | `OR` +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` -#### DynamicValueString +#### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.value_type`, `obj.name`, etc. +- **Attribute access:** `obj.argument`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AlarmConditionFilter.model_validate(data)` or `AlarmConditionFilter.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmConditionFilterKey.md b/paas/docs/AlarmConditionFilterKey.md deleted file mode 100644 index 82df976d..00000000 --- a/paas/docs/AlarmConditionFilterKey.md +++ /dev/null @@ -1,29 +0,0 @@ - -# AlarmConditionFilterKey - -`tb_paas_client.models.AlarmConditionFilterKey` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **type** | [**AlarmConditionKeyType**](AlarmConditionKeyType.md) | The key type | [optional] | -| **key** | **str** | String value representing the key | [optional] | - - - -## Referenced Types - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.type`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmConditionFilterKey.model_validate(data)` or `AlarmConditionFilterKey.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmConditionKeyType.md b/paas/docs/AlarmConditionKeyType.md deleted file mode 100644 index 21063a57..00000000 --- a/paas/docs/AlarmConditionKeyType.md +++ /dev/null @@ -1,28 +0,0 @@ - -# AlarmConditionKeyType - -`tb_paas_client.models.AlarmConditionKeyType` - -## Enum Values - - -* `ATTRIBUTE` (value: `'ATTRIBUTE'`) - -* `TIME_SERIES` (value: `'TIME_SERIES'`) - -* `ENTITY_FIELD` (value: `'ENTITY_FIELD'`) - -* `CONSTANT` (value: `'CONSTANT'`) - - - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmConditionKeyType.model_validate(data)` or `AlarmConditionKeyType.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmConditionSpec.md b/paas/docs/AlarmConditionSpec.md deleted file mode 100644 index 5ee26f79..00000000 --- a/paas/docs/AlarmConditionSpec.md +++ /dev/null @@ -1,79 +0,0 @@ - -# AlarmConditionSpec - -`tb_paas_client.models.AlarmConditionSpec` - -Specification for alarm conditions - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **type** | **str** | | | - - - -## Subtypes - -#### DurationAlarmConditionSpec *(type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(type=`SIMPLE`)* -*(no additional properties)* - -## Referenced Types - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.type`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmConditionSpec.model_validate(data)` or `AlarmConditionSpec.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmConditionValueAlarmRuleSchedule.md b/paas/docs/AlarmConditionValueAlarmSchedule.md similarity index 57% rename from paas/docs/AlarmConditionValueAlarmRuleSchedule.md rename to paas/docs/AlarmConditionValueAlarmSchedule.md index 95250918..6723a298 100644 --- a/paas/docs/AlarmConditionValueAlarmRuleSchedule.md +++ b/paas/docs/AlarmConditionValueAlarmSchedule.md @@ -1,56 +1,56 @@ -# AlarmConditionValueAlarmRuleSchedule +# AlarmConditionValueAlarmSchedule -`tb_paas_client.models.AlarmConditionValueAlarmRuleSchedule` +`tb_paas_client.models.AlarmConditionValueAlarmSchedule` ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **static_value** | [**AlarmSchedule**](AlarmSchedule.md) | | [optional] | | **dynamic_value_argument** | **str** | | [optional] | -| **static_value** | [**AlarmRuleSchedule**](AlarmRuleSchedule.md) | | [optional] | ## Referenced Types -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.dynamic_value_argument`, `obj.name`, etc. +- **Attribute access:** `obj.static_value`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmConditionValueAlarmRuleSchedule.model_validate(data)` or `AlarmConditionValueAlarmRuleSchedule.model_validate_json(json_str)` +- **Deserialize:** `AlarmConditionValueAlarmSchedule.model_validate(data)` or `AlarmConditionValueAlarmSchedule.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmRule.md b/paas/docs/AlarmRule.md index 2daff294..b2a1f880 100644 --- a/paas/docs/AlarmRule.md +++ b/paas/docs/AlarmRule.md @@ -7,10 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **condition** | [**AlarmCondition**](AlarmCondition.md) | JSON object representing the alarm rule condition | [optional] | -| **alarm_details** | **str** | String value representing the additional details for an alarm rule | [optional] | -| **dashboard_id** | [**DashboardId**](DashboardId.md) | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| **schedule** | [**AlarmSchedule**](AlarmSchedule.md) | JSON object representing time interval during which the rule is active | [optional] | +| **condition** | [**AlarmCondition**](AlarmCondition.md) | | | +| **alarm_details** | **str** | | [optional] | +| **dashboard_id** | [**DashboardId**](DashboardId.md) | | [optional] | @@ -21,14 +20,50 @@ #### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| -| condition | List[AlarmConditionFilter] | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | +| type | str | | | + +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | str | | | + +#### AlarmConditionValueAlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | +| dynamic_value_argument | str | | [optional] | #### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | +| type | str | | | #### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* *See AlarmSchedule for properties.* @@ -42,186 +77,113 @@ #### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | - -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| value_type | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | object | | [optional] | +| ends_on | int | | [optional] | -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* +#### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* +#### AlarmConditionValueInteger | Name | Type | Description | Notes | |------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### DynamicValueString +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| argument | str | | | +| value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` #### EntityKeyValueType (enum) `STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` -#### AlarmConditionFilterKey +#### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | +| type | str | | | -#### KeyFilterPredicate +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | | ignore_case | bool | | [optional] | -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - #### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` -#### FilterPredicateValueString +#### AlarmConditionValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | +| static_value | str | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` -#### FilterPredicateValueDouble +#### AlarmConditionValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | +| static_value | float | | [optional] | +| dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueBoolean +#### AlarmConditionValueBoolean | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| static_value | bool | | [optional] | +| dynamic_value_argument | str | | [optional] | --- diff --git a/paas/docs/AlarmRuleAnyTimeSchedule.md b/paas/docs/AlarmRuleAnyTimeSchedule.md deleted file mode 100644 index f54dd019..00000000 --- a/paas/docs/AlarmRuleAnyTimeSchedule.md +++ /dev/null @@ -1,31 +0,0 @@ - -# AlarmRuleAnyTimeSchedule - -`tb_paas_client.models.AlarmRuleAnyTimeSchedule` - -**Extends:** **AlarmRuleSchedule** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - -## Referenced Types - -#### AlarmRuleSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleAnyTimeSchedule.model_validate(data)` or `AlarmRuleAnyTimeSchedule.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleBooleanFilterPredicate.md b/paas/docs/AlarmRuleBooleanFilterPredicate.md index 8fc783db..0b129008 100644 --- a/paas/docs/AlarmRuleBooleanFilterPredicate.md +++ b/paas/docs/AlarmRuleBooleanFilterPredicate.md @@ -9,7 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **operation** | [**BooleanOperation**](BooleanOperation.md) | | | +| **operation** | [**AlarmRuleBooleanOperation**](AlarmRuleBooleanOperation.md) | | | | **value** | [**AlarmConditionValueBoolean**](AlarmConditionValueBoolean.md) | | | @@ -21,7 +21,7 @@ |------|------|-------------|-------| | type | str | | | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/AlarmScheduleType.md b/paas/docs/AlarmRuleBooleanOperation.md similarity index 53% rename from paas/docs/AlarmScheduleType.md rename to paas/docs/AlarmRuleBooleanOperation.md index 64771059..64cc4857 100644 --- a/paas/docs/AlarmScheduleType.md +++ b/paas/docs/AlarmRuleBooleanOperation.md @@ -1,16 +1,14 @@ -# AlarmScheduleType +# AlarmRuleBooleanOperation -`tb_paas_client.models.AlarmScheduleType` +`tb_paas_client.models.AlarmRuleBooleanOperation` ## Enum Values -* `ANY_TIME` (value: `'ANY_TIME'`) +* `EQUAL` (value: `'EQUAL'`) -* `SPECIFIC_TIME` (value: `'SPECIFIC_TIME'`) - -* `CUSTOM` (value: `'CUSTOM'`) +* `NOT_EQUAL` (value: `'NOT_EQUAL'`) @@ -21,6 +19,6 @@ - **Package:** `tb_paas_client.models` - **Attribute access:** `obj.`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmScheduleType.model_validate(data)` or `AlarmScheduleType.model_validate_json(json_str)` +- **Deserialize:** `AlarmRuleBooleanOperation.model_validate(data)` or `AlarmRuleBooleanOperation.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmRuleComplexFilterPredicate.md b/paas/docs/AlarmRuleComplexFilterPredicate.md index 03df8b0f..99e95cdb 100644 --- a/paas/docs/AlarmRuleComplexFilterPredicate.md +++ b/paas/docs/AlarmRuleComplexFilterPredicate.md @@ -9,7 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **operation** | [**ComplexOperation**](ComplexOperation.md) | | [optional] | +| **operation** | [**AlarmRuleComplexOperation**](AlarmRuleComplexOperation.md) | | [optional] | | **predicates** | [**List[AlarmRuleKeyFilterPredicate]**](AlarmRuleKeyFilterPredicate.md) | | [optional] | @@ -21,7 +21,7 @@ |------|------|-------------|-------| | type | str | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` --- diff --git a/paas/docs/AlarmRuleComplexOperation.md b/paas/docs/AlarmRuleComplexOperation.md new file mode 100644 index 00000000..cfb0b91c --- /dev/null +++ b/paas/docs/AlarmRuleComplexOperation.md @@ -0,0 +1,24 @@ + +# AlarmRuleComplexOperation + +`tb_paas_client.models.AlarmRuleComplexOperation` + +## Enum Values + + +* `AND` (value: `'AND'`) + +* `OR` (value: `'OR'`) + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `AlarmRuleComplexOperation.model_validate(data)` or `AlarmRuleComplexOperation.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/AlarmRuleCondition.md b/paas/docs/AlarmRuleCondition.md deleted file mode 100644 index 6a3879d3..00000000 --- a/paas/docs/AlarmRuleCondition.md +++ /dev/null @@ -1,187 +0,0 @@ - -# AlarmRuleCondition - -`tb_paas_client.models.AlarmRuleCondition` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **expression** | [**AlarmConditionExpression**](AlarmConditionExpression.md) | | | -| **schedule** | [**AlarmConditionValueAlarmRuleSchedule**](AlarmConditionValueAlarmRuleSchedule.md) | | [optional] | -| **type** | **str** | | | - - - -## Subtypes - -#### AlarmRuleDurationCondition *(type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | | | -| value | AlarmConditionValueLong | | | - -#### AlarmRuleRepeatingCondition *(type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| count | AlarmConditionValueInteger | | | - -#### AlarmRuleSimpleCondition *(type=`SIMPLE`)* -*(no additional properties)* - -## Referenced Types - -#### AlarmConditionExpression -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | - -#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| expression | str | | | - -#### AlarmConditionValueAlarmRuleSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### AlarmConditionValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | int | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### AlarmConditionValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | int | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### AlarmRuleSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* - -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | -| timezone | str | | [optional] | - -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | -| timezone | str | | [optional] | - -#### AlarmRuleConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | -| value_type | EntityKeyValueType | | | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### AlarmRuleKeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | | -| value | AlarmConditionValueBoolean | | | - -#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | - -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | -| unit | TimeUnit | | | - -#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | | -| value | AlarmConditionValueDouble | | | - -#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | -| value | AlarmConditionValueString | | | - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### AlarmConditionValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | str | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### AlarmConditionValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | float | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### AlarmConditionValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | bool | | [optional] | -| dynamic_value_argument | str | | [optional] | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.expression`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleCondition.model_validate(data)` or `AlarmRuleCondition.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleConditionFilter.md b/paas/docs/AlarmRuleConditionFilter.md deleted file mode 100644 index 90a6d7b8..00000000 --- a/paas/docs/AlarmRuleConditionFilter.md +++ /dev/null @@ -1,106 +0,0 @@ - -# AlarmRuleConditionFilter - -`tb_paas_client.models.AlarmRuleConditionFilter` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **argument** | **str** | | | -| **operation** | [**ComplexOperation**](ComplexOperation.md) | | [optional] | -| **predicates** | [**List[AlarmRuleKeyFilterPredicate]**](AlarmRuleKeyFilterPredicate.md) | | | -| **value_type** | [**EntityKeyValueType**](EntityKeyValueType.md) | | | - - - -## Referenced Types - -#### ComplexOperation (enum) -`AND` | `OR` - -#### AlarmRuleKeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | | -| value | AlarmConditionValueBoolean | | | - -#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | - -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | -| unit | TimeUnit | | | - -#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | | -| value | AlarmConditionValueDouble | | | - -#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | -| value | AlarmConditionValueString | | | - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### AlarmConditionValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | str | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### AlarmConditionValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | float | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### AlarmConditionValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | bool | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### AlarmConditionValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| static_value | int | | [optional] | -| dynamic_value_argument | str | | [optional] | - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.argument`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleConditionFilter.model_validate(data)` or `AlarmRuleConditionFilter.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleControllerApi.md b/paas/docs/AlarmRuleControllerApi.md new file mode 100644 index 00000000..b4d5315d --- /dev/null +++ b/paas/docs/AlarmRuleControllerApi.md @@ -0,0 +1,222 @@ +# AlarmRuleControllerApi + +`ThingsboardClient` methods: + +```python +None client.delete_alarm_rule(alarm_rule_id: str) # Delete Alarm Rule (deleteAlarmRule) +AlarmRuleDefinition client.get_alarm_rule_by_id(alarm_rule_id: str) # Get Alarm Rule (getAlarmRuleById) +PageDataString client.get_alarm_rule_names(page_size: int, page: int, text_search: Optional[str] = None, sort_order: Optional[str] = None) # Get alarm rule names (getAlarmRuleNames) +PageDataAlarmRuleDefinitionInfo client.get_alarm_rules(page_size: int, page: int, entity_type: Optional[EntityType] = None, entities: Optional[List[UUID]] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get alarm rules (getAlarmRules) +PageDataAlarmRuleDefinition client.get_alarm_rules_by_entity_id(entity_type: str, entity_id: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) +object client.get_latest_alarm_rule_debug_event(alarm_rule_id: str) # Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) +AlarmRuleDefinition client.save_alarm_rule(alarm_rule_definition: AlarmRuleDefinition) # Create Or Update Alarm Rule (saveAlarmRule) +object client.test_alarm_rule_script(body: object) # Test alarm rule TBEL expression (testAlarmRuleScript) +``` + + +## delete_alarm_rule + +```python +None client.delete_alarm_rule(alarm_rule_id: str) +``` + +**DELETE** `/api/alarm/rule/{alarmRuleId}` + +Delete Alarm Rule (deleteAlarmRule) + +Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarm_rule_id** | **str** | | | + +### Return type + +None (empty response body) + + +## get_alarm_rule_by_id + +```python +AlarmRuleDefinition client.get_alarm_rule_by_id(alarm_rule_id: str) +``` + +**GET** `/api/alarm/rule/{alarmRuleId}` + +Get Alarm Rule (getAlarmRuleById) + +Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarm_rule_id** | **str** | | | + +### Return type + +**AlarmRuleDefinition** + + +## get_alarm_rule_names + +```python +PageDataString client.get_alarm_rule_names(page_size: int, page: int, text_search: Optional[str] = None, sort_order: Optional[str] = None) +``` + +**GET** `/api/alarm/rules/names` + +Get alarm rule names (getAlarmRuleNames) + +Fetch the list of alarm rule names. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page_size** | **int** | Maximum amount of entities in a one page | | +| **page** | **int** | Sequence number of page starting from 0 | | +| **text_search** | **str** | The case insensitive 'substring' filter based on the calculated field name. | [optional] | +| **sort_order** | **str** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | + +### Return type + +**PageDataString** + + +## get_alarm_rules + +```python +PageDataAlarmRuleDefinitionInfo client.get_alarm_rules(page_size: int, page: int, entity_type: Optional[EntityType] = None, entities: Optional[List[UUID]] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) +``` + +**GET** `/api/alarm/rules` + +Get alarm rules (getAlarmRules) + +Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **page_size** | **int** | Maximum amount of entities in a one page | | +| **page** | **int** | Sequence number of page starting from 0 | | +| **entity_type** | **EntityType** | Entity type filter. If not specified, alarm rules for all supported entity types will be returned. | [optional] [enum: TENANT, CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, ALARM, ENTITY_GROUP, CONVERTER, INTEGRATION, RULE_CHAIN, RULE_NODE, SCHEDULER_EVENT, BLOB_ENTITY, REPORT_TEMPLATE, REPORT, ENTITY_VIEW, WIDGETS_BUNDLE, WIDGET_TYPE, ROLE, GROUP_PERMISSION, TENANT_PROFILE, DEVICE_PROFILE, ASSET_PROFILE, API_USAGE_STATE, TB_RESOURCE, OTA_PACKAGE, EDGE, RPC, QUEUE, NOTIFICATION_TARGET, NOTIFICATION_TEMPLATE, NOTIFICATION_REQUEST, NOTIFICATION, NOTIFICATION_RULE, QUEUE_STATS, OAUTH2_CLIENT, DOMAIN, MOBILE_APP, MOBILE_APP_BUNDLE, CALCULATED_FIELD, JOB, SECRET, ADMIN_SETTINGS, AI_MODEL, API_KEY, BILLING_CUSTOMER, SUBSCRIPTION_PLAN, SUBSCRIPTION, COUPON, PRODUCT, SUBSCRIPTION_ADDON] | +| **entities** | **List[UUID]** | Entities filter. If not specified, alarm rules for entity type filter will be returned. | [optional] | +| **text_search** | **str** | The case insensitive 'substring' filter based on the calculated field name. | [optional] | +| **sort_property** | **str** | Property of entity to sort by | [optional] [enum: createdTime, name] | +| **sort_order** | **str** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | + +### Return type + +**PageDataAlarmRuleDefinitionInfo** + + +## get_alarm_rules_by_entity_id + +```python +PageDataAlarmRuleDefinition client.get_alarm_rules_by_entity_id(entity_type: str, entity_id: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) +``` + +**GET** `/api/alarm/rules/{entityType}/{entityId}` + +Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) + +Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **entity_type** | **str** | A string value representing the entity type. For example, 'DEVICE' | | +| **entity_id** | **str** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | +| **page_size** | **int** | Maximum amount of entities in a one page | | +| **page** | **int** | Sequence number of page starting from 0 | | +| **text_search** | **str** | The case insensitive 'substring' filter based on the calculated field name. | [optional] | +| **sort_property** | **str** | Property of entity to sort by | [optional] [enum: createdTime, name] | +| **sort_order** | **str** | Sort order. ASC (ASCENDING) or DESC (DESCENDING) | [optional] [enum: ASC, DESC] | + +### Return type + +**PageDataAlarmRuleDefinition** + + +## get_latest_alarm_rule_debug_event + +```python +object client.get_latest_alarm_rule_debug_event(alarm_rule_id: str) +``` + +**GET** `/api/alarm/rule/{alarmRuleId}/debug` + +Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) + +Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarm_rule_id** | **str** | | | + +### Return type + +**object** + + +## save_alarm_rule + +```python +AlarmRuleDefinition client.save_alarm_rule(alarm_rule_definition: AlarmRuleDefinition) +``` + +**POST** `/api/alarm/rule` + +Create Or Update Alarm Rule (saveAlarmRule) + +Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **alarm_rule_definition** | **AlarmRuleDefinition** | A JSON value representing the alarm rule. | | + +### Return type + +**AlarmRuleDefinition** + + +## test_alarm_rule_script + +```python +object client.test_alarm_rule_script(body: object) +``` + +**POST** `/api/alarm/rule/testScript` + +Test alarm rule TBEL expression (testAlarmRuleScript) + +Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **object** | Test alarm rule TBEL condition expression. The expression must return a boolean value. | | + +### Return type + +**object** + diff --git a/paas/docs/AlarmRuleCustomTimeSchedule.md b/paas/docs/AlarmRuleCustomTimeSchedule.md deleted file mode 100644 index a30aed38..00000000 --- a/paas/docs/AlarmRuleCustomTimeSchedule.md +++ /dev/null @@ -1,41 +0,0 @@ - -# AlarmRuleCustomTimeSchedule - -`tb_paas_client.models.AlarmRuleCustomTimeSchedule` - -**Extends:** **AlarmRuleSchedule** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **items** | [**List[AlarmRuleCustomTimeScheduleItem]**](AlarmRuleCustomTimeScheduleItem.md) | | [optional] | -| **timezone** | **str** | | [optional] | - - - -## Referenced Types - -#### AlarmRuleSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### AlarmRuleCustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.items`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleCustomTimeSchedule.model_validate(data)` or `AlarmRuleCustomTimeSchedule.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleCustomTimeScheduleItem.md b/paas/docs/AlarmRuleCustomTimeScheduleItem.md deleted file mode 100644 index 8ce25245..00000000 --- a/paas/docs/AlarmRuleCustomTimeScheduleItem.md +++ /dev/null @@ -1,26 +0,0 @@ - -# AlarmRuleCustomTimeScheduleItem - -`tb_paas_client.models.AlarmRuleCustomTimeScheduleItem` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **day_of_week** | **int** | | [optional] | -| **enabled** | **bool** | | [optional] | -| **ends_on** | **int** | | [optional] | -| **starts_on** | **int** | | [optional] | - - - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.day_of_week`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleCustomTimeScheduleItem.model_validate(data)` or `AlarmRuleCustomTimeScheduleItem.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleDefinition.md b/paas/docs/AlarmRuleDefinition.md index 631660ec..2b1f3f0c 100644 --- a/paas/docs/AlarmRuleDefinition.md +++ b/paas/docs/AlarmRuleDefinition.md @@ -7,9 +7,17 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **alarm_details** | **str** | | [optional] | -| **condition** | [**AlarmRuleCondition**](AlarmRuleCondition.md) | | | -| **dashboard_id** | [**DashboardId**](DashboardId.md) | | [optional] | +| **id** | [**CalculatedFieldId**](CalculatedFieldId.md) | JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. | [optional] | +| **created_time** | **int** | Timestamp of the alarm rule creation, in milliseconds | [optional] [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | | [optional] | +| **entity_id** | [**EntityId**](EntityId.md) | | [optional] | +| **name** | **str** | User defined name of the alarm rule. | [optional] | +| **debug_settings** | [**DebugSettings**](DebugSettings.md) | Debug settings object. | [optional] | +| **configuration_version** | **int** | Version of alarm rule configuration. | [optional] | +| **configuration** | [**AlarmCalculatedFieldConfiguration**](AlarmCalculatedFieldConfiguration.md) | | | +| **version** | **int** | | [optional] | +| **additional_info** | **object** | Additional parameters of the alarm rule. May include: 'description' (string). | [optional] | +| **debug_mode** | **bool** | | [optional] | @@ -17,26 +25,255 @@ > **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. -#### AlarmRuleCondition +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failures_enabled | bool | Debug failures. | [optional] | +| all_enabled | bool | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| all_enabled_until | int | Timestamp of the end time for the processing debug events. | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | str | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | +| propagate | bool | | [optional] | +| propagate_to_owner | bool | | [optional] | +| propagate_to_owner_hierarchy | bool | | [optional] | +| propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| metrics | Dict[str, AggMetric] | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | +| scheduled_update_enabled | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Dict[str, Argument] | | | +| deduplication_interval_in_sec | int | | [optional] | +| metrics | Dict[str, AggMetric] | | | +| use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| use_latest_ts | bool | | [optional] | + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| ref_entity_key | ReferencedEntityKey | | [optional] | +| default_value | str | | [optional] | +| limit | int | | [optional] | +| time_window | int | | [optional] | + +#### AlarmRule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| condition | AlarmCondition | | | +| alarm_details | str | | [optional] | +| dashboard_id | DashboardId | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| decimals_by_default | int | | [optional] | +| name | str | | [optional] | +| scope | AttributeScope | | [optional] | +| strategy | object | | [optional] | +| type | str | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List[RelationPathLevel] | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitude_key_name | str | | | +| longitude_key_name | str | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeter_key_name | str | | | +| report_strategy | GeofencingReportStrategy | | | +| create_relations_with_matched_zones | bool | | [optional] | +| relation_type | str | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relation_type | str | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | str | | [optional] | +| input | AggInput | | [optional] | +| default_value | float | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | +| duration_sec | int | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | int | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` #### AlarmConditionExpression | Name | Type | Description | Notes | @@ -46,41 +283,99 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### TimeSeriesOutputStrategy | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | int | | [optional] | +| save_time_series | bool | | [optional] | +| save_latest | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| send_attributes_updated_notification | bool | | [optional] | +| update_attributes_only_on_value_change | bool | | [optional] | +| save_attribute | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | str | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | + +#### AlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* + +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -97,20 +392,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -119,46 +414,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -167,7 +459,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -176,7 +468,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -190,7 +482,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.alarm_details`, `obj.name`, etc. +- **Attribute access:** `obj.id`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AlarmRuleDefinition.model_validate(data)` or `AlarmRuleDefinition.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmRuleDefinitionInfo.md b/paas/docs/AlarmRuleDefinitionInfo.md new file mode 100644 index 00000000..82c348ba --- /dev/null +++ b/paas/docs/AlarmRuleDefinitionInfo.md @@ -0,0 +1,490 @@ + +# AlarmRuleDefinitionInfo + +`tb_paas_client.models.AlarmRuleDefinitionInfo` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | [**CalculatedFieldId**](CalculatedFieldId.md) | JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. | [optional] | +| **created_time** | **int** | Timestamp of the alarm rule creation, in milliseconds | [optional] [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | | [optional] | +| **entity_id** | [**EntityId**](EntityId.md) | | [optional] | +| **name** | **str** | User defined name of the alarm rule. | [optional] | +| **debug_settings** | [**DebugSettings**](DebugSettings.md) | Debug settings object. | [optional] | +| **configuration_version** | **int** | Version of alarm rule configuration. | [optional] | +| **configuration** | [**AlarmCalculatedFieldConfiguration**](AlarmCalculatedFieldConfiguration.md) | | | +| **version** | **int** | | [optional] | +| **additional_info** | **object** | Additional parameters of the alarm rule. May include: 'description' (string). | [optional] | +| **entity_name** | **str** | | [optional] | +| **debug_mode** | **bool** | | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failures_enabled | bool | Debug failures. | [optional] | +| all_enabled | bool | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| all_enabled_until | int | Timestamp of the end time for the processing debug events. | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | str | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | +| propagate | bool | | [optional] | +| propagate_to_owner | bool | | [optional] | +| propagate_to_owner_hierarchy | bool | | [optional] | +| propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| metrics | Dict[str, AggMetric] | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | +| scheduled_update_enabled | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Dict[str, Argument] | | | +| deduplication_interval_in_sec | int | | [optional] | +| metrics | Dict[str, AggMetric] | | | +| use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| use_latest_ts | bool | | [optional] | + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| ref_entity_key | ReferencedEntityKey | | [optional] | +| default_value | str | | [optional] | +| limit | int | | [optional] | +| time_window | int | | [optional] | + +#### AlarmRule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| condition | AlarmCondition | | | +| alarm_details | str | | [optional] | +| dashboard_id | DashboardId | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| decimals_by_default | int | | [optional] | +| name | str | | [optional] | +| scope | AttributeScope | | [optional] | +| strategy | object | | [optional] | +| type | str | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List[RelationPathLevel] | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### AlarmCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | +| type | str | | | + +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitude_key_name | str | | | +| longitude_key_name | str | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeter_key_name | str | | | +| report_strategy | GeofencingReportStrategy | | | +| create_relations_with_matched_zones | bool | | [optional] | +| relation_type | str | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relation_type | str | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | str | | [optional] | +| input | AggInput | | [optional] | +| default_value | float | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | +| duration_sec | int | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | int | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | str | | | + +#### AlarmConditionValueAlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | int | | [optional] | +| save_time_series | bool | | [optional] | +| save_latest | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| send_attributes_updated_notification | bool | | [optional] | +| update_attributes_only_on_value_change | bool | | [optional] | +| save_attribute | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | str | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | + +#### AlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* + +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | + +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | str | | [optional] | +| days_of_week | List[int] | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | str | | | +| value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | + +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | + +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | + +#### CustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| enabled | bool | | [optional] | +| day_of_week | int | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### AlarmRuleStringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | str | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmRuleNumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | float | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmRuleBooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | bool | | [optional] | +| dynamic_value_argument | str | | [optional] | + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.id`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `AlarmRuleDefinitionInfo.model_validate(data)` or `AlarmRuleDefinitionInfo.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/AlarmRuleKeyFilterPredicate.md b/paas/docs/AlarmRuleKeyFilterPredicate.md index 602e8d04..3acfa835 100644 --- a/paas/docs/AlarmRuleKeyFilterPredicate.md +++ b/paas/docs/AlarmRuleKeyFilterPredicate.md @@ -18,37 +18,37 @@ Filter predicate for alarm rule key-based filtering #### AlarmRuleBooleanFilterPredicate *(type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(type=`NO_DATA`)* +#### NoDataFilterPredicate *(type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | ## Referenced Types -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -57,19 +57,19 @@ Filter predicate for alarm rule key-based filtering | static_value | bool | | [optional] | | dynamic_value_argument | str | | [optional] | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + #### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -78,7 +78,7 @@ Filter predicate for alarm rule key-based filtering | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString diff --git a/paas/docs/AlarmRuleNumericFilterPredicate.md b/paas/docs/AlarmRuleNumericFilterPredicate.md index f1b6efe9..91d6c2f6 100644 --- a/paas/docs/AlarmRuleNumericFilterPredicate.md +++ b/paas/docs/AlarmRuleNumericFilterPredicate.md @@ -9,7 +9,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **operation** | [**NumericOperation**](NumericOperation.md) | | | +| **operation** | [**AlarmRuleNumericOperation**](AlarmRuleNumericOperation.md) | | | | **value** | [**AlarmConditionValueDouble**](AlarmConditionValueDouble.md) | | | @@ -21,7 +21,7 @@ |------|------|-------------|-------| | type | str | | | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble diff --git a/paas/docs/AlarmRuleNumericOperation.md b/paas/docs/AlarmRuleNumericOperation.md new file mode 100644 index 00000000..3d6e03eb --- /dev/null +++ b/paas/docs/AlarmRuleNumericOperation.md @@ -0,0 +1,32 @@ + +# AlarmRuleNumericOperation + +`tb_paas_client.models.AlarmRuleNumericOperation` + +## Enum Values + + +* `EQUAL` (value: `'EQUAL'`) + +* `NOT_EQUAL` (value: `'NOT_EQUAL'`) + +* `GREATER` (value: `'GREATER'`) + +* `LESS` (value: `'LESS'`) + +* `GREATER_OR_EQUAL` (value: `'GREATER_OR_EQUAL'`) + +* `LESS_OR_EQUAL` (value: `'LESS_OR_EQUAL'`) + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `AlarmRuleNumericOperation.model_validate(data)` or `AlarmRuleNumericOperation.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/AlarmRuleSchedule.md b/paas/docs/AlarmRuleSchedule.md deleted file mode 100644 index 20ef0787..00000000 --- a/paas/docs/AlarmRuleSchedule.md +++ /dev/null @@ -1,52 +0,0 @@ - -# AlarmRuleSchedule - -`tb_paas_client.models.AlarmRuleSchedule` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **type** | **str** | | | - - - -## Subtypes - -#### AlarmRuleAnyTimeSchedule *(type=`ANY_TIME`)* -*(no additional properties)* - -#### AlarmRuleCustomTimeSchedule *(type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | -| timezone | str | | [optional] | - -#### AlarmRuleSpecificTimeSchedule *(type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | -| timezone | str | | [optional] | - -## Referenced Types - -#### AlarmRuleCustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.type`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleSchedule.model_validate(data)` or `AlarmRuleSchedule.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleSpecificTimeSchedule.md b/paas/docs/AlarmRuleSpecificTimeSchedule.md deleted file mode 100644 index ff1a42cd..00000000 --- a/paas/docs/AlarmRuleSpecificTimeSchedule.md +++ /dev/null @@ -1,35 +0,0 @@ - -# AlarmRuleSpecificTimeSchedule - -`tb_paas_client.models.AlarmRuleSpecificTimeSchedule` - -**Extends:** **AlarmRuleSchedule** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **days_of_week** | **List[int]** | | [optional] | -| **ends_on** | **int** | | [optional] | -| **starts_on** | **int** | | [optional] | -| **timezone** | **str** | | [optional] | - - - -## Referenced Types - -#### AlarmRuleSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.days_of_week`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleSpecificTimeSchedule.model_validate(data)` or `AlarmRuleSpecificTimeSchedule.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/AlarmRuleStringFilterPredicate.md b/paas/docs/AlarmRuleStringFilterPredicate.md index d6a8cc4c..659cd059 100644 --- a/paas/docs/AlarmRuleStringFilterPredicate.md +++ b/paas/docs/AlarmRuleStringFilterPredicate.md @@ -9,9 +9,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **ignore_case** | **bool** | | [optional] | -| **operation** | [**StringOperation**](StringOperation.md) | | | +| **operation** | [**AlarmRuleStringOperation**](AlarmRuleStringOperation.md) | | | | **value** | [**AlarmConditionValueString**](AlarmConditionValueString.md) | | | +| **ignore_case** | **bool** | | [optional] | @@ -22,7 +22,7 @@ |------|------|-------------|-------| | type | str | | | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -36,7 +36,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.ignore_case`, `obj.name`, etc. +- **Attribute access:** `obj.operation`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AlarmRuleStringFilterPredicate.model_validate(data)` or `AlarmRuleStringFilterPredicate.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmRuleStringOperation.md b/paas/docs/AlarmRuleStringOperation.md new file mode 100644 index 00000000..b802acb4 --- /dev/null +++ b/paas/docs/AlarmRuleStringOperation.md @@ -0,0 +1,36 @@ + +# AlarmRuleStringOperation + +`tb_paas_client.models.AlarmRuleStringOperation` + +## Enum Values + + +* `EQUAL` (value: `'EQUAL'`) + +* `NOT_EQUAL` (value: `'NOT_EQUAL'`) + +* `STARTS_WITH` (value: `'STARTS_WITH'`) + +* `ENDS_WITH` (value: `'ENDS_WITH'`) + +* `CONTAINS` (value: `'CONTAINS'`) + +* `NOT_CONTAINS` (value: `'NOT_CONTAINS'`) + +* `IN` (value: `'IN'`) + +* `NOT_IN` (value: `'NOT_IN'`) + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `AlarmRuleStringOperation.model_validate(data)` or `AlarmRuleStringOperation.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/AlarmSchedule.md b/paas/docs/AlarmSchedule.md index ee822c38..eb206f28 100644 --- a/paas/docs/AlarmSchedule.md +++ b/paas/docs/AlarmSchedule.md @@ -3,14 +3,11 @@ `tb_paas_client.models.AlarmSchedule` -Configuration for alarm schedule - ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **dynamic_value** | [**DynamicValueString**](DynamicValueString.md) | | [optional] | -| **type** | [**AlarmScheduleType**](AlarmScheduleType.md) | | [optional] | +| **type** | **str** | | | @@ -28,41 +25,27 @@ Configuration for alarm schedule #### SpecificTimeSchedule *(type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | ## Referenced Types -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` +| ends_on | int | | [optional] | --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.dynamic_value`, `obj.name`, etc. +- **Attribute access:** `obj.type`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AlarmSchedule.model_validate(data)` or `AlarmSchedule.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmTableComponent.md b/paas/docs/AlarmTableComponent.md index cb92aac7..a63f24d6 100644 --- a/paas/docs/AlarmTableComponent.md +++ b/paas/docs/AlarmTableComponent.md @@ -55,7 +55,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### DataSource | Name | Type | Description | Notes | @@ -95,7 +95,7 @@ #### VerticalAlignment (enum) `BOTTOM` | `TOP` | `MIDDLE` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### DataSourceType (enum) diff --git a/paas/docs/AmazonBedrockChatModelConfig.md b/paas/docs/AmazonBedrockChatModelConfig.md index 05f05d3b..e55898c7 100644 --- a/paas/docs/AmazonBedrockChatModelConfig.md +++ b/paas/docs/AmazonBedrockChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**AmazonBedrockProviderConfig**](AmazonBedrockProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -17,6 +16,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -27,9 +27,6 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### AmazonBedrockProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -37,12 +34,15 @@ | access_key_id | str | | | | secret_access_key | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AmazonBedrockChatModelConfig.model_validate(data)` or `AmazonBedrockChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AnthropicChatModelConfig.md b/paas/docs/AnthropicChatModelConfig.md index d72ef578..1c06dc85 100644 --- a/paas/docs/AnthropicChatModelConfig.md +++ b/paas/docs/AnthropicChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**AnthropicProviderConfig**](AnthropicProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -18,6 +17,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -28,20 +28,20 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### AnthropicProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | api_key | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AnthropicChatModelConfig.model_validate(data)` or `AnthropicChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AnyTimeSchedule.md b/paas/docs/AnyTimeSchedule.md index 52961887..5aa26fef 100644 --- a/paas/docs/AnyTimeSchedule.md +++ b/paas/docs/AnyTimeSchedule.md @@ -17,22 +17,7 @@ #### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` +| type | str | | | --- diff --git a/paas/docs/AssetExportData.md b/paas/docs/AssetExportData.md index 3d77d8c2..a5e993f9 100644 --- a/paas/docs/AssetExportData.md +++ b/paas/docs/AssetExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/AssetProfileExportData.md b/paas/docs/AssetProfileExportData.md index c01dcbec..7f9476c6 100644 --- a/paas/docs/AssetProfileExportData.md +++ b/paas/docs/AssetProfileExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/AssetProfileInfo.md b/paas/docs/AssetProfileInfo.md index ec8f9d93..273d506e 100644 --- a/paas/docs/AssetProfileInfo.md +++ b/paas/docs/AssetProfileInfo.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | [**EntityId**](EntityId.md) | JSON object with the entity Id. | [optional] | +| **id** | [**AssetProfileId**](AssetProfileId.md) | JSON object with the Asset Profile Id. | [optional] | | **name** | **str** | Entity Name | [optional] | | **image** | **str** | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. | [optional] | | **default_dashboard_id** | [**DashboardId**](DashboardId.md) | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details. | [optional] | diff --git a/paas/docs/AttributesOutput.md b/paas/docs/AttributesOutput.md index 5a0c64f8..bcaf5489 100644 --- a/paas/docs/AttributesOutput.md +++ b/paas/docs/AttributesOutput.md @@ -18,9 +18,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | diff --git a/paas/docs/AvailableEntityKeysV2.md b/paas/docs/AvailableEntityKeysV2.md index b14c4908..88bfe6d5 100644 --- a/paas/docs/AvailableEntityKeysV2.md +++ b/paas/docs/AvailableEntityKeysV2.md @@ -9,6 +9,7 @@ Contains unique time series and attribute key names discovered from entities mat | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **total_entities** | **int** | Total number of entities that matched the query filter. | | | **entity_types** | [**List[EntityType]**](EntityType.md) | Set of entity types found among the matched entities. | | | **timeseries** | [**List[KeyInfo]**](KeyInfo.md) | | [optional] | | **attributes** | **Dict[str, List[KeyInfo]]** | Map of attribute scope to the list of unique attribute keys available on the matched entities. Only scopes supported by the matched entity types are included. Omitted when attribute keys were not requested or when none of the requested scopes apply to the matched entity types. | [optional] | @@ -37,7 +38,7 @@ Contains unique time series and attribute key names discovered from entities mat ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.entity_types`, `obj.name`, etc. +- **Attribute access:** `obj.total_entities`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AvailableEntityKeysV2.model_validate(data)` or `AvailableEntityKeysV2.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AzureOpenAiChatModelConfig.md b/paas/docs/AzureOpenAiChatModelConfig.md index 6cafd212..2bcb6179 100644 --- a/paas/docs/AzureOpenAiChatModelConfig.md +++ b/paas/docs/AzureOpenAiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**AzureOpenAiProviderConfig**](AzureOpenAiProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -19,6 +18,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -29,9 +29,6 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -39,12 +36,15 @@ | service_version | str | | [optional] | | api_key | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AzureOpenAiChatModelConfig.model_validate(data)` or `AzureOpenAiChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/CalculatedField.md b/paas/docs/CalculatedField.md index 30261f31..53c36879 100644 --- a/paas/docs/CalculatedField.md +++ b/paas/docs/CalculatedField.md @@ -39,56 +39,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -109,9 +109,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -155,11 +155,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -295,26 +295,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -345,41 +345,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -396,17 +396,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -415,46 +418,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -463,7 +463,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -472,7 +472,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/CalculatedFieldConfiguration.md b/paas/docs/CalculatedFieldConfiguration.md index c646f9d3..fccc6858 100644 --- a/paas/docs/CalculatedFieldConfiguration.md +++ b/paas/docs/CalculatedFieldConfiguration.md @@ -7,8 +7,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **type** | **str** | | | | **output** | [**Output**](Output.md) | | [optional] | +| **type** | **str** | | | @@ -18,49 +18,49 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -82,9 +82,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -108,13 +108,21 @@ | limit | int | | [optional] | | time_window | int | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | str | | [optional] | +| input | AggInput | | [optional] | +| default_value | float | | [optional] | + #### AggInterval | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -169,14 +177,6 @@ | tz | str | | | | offset_sec | int | | [optional] | -#### AggMetric -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| function | AggFunction | | [optional] | -| filter | str | | [optional] | -| input | AggInput | | [optional] | -| default_value | float | | [optional] | - #### Watermark | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -228,26 +228,26 @@ | type | ArgumentType | | [optional] | | scope | AttributeScope | | [optional] | -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -321,41 +321,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -372,17 +372,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -391,46 +394,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -439,7 +439,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -448,7 +448,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -462,7 +462,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.type`, `obj.name`, etc. +- **Attribute access:** `obj.output`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `CalculatedFieldConfiguration.model_validate(data)` or `CalculatedFieldConfiguration.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/CalculatedFieldInfo.md b/paas/docs/CalculatedFieldInfo.md index 32e5b2e8..cab1e174 100644 --- a/paas/docs/CalculatedFieldInfo.md +++ b/paas/docs/CalculatedFieldInfo.md @@ -40,56 +40,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -110,9 +110,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -156,11 +156,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -296,26 +296,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -346,41 +346,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -397,17 +397,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -416,46 +419,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -464,7 +464,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -473,7 +473,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/CfReprocessingJobConfiguration.md b/paas/docs/CfReprocessingJobConfiguration.md index 095e138a..2bf41cff 100644 --- a/paas/docs/CfReprocessingJobConfiguration.md +++ b/paas/docs/CfReprocessingJobConfiguration.md @@ -34,6 +34,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### EntityType (enum) diff --git a/paas/docs/CfReprocessingJobResult.md b/paas/docs/CfReprocessingJobResult.md index 880ec4ef..1370a065 100644 --- a/paas/docs/CfReprocessingJobResult.md +++ b/paas/docs/CfReprocessingJobResult.md @@ -35,6 +35,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | --- diff --git a/paas/docs/CfReprocessingTaskResult.md b/paas/docs/CfReprocessingTaskResult.md index 428922c8..7b480b00 100644 --- a/paas/docs/CfReprocessingTaskResult.md +++ b/paas/docs/CfReprocessingTaskResult.md @@ -24,6 +24,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### CfReprocessingTaskFailure diff --git a/paas/docs/CloudDomainId.md b/paas/docs/CloudDomainId.md new file mode 100644 index 00000000..4b3e08a9 --- /dev/null +++ b/paas/docs/CloudDomainId.md @@ -0,0 +1,23 @@ + +# CloudDomainId + +`tb_paas_client.models.CloudDomainId` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | **UUID** | string | | + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.id`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `CloudDomainId.model_validate(data)` or `CloudDomainId.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/CloudDomainInfo.md b/paas/docs/CloudDomainInfo.md new file mode 100644 index 00000000..97c74f18 --- /dev/null +++ b/paas/docs/CloudDomainInfo.md @@ -0,0 +1,61 @@ + +# CloudDomainInfo + +`tb_paas_client.models.CloudDomainInfo` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | [**CloudDomainId**](CloudDomainId.md) | | [optional] | +| **created_time** | **int** | Entity creation timestamp in milliseconds since Unix epoch | [optional] [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | | [optional] | +| **customer_id** | [**CustomerId**](CustomerId.md) | | [optional] | +| **domain_name** | **str** | | [optional] | +| **acme_certificate_id** | [**AcmeCertificateId**](AcmeCertificateId.md) | | [optional] | +| **certificate** | [**CertificateInfo**](CertificateInfo.md) | | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### CloudDomainId +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | UUID | string | | + +#### AcmeCertificateId +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | UUID | string | | + +#### CertificateInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| status | CertificateStatus | | [optional] | +| domain_name | str | | [optional] | +| serial_number | str | | [optional] | +| not_before | int | | [optional] | +| not_after | int | | [optional] | +| requested_at | int | | [optional] | +| issued_at | int | | [optional] | +| acme_certificate_id | AcmeCertificateId | | [optional] | + +#### CertificateStatus (enum) +`PENDING_VALIDATION` | `ISSUED` | `INACTIVE` | `EXPIRED` | `VALIDATION_TIMED_OUT` | `REVOKED` | `FAILED` | `UNKNOWN` + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.id`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `CloudDomainInfo.model_validate(data)` or `CloudDomainInfo.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/ConverterExportData.md b/paas/docs/ConverterExportData.md index 632181c5..fb24e53b 100644 --- a/paas/docs/ConverterExportData.md +++ b/paas/docs/ConverterExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/CsvReportTemplateConfig.md b/paas/docs/CsvReportTemplateConfig.md index 1178871f..887e3c5d 100644 --- a/paas/docs/CsvReportTemplateConfig.md +++ b/paas/docs/CsvReportTemplateConfig.md @@ -507,7 +507,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -553,35 +553,6 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportLatestChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -603,35 +574,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### DashboardReportConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -720,7 +662,7 @@ #### FontStyle (enum) `NORMAL` | `ITALIC` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History @@ -887,8 +829,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### AliasEntityType (enum) `CURRENT_CUSTOMER` | `CURRENT_TENANT` | `CURRENT_USER` | `CURRENT_USER_OWNER` @@ -1005,19 +947,38 @@ #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings +#### DynamicValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +| resolved_value | str | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | -#### ColorRange +#### DynamicValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +| resolved_value | float | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### DynamicValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| resolved_value | bool | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` + +#### DynamicValueSourceType (enum) +`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -1054,38 +1015,25 @@ | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### DynamicValueString +#### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` -#### DynamicValueBoolean +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -1096,25 +1044,6 @@ | start | float | | [optional] | | end | float | | [optional] | -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - -#### DataKeyComparisonSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | - --- ### Conventions diff --git a/paas/docs/CustomMenuConfig.md b/paas/docs/CustomMenuConfig.md index 5be282d7..1cbdf56a 100644 --- a/paas/docs/CustomMenuConfig.md +++ b/paas/docs/CustomMenuConfig.md @@ -3,8 +3,6 @@ `tb_paas_client.models.CustomMenuConfig` -A JSON value representing the custom menu configuration - ## Properties | Name | Type | Description | Notes | diff --git a/paas/docs/CustomMenuControllerApi.md b/paas/docs/CustomMenuControllerApi.md index bce03351..bf5c28d4 100644 --- a/paas/docs/CustomMenuControllerApi.md +++ b/paas/docs/CustomMenuControllerApi.md @@ -5,7 +5,7 @@ ```python CustomMenu client.create_custom_menu(custom_menu_info: CustomMenuInfo, assign_to_list: Optional[List[str]] = None, force: Optional[bool] = None) # Create Custom Menu (createCustomMenu) CustomMenuDeleteResult client.delete_custom_menu(custom_menu_id: UUID, force: Optional[bool] = None) # Delete custom menu (deleteCustomMenu) -None client.get_custom_menu(if_none_match: Optional[str] = None) # Get end-user Custom Menu configuration (getCustomMenu) +CustomMenuConfig client.get_custom_menu(if_none_match: Optional[str] = None) # Get end-user Custom Menu configuration (getCustomMenu) List[EntityInfo] client.get_custom_menu_assignee_list(custom_menu_id: UUID) # Get Custom Menu assignee list (getCustomMenuAssigneeList) CustomMenuConfig client.get_custom_menu_config(custom_menu_id: UUID) # Get Custom Menu configuration by id (getCustomMenuConfig) CustomMenuInfo client.get_custom_menu_info_by_id(custom_menu_id: UUID) # Get Custom Menu Info (getCustomMenuInfoById) @@ -70,7 +70,7 @@ Deletes the custom menu based on the provided Custom Menu Id. Referencing non-ex ## get_custom_menu ```python -None client.get_custom_menu(if_none_match: Optional[str] = None) +CustomMenuConfig client.get_custom_menu(if_none_match: Optional[str] = None) ``` **GET** `/api/customMenu` @@ -88,7 +88,7 @@ Fetch the Custom Menu configuration object for the authorized user. The custom m ### Return type -None (empty response body) +**CustomMenuConfig** ## get_custom_menu_assignee_list diff --git a/paas/docs/CustomTimeSchedule.md b/paas/docs/CustomTimeSchedule.md index a6a7748b..8c305574 100644 --- a/paas/docs/CustomTimeSchedule.md +++ b/paas/docs/CustomTimeSchedule.md @@ -19,30 +19,15 @@ #### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | +| type | str | | | #### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` +| ends_on | int | | [optional] | --- diff --git a/paas/docs/CustomTimeScheduleItem.md b/paas/docs/CustomTimeScheduleItem.md index b3481250..3c9d854f 100644 --- a/paas/docs/CustomTimeScheduleItem.md +++ b/paas/docs/CustomTimeScheduleItem.md @@ -7,10 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **day_of_week** | **int** | | [optional] | | **enabled** | **bool** | | [optional] | -| **ends_on** | **int** | | [optional] | +| **day_of_week** | **int** | | [optional] | | **starts_on** | **int** | | [optional] | +| **ends_on** | **int** | | [optional] | @@ -19,7 +19,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.day_of_week`, `obj.name`, etc. +- **Attribute access:** `obj.enabled`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `CustomTimeScheduleItem.model_validate(data)` or `CustomTimeScheduleItem.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/Customer.md b/paas/docs/Customer.md index 48987272..c6eceb30 100644 --- a/paas/docs/Customer.md +++ b/paas/docs/Customer.md @@ -17,7 +17,7 @@ | **address2** | **str** | Address Line 2 | [optional] | | **zip** | **str** | Zip code | [optional] | | **phone** | **str** | Phone number | [optional] | -| **email** | **str** | Email | | +| **email** | **str** | Email | [optional] | | **title** | **str** | Title of the customer | | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] | | **parent_customer_id** | [**CustomerId**](CustomerId.md) | JSON object with parent Customer Id | [optional] | diff --git a/paas/docs/CustomerExportData.md b/paas/docs/CustomerExportData.md index e64ffeed..adc9cb0b 100644 --- a/paas/docs/CustomerExportData.md +++ b/paas/docs/CustomerExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/CustomerInfo.md b/paas/docs/CustomerInfo.md index 1e9e3618..9177d8c8 100644 --- a/paas/docs/CustomerInfo.md +++ b/paas/docs/CustomerInfo.md @@ -17,7 +17,7 @@ | **address2** | **str** | Address Line 2 | [optional] | | **zip** | **str** | Zip code | [optional] | | **phone** | **str** | Phone number | [optional] | -| **email** | **str** | Email | | +| **email** | **str** | Email | [optional] | | **title** | **str** | Title of the customer | | | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] | | **parent_customer_id** | [**CustomerId**](CustomerId.md) | JSON object with parent Customer Id | [optional] | diff --git a/paas/docs/DashboardControllerApi.md b/paas/docs/DashboardControllerApi.md index cd0d422e..8c8a5ba9 100644 --- a/paas/docs/DashboardControllerApi.md +++ b/paas/docs/DashboardControllerApi.md @@ -8,11 +8,11 @@ List[Dashboard] client.export_group_dashboards(entity_group_id: str, limit: int, PageDataDashboardInfo client.get_all_dashboards(page_size: int, page: int, include_customers: Optional[bool] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get All Dashboards for current user (getAllDashboards) PageDataDashboardInfo client.get_customer_dashboards(customer_id: str, page_size: int, page: int, include_customers: Optional[bool] = None, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Customer Dashboards (getCustomerDashboards) HomeDashboardInfo client.get_customer_home_dashboard_info() # Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo) -None client.get_dashboard_by_id(dashboard_id: str, include_resources: Optional[bool] = None, accept_encoding: Optional[str] = None) # Get Dashboard (getDashboardById) +Dashboard client.get_dashboard_by_id(dashboard_id: str, include_resources: Optional[bool] = None, accept_encoding: Optional[str] = None) # Get Dashboard (getDashboardById) DashboardInfo client.get_dashboard_info_by_id(dashboard_id: str) # Get Dashboard Info (getDashboardInfoById) PageDataDashboardInfo client.get_dashboards_by_entity_group_id(entity_group_id: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get dashboards by Entity Group Id (getDashboardsByEntityGroupId) List[DashboardInfo] client.get_dashboards_by_ids(dashboard_ids: List[str]) # Get dashboards by Dashboard Ids (getDashboardsByIds) -None client.get_home_dashboard(accept_encoding: Optional[str] = None) # Get Home Dashboard (getHomeDashboard) +HomeDashboard client.get_home_dashboard(accept_encoding: Optional[str] = None) # Get Home Dashboard (getHomeDashboard) HomeDashboardInfo client.get_home_dashboard_info() # Get Home Dashboard Info (getHomeDashboardInfo) int client.get_max_datapoints_limit() # Get max data points limit (getMaxDatapointsLimit) int client.get_server_time() # Get server time (getServerTime) @@ -156,7 +156,7 @@ Returns the home dashboard info object that is configured as 'homeDashboardId' p ## get_dashboard_by_id ```python -None client.get_dashboard_by_id(dashboard_id: str, include_resources: Optional[bool] = None, accept_encoding: Optional[str] = None) +Dashboard client.get_dashboard_by_id(dashboard_id: str, include_resources: Optional[bool] = None, accept_encoding: Optional[str] = None) ``` **GET** `/api/dashboard/{dashboardId}` @@ -176,7 +176,7 @@ Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a he ### Return type -None (empty response body) +**Dashboard** ## get_dashboard_info_by_id @@ -259,7 +259,7 @@ Returns a list of DashboardInfo objects based on the provided ids. Filters the l ## get_home_dashboard ```python -None client.get_home_dashboard(accept_encoding: Optional[str] = None) +HomeDashboard client.get_home_dashboard(accept_encoding: Optional[str] = None) ``` **GET** `/api/dashboard/home` @@ -277,7 +277,7 @@ Returns the home dashboard object that is configured as 'homeDashboardId' parame ### Return type -None (empty response body) +**HomeDashboard** ## get_home_dashboard_info diff --git a/paas/docs/DashboardExportData.md b/paas/docs/DashboardExportData.md index 2f503a56..066c374b 100644 --- a/paas/docs/DashboardExportData.md +++ b/paas/docs/DashboardExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/Device.md b/paas/docs/Device.md index 30603fee..ea76f7a2 100644 --- a/paas/docs/Device.md +++ b/paas/docs/Device.md @@ -15,7 +15,7 @@ | **name** | **str** | Unique Device Name in scope of Tenant | [optional] | | **type** | **str** | Device Profile Name | [optional] | | **label** | **str** | Label that may be used in widgets | [optional] | -| **device_profile_id** | [**DeviceProfileId**](DeviceProfileId.md) | JSON object with Device Profile Id. | | +| **device_profile_id** | [**DeviceProfileId**](DeviceProfileId.md) | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | **device_data** | [**DeviceData**](DeviceData.md) | JSON object with content specific to type of transport in the device profile. | [optional] | | **firmware_id** | [**OtaPackageId**](OtaPackageId.md) | JSON object with Ota Package Id. | [optional] | | **software_id** | [**OtaPackageId**](OtaPackageId.md) | JSON object with Ota Package Id. | [optional] | diff --git a/paas/docs/DeviceExportData.md b/paas/docs/DeviceExportData.md index 2ed0561d..02247cfc 100644 --- a/paas/docs/DeviceExportData.md +++ b/paas/docs/DeviceExportData.md @@ -40,8 +40,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -96,56 +98,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -163,9 +165,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -209,11 +211,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -349,26 +351,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -399,41 +401,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -450,17 +452,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -469,46 +474,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -517,7 +519,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -526,7 +528,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/DeviceInfo.md b/paas/docs/DeviceInfo.md index 5ee806d9..9fbd703c 100644 --- a/paas/docs/DeviceInfo.md +++ b/paas/docs/DeviceInfo.md @@ -15,7 +15,7 @@ | **name** | **str** | Unique Device Name in scope of Tenant | [optional] | | **type** | **str** | Device Profile Name | [optional] | | **label** | **str** | Label that may be used in widgets | [optional] | -| **device_profile_id** | [**DeviceProfileId**](DeviceProfileId.md) | JSON object with Device Profile Id. | | +| **device_profile_id** | [**DeviceProfileId**](DeviceProfileId.md) | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | **device_data** | [**DeviceData**](DeviceData.md) | JSON object with content specific to type of transport in the device profile. | [optional] | | **firmware_id** | [**OtaPackageId**](OtaPackageId.md) | JSON object with Ota Package Id. | [optional] | | **software_id** | [**OtaPackageId**](OtaPackageId.md) | JSON object with Ota Package Id. | [optional] | diff --git a/paas/docs/DeviceProfile.md b/paas/docs/DeviceProfile.md index 97ab86b9..8ee5bf75 100644 --- a/paas/docs/DeviceProfile.md +++ b/paas/docs/DeviceProfile.md @@ -50,7 +50,6 @@ A JSON value representing the device profile. | configuration | DeviceProfileConfiguration | JSON object of device profile configuration | [optional] | | transport_configuration | DeviceProfileTransportConfiguration | JSON object of device profile transport configuration | [optional] | | provision_configuration | DeviceProfileProvisionConfiguration | JSON object of provisioning strategy type per device profile | [optional] | -| alarms | List[DeviceProfileAlarm] | | [optional] | #### DeviceProfileConfiguration | Name | Type | Description | Notes | @@ -121,30 +120,9 @@ A JSON value representing the device profile. | certificate_reg_ex_pattern | str | | [optional] | | allow_create_new_devices_by_x509_certificate | bool | | [optional] | -#### DeviceProfileAlarm -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | String value representing the alarm rule id | [optional] | -| alarm_type | str | String value representing type of the alarm | [optional] | -| create_rules | Dict[str, AlarmRule] | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| clear_rule | AlarmRule | JSON object representing clear alarm rule | [optional] | -| propagate | bool | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | -| propagate_to_owner | bool | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | -| propagate_to_owner_hierarchy | bool | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | -| propagate_to_tenant | bool | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| propagate_relation_types | List[str] | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarm_details | str | String value representing the additional details for an alarm rule | [optional] | -| dashboard_id | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - #### TransportPayloadTypeConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -247,35 +225,6 @@ A JSON value representing the device profile. |------|------|-------------|-------| | mappings | List[SnmpMapping] | | [optional] | -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List[AlarmConditionFilter] | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | str | | [optional] | -| items | List[CustomTimeScheduleItem] | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | -| timezone | str | | [optional] | - #### ObjectAttributes | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -301,44 +250,6 @@ A JSON value representing the device profile. #### SnmpCommunicationSpec (enum) `TELEMETRY_QUERYING` | `CLIENT_ATTRIBUTES_QUERYING` | `SHARED_ATTRIBUTES_SETTING` | `TO_DEVICE_RPC_REQUEST` | `TO_SERVER_RPC_REQUEST` -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| value_type | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### LwM2mVersion | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -351,144 +262,9 @@ A JSON value representing the device profile. | key | str | | [optional] | | data_type | DataType | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignore_case | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - #### DataType (enum) `BOOLEAN` | `LONG` | `DOUBLE` | `STRING` | `JSON` -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - --- ### Conventions diff --git a/paas/docs/DeviceProfileAlarm.md b/paas/docs/DeviceProfileAlarm.md deleted file mode 100644 index faec7045..00000000 --- a/paas/docs/DeviceProfileAlarm.md +++ /dev/null @@ -1,248 +0,0 @@ - -# DeviceProfileAlarm - -`tb_paas_client.models.DeviceProfileAlarm` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **id** | **str** | String value representing the alarm rule id | [optional] | -| **alarm_type** | **str** | String value representing type of the alarm | [optional] | -| **create_rules** | [**Dict[str, AlarmRule]**](AlarmRule.md) | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| **clear_rule** | [**AlarmRule**](AlarmRule.md) | JSON object representing clear alarm rule | [optional] | -| **propagate** | **bool** | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | -| **propagate_to_owner** | **bool** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | -| **propagate_to_owner_hierarchy** | **bool** | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | -| **propagate_to_tenant** | **bool** | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| **propagate_relation_types** | **List[str]** | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - - - -## Referenced Types - -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. - -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarm_details | str | String value representing the additional details for an alarm rule | [optional] | -| dashboard_id | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List[AlarmConditionFilter] | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | str | | [optional] | -| items | List[CustomTimeScheduleItem] | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | -| timezone | str | | [optional] | - -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| value_type | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignore_case | bool | | [optional] | - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.id`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `DeviceProfileAlarm.model_validate(data)` or `DeviceProfileAlarm.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/DeviceProfileControllerApi.md b/paas/docs/DeviceProfileControllerApi.md index 37f3357b..07bdad43 100644 --- a/paas/docs/DeviceProfileControllerApi.md +++ b/paas/docs/DeviceProfileControllerApi.md @@ -271,7 +271,7 @@ DeviceProfile client.save_device_profile(device_profile: DeviceProfile) Create Or Update Device Profile (saveDeviceProfile) -Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. +Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. ### Parameters diff --git a/paas/docs/DeviceProfileData.md b/paas/docs/DeviceProfileData.md index 18238f44..db18d333 100644 --- a/paas/docs/DeviceProfileData.md +++ b/paas/docs/DeviceProfileData.md @@ -10,14 +10,11 @@ | **configuration** | [**DeviceProfileConfiguration**](DeviceProfileConfiguration.md) | JSON object of device profile configuration | [optional] | | **transport_configuration** | [**DeviceProfileTransportConfiguration**](DeviceProfileTransportConfiguration.md) | JSON object of device profile transport configuration | [optional] | | **provision_configuration** | [**DeviceProfileProvisionConfiguration**](DeviceProfileProvisionConfiguration.md) | JSON object of provisioning strategy type per device profile | [optional] | -| **alarms** | [**List[DeviceProfileAlarm]**](DeviceProfileAlarm.md) | | [optional] | ## Referenced Types -> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. - #### DeviceProfileConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -87,27 +84,6 @@ | certificate_reg_ex_pattern | str | | [optional] | | allow_create_new_devices_by_x509_certificate | bool | | [optional] | -#### DeviceProfileAlarm -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | String value representing the alarm rule id | [optional] | -| alarm_type | str | String value representing type of the alarm | [optional] | -| create_rules | Dict[str, AlarmRule] | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| clear_rule | AlarmRule | JSON object representing clear alarm rule | [optional] | -| propagate | bool | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | -| propagate_to_owner | bool | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | -| propagate_to_owner_hierarchy | bool | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | -| propagate_to_tenant | bool | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| propagate_relation_types | List[str] | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarm_details | str | String value representing the additional details for an alarm rule | [optional] | -| dashboard_id | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - #### TransportPayloadTypeConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -210,35 +186,6 @@ |------|------|-------------|-------| | mappings | List[SnmpMapping] | | [optional] | -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List[AlarmConditionFilter] | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | str | | [optional] | -| items | List[CustomTimeScheduleItem] | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | -| timezone | str | | [optional] | - #### ObjectAttributes | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -264,44 +211,6 @@ #### SnmpCommunicationSpec (enum) `TELEMETRY_QUERYING` | `CLIENT_ATTRIBUTES_QUERYING` | `SHARED_ATTRIBUTES_SETTING` | `TO_DEVICE_RPC_REQUEST` | `TO_SERVER_RPC_REQUEST` -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| value_type | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### LwM2mVersion | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -314,147 +223,9 @@ | key | str | | [optional] | | data_type | DataType | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignore_case | bool | | [optional] | - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - #### DataType (enum) `BOOLEAN` | `LONG` | `DOUBLE` | `STRING` | `JSON` -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - --- ### Conventions diff --git a/paas/docs/DeviceProfileExportData.md b/paas/docs/DeviceProfileExportData.md index 53734dcd..c9ffd9f6 100644 --- a/paas/docs/DeviceProfileExportData.md +++ b/paas/docs/DeviceProfileExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/DeviceProfileInfo.md b/paas/docs/DeviceProfileInfo.md index 7b8cf998..c581e71a 100644 --- a/paas/docs/DeviceProfileInfo.md +++ b/paas/docs/DeviceProfileInfo.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **id** | [**EntityId**](EntityId.md) | JSON object with the entity Id. | [optional] | +| **id** | [**DeviceProfileId**](DeviceProfileId.md) | JSON object with the Device Profile Id. | [optional] | | **name** | **str** | Entity Name | [optional] | | **image** | **str** | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. | [optional] | | **default_dashboard_id** | [**DashboardId**](DashboardId.md) | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details. | [optional] | diff --git a/paas/docs/DomainControllerApi.md b/paas/docs/DomainControllerApi.md index 6918d31e..27ebb989 100644 --- a/paas/docs/DomainControllerApi.md +++ b/paas/docs/DomainControllerApi.md @@ -4,11 +4,11 @@ ```python None client.delete_domain(id: UUID) # Delete Domain by ID (deleteDomain) -DomainInfo client.get_cloud_domain_info_by_id(id: UUID) # Get Domain info by Id (getCloudDomainInfoById) +CloudDomainInfo client.get_cloud_domain_info_by_id(id: UUID) # Get Domain info by Id (getCloudDomainInfoById) DomainInfo client.get_domain_info_by_id(id: UUID) # Get Domain info by Id (getDomainInfoById) PageDataDomainInfo client.get_domain_infos(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get Domain infos (getDomainInfos) Domain client.save_domain(domain: Domain, oauth2_client_ids: Optional[List[str]] = None) # Save or Update Domain (saveDomain) -None client.update_oauth2_clients(id: UUID, request_body: List[UUID]) # Update oauth2 clients (updateOauth2Clients) +None client.update_domain_oauth2_clients(id: UUID, request_body: List[UUID]) # Update oauth2 clients (updateDomainOauth2Clients) ``` @@ -39,7 +39,7 @@ None (empty response body) ## get_cloud_domain_info_by_id ```python -DomainInfo client.get_cloud_domain_info_by_id(id: UUID) +CloudDomainInfo client.get_cloud_domain_info_by_id(id: UUID) ``` **GET** `/api/domain/cloud/info/{id}` @@ -57,7 +57,7 @@ Get Domain info by Id (getCloudDomainInfoById) ### Return type -**DomainInfo** +**CloudDomainInfo** ## get_domain_info_by_id @@ -137,15 +137,15 @@ Create or update the Domain. When creating domain, platform generates Domain Id **Domain** -## update_oauth2_clients +## update_domain_oauth2_clients ```python -None client.update_oauth2_clients(id: UUID, request_body: List[UUID]) +None client.update_domain_oauth2_clients(id: UUID, request_body: List[UUID]) ``` **PUT** `/api/domain/{id}/oauth2Clients` -Update oauth2 clients (updateOauth2Clients) +Update oauth2 clients (updateDomainOauth2Clients) Update oauth2 clients for the specified domain. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/DomainInfo.md b/paas/docs/DomainInfo.md index 492e3e18..38238a7f 100644 --- a/paas/docs/DomainInfo.md +++ b/paas/docs/DomainInfo.md @@ -12,10 +12,10 @@ | **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id | [optional] | | **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id | [optional] | | **name** | **str** | Domain name. Cannot be empty | | -| **oauth2_client_infos** | [**List[OAuth2ClientInfo]**](OAuth2ClientInfo.md) | List of available oauth2 clients | [optional] | | **oauth2_enabled** | **bool** | Whether OAuth2 settings are enabled or not | [optional] | -| **owner_id** | [**EntityId**](EntityId.md) | JSON object with Customer or Tenant Id | [optional] [readonly] | | **propagate_to_edge** | **bool** | Whether OAuth2 settings are enabled on Edge or not | [optional] | +| **oauth2_client_infos** | [**List[OAuth2ClientInfo]**](OAuth2ClientInfo.md) | List of available oauth2 clients | [optional] | +| **owner_id** | [**EntityId**](EntityId.md) | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/DummyJobConfiguration.md b/paas/docs/DummyJobConfiguration.md index a77407eb..f531323f 100644 --- a/paas/docs/DummyJobConfiguration.md +++ b/paas/docs/DummyJobConfiguration.md @@ -39,6 +39,7 @@ Dummy job configuration | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | --- diff --git a/paas/docs/DummyJobResult.md b/paas/docs/DummyJobResult.md index 334aeb74..65dba3ae 100644 --- a/paas/docs/DummyJobResult.md +++ b/paas/docs/DummyJobResult.md @@ -35,6 +35,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | --- diff --git a/paas/docs/DummyTaskResult.md b/paas/docs/DummyTaskResult.md index f3b522c4..343d15cd 100644 --- a/paas/docs/DummyTaskResult.md +++ b/paas/docs/DummyTaskResult.md @@ -22,6 +22,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### DummyTaskFailure diff --git a/paas/docs/AlarmRuleDurationCondition.md b/paas/docs/DurationAlarmCondition.md similarity index 76% rename from paas/docs/AlarmRuleDurationCondition.md rename to paas/docs/DurationAlarmCondition.md index dbd2fec6..35f6b3ce 100644 --- a/paas/docs/AlarmRuleDurationCondition.md +++ b/paas/docs/DurationAlarmCondition.md @@ -1,9 +1,9 @@ -# AlarmRuleDurationCondition +# DurationAlarmCondition -`tb_paas_client.models.AlarmRuleDurationCondition` +`tb_paas_client.models.DurationAlarmCondition` -**Extends:** **AlarmRuleCondition** +**Extends:** **AlarmCondition** ## Properties @@ -16,11 +16,11 @@ ## Referenced Types -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | #### TimeUnit (enum) @@ -40,53 +40,56 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -95,46 +98,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -143,7 +143,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -152,7 +152,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -168,6 +168,6 @@ - **Package:** `tb_paas_client.models` - **Attribute access:** `obj.unit`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleDurationCondition.model_validate(data)` or `AlarmRuleDurationCondition.model_validate_json(json_str)` +- **Deserialize:** `DurationAlarmCondition.model_validate(data)` or `DurationAlarmCondition.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/DurationAlarmConditionSpec.md b/paas/docs/DurationAlarmConditionSpec.md deleted file mode 100644 index 7f1e51f0..00000000 --- a/paas/docs/DurationAlarmConditionSpec.md +++ /dev/null @@ -1,56 +0,0 @@ - -# DurationAlarmConditionSpec - -`tb_paas_client.models.DurationAlarmConditionSpec` - -Duration Alarm Condition Specification - -**Extends:** **AlarmConditionSpec** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **unit** | [**TimeUnit**](TimeUnit.md) | Duration time unit | [optional] | -| **predicate** | [**FilterPredicateValueLong**](FilterPredicateValueLong.md) | Duration predicate | [optional] | - - - -## Referenced Types - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.unit`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `DurationAlarmConditionSpec.model_validate(data)` or `DurationAlarmConditionSpec.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/DynamicValueInteger.md b/paas/docs/DynamicValueInteger.md deleted file mode 100644 index 6882ba88..00000000 --- a/paas/docs/DynamicValueInteger.md +++ /dev/null @@ -1,31 +0,0 @@ - -# DynamicValueInteger - -`tb_paas_client.models.DynamicValueInteger` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **resolved_value** | **int** | | [optional] | -| **source_type** | [**DynamicValueSourceType**](DynamicValueSourceType.md) | | [optional] | -| **source_attribute** | **str** | | [optional] | -| **inherit** | **bool** | | [optional] | - - - -## Referenced Types - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.resolved_value`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `DynamicValueInteger.model_validate(data)` or `DynamicValueInteger.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/DynamicValueLong.md b/paas/docs/DynamicValueLong.md deleted file mode 100644 index b2e24faa..00000000 --- a/paas/docs/DynamicValueLong.md +++ /dev/null @@ -1,31 +0,0 @@ - -# DynamicValueLong - -`tb_paas_client.models.DynamicValueLong` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **resolved_value** | **int** | | [optional] | -| **source_type** | [**DynamicValueSourceType**](DynamicValueSourceType.md) | | [optional] | -| **source_attribute** | **str** | | [optional] | -| **inherit** | **bool** | | [optional] | - - - -## Referenced Types - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.resolved_value`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `DynamicValueLong.model_validate(data)` or `DynamicValueLong.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/EntityAggregationCalculatedFieldConfiguration.md b/paas/docs/EntityAggregationCalculatedFieldConfiguration.md index 09a62627..a01b153b 100644 --- a/paas/docs/EntityAggregationCalculatedFieldConfiguration.md +++ b/paas/docs/EntityAggregationCalculatedFieldConfiguration.md @@ -10,10 +10,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **arguments** | [**Dict[str, Argument]**](Argument.md) | | | -| **interval** | [**AggInterval**](AggInterval.md) | | | | **metrics** | [**Dict[str, AggMetric]**](AggMetric.md) | | | -| **produce_intermediate_result** | **bool** | | [optional] | +| **interval** | [**AggInterval**](AggInterval.md) | | | | **watermark** | [**Watermark**](Watermark.md) | | [optional] | +| **produce_intermediate_result** | **bool** | | [optional] | @@ -24,8 +24,8 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### Argument | Name | Type | Description | Notes | @@ -37,6 +37,14 @@ | limit | int | | [optional] | | time_window | int | | [optional] | +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | str | | [optional] | +| input | AggInput | | [optional] | +| default_value | float | | [optional] | + #### AggInterval | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -91,14 +99,6 @@ | tz | str | | | | offset_sec | int | | [optional] | -#### AggMetric -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| function | AggFunction | | [optional] | -| filter | str | | [optional] | -| input | AggInput | | [optional] | -| default_value | float | | [optional] | - #### Watermark | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -107,9 +107,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | diff --git a/paas/docs/EntityDataDiff.md b/paas/docs/EntityDataDiff.md index 3fa747e6..e0d2e2a2 100644 --- a/paas/docs/EntityDataDiff.md +++ b/paas/docs/EntityDataDiff.md @@ -105,8 +105,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -153,56 +155,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -237,7 +239,6 @@ | nodes | List[RuleNode] | List of rule node JSON objects | | | connections | List[NodeConnectionInfo] | List of JSON objects that represent connections between rule nodes | | | rule_chain_connections | List[RuleChainConnectionInfo] | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List[RuleChainNote] | List of sticky notes placed on the rule chain canvas | [optional] | #### GroupPermission | Name | Type | Description | Notes | @@ -265,9 +266,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -321,21 +322,6 @@ | additional_info | object | JSON object with the additional information about the connection. | | | type | str | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | Unique identifier of the note on the canvas | [optional] | -| x | int | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | int | Vertical position of the note on the canvas, in pixels | [optional] | -| width | int | Width of the note, in pixels | [optional] | -| height | int | Height of the note, in pixels | [optional] | -| content | str | Markdown or HTML content of the note | [optional] | -| background_color | str | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| border_color | str | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| border_width | int | Border width of the note in pixels | [optional] | -| apply_default_markdown_style | bool | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdown_css | str | Custom CSS styles applied to the note content | [optional] | - #### OtaPackageType (enum) `FIRMWARE` | `SOFTWARE` @@ -369,11 +355,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -509,26 +495,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -559,41 +545,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -610,17 +596,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -629,46 +618,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -677,7 +663,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -686,7 +672,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/EntityExportData.md b/paas/docs/EntityExportData.md index c814753a..db931012 100644 --- a/paas/docs/EntityExportData.md +++ b/paas/docs/EntityExportData.md @@ -103,8 +103,10 @@ Base export container for ThingsBoard entities #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -178,7 +180,6 @@ Base export container for ThingsBoard entities | nodes | List[RuleNode] | List of rule node JSON objects | | | connections | List[NodeConnectionInfo] | List of JSON objects that represent connections between rule nodes | | | rule_chain_connections | List[RuleChainConnectionInfo] | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List[RuleChainNote] | List of sticky notes placed on the rule chain canvas | [optional] | #### RelationTypeGroup (enum) `COMMON` | `DASHBOARD` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` @@ -196,56 +197,56 @@ Base export container for ThingsBoard entities #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -303,27 +304,12 @@ Base export container for ThingsBoard entities | additional_info | object | JSON object with the additional information about the connection. | | | type | str | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | Unique identifier of the note on the canvas | [optional] | -| x | int | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | int | Vertical position of the note on the canvas, in pixels | [optional] | -| width | int | Width of the note, in pixels | [optional] | -| height | int | Height of the note, in pixels | [optional] | -| content | str | Markdown or HTML content of the note | [optional] | -| background_color | str | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| border_color | str | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| border_width | int | Border width of the note in pixels | [optional] | -| apply_default_markdown_style | bool | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdown_css | str | Custom CSS styles applied to the note content | [optional] | - #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -367,11 +353,11 @@ Base export container for ThingsBoard entities | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -507,26 +493,26 @@ Base export container for ThingsBoard entities #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -557,41 +543,41 @@ Base export container for ThingsBoard entities #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -608,17 +594,20 @@ Base export container for ThingsBoard entities | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -627,46 +616,43 @@ Base export container for ThingsBoard entities #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -675,7 +661,7 @@ Base export container for ThingsBoard entities | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -684,7 +670,7 @@ Base export container for ThingsBoard entities | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/EntityExportSettings.md b/paas/docs/EntityExportSettings.md new file mode 100644 index 00000000..39e3ff99 --- /dev/null +++ b/paas/docs/EntityExportSettings.md @@ -0,0 +1,28 @@ + +# EntityExportSettings + +`tb_paas_client.models.EntityExportSettings` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **export_relations** | **bool** | | [optional] | +| **export_attributes** | **bool** | | [optional] | +| **export_credentials** | **bool** | | [optional] | +| **export_calculated_fields** | **bool** | | [optional] | +| **export_permissions** | **bool** | | [optional] | +| **export_group_entities** | **bool** | | [optional] | + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.export_relations`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `EntityExportSettings.model_validate(data)` or `EntityExportSettings.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/EntityGroupControllerApi.md b/paas/docs/EntityGroupControllerApi.md index 65b06f9d..6631e141 100644 --- a/paas/docs/EntityGroupControllerApi.md +++ b/paas/docs/EntityGroupControllerApi.md @@ -37,7 +37,6 @@ None client.remove_entities_from_entity_group(entity_group_id: str, request_body EntityGroupInfo client.save_entity_group(entity_group: EntityGroup) # Create Or Update Entity Group (saveEntityGroup) None client.share_entity_group(entity_group_id: str, share_group_request: ShareGroupRequest) # Share the Entity Group (shareEntityGroup) None client.share_entity_group_to_child_owner_user_group(entity_group_id: str, user_group_id: str, role_id: str) # Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup) -None client.share_entity_group_to_child_owner_user_group_v2(entity_group_id: UUID, share_group_request: ShareGroupRequest) # Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroupV2) EntityGroup client.unassign_entity_group_from_edge(edge_id: str, group_type: str, entity_group_id: str) # Unassign entity group from edge (unassignEntityGroupFromEdge) ``` @@ -946,31 +945,6 @@ Share the entity group with specified user group using specified role. Availab None (empty response body) -## share_entity_group_to_child_owner_user_group_v2 - -```python -None client.share_entity_group_to_child_owner_user_group_v2(entity_group_id: UUID, share_group_request: ShareGroupRequest) -``` - -**POST** `/api/v2/entityGroup/{entityGroupId}/share` - -Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroupV2) - -Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. - - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **entity_group_id** | **UUID** | A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **share_group_request** | **ShareGroupRequest** | | | - -### Return type - -None (empty response body) - - ## unassign_entity_group_from_edge ```python diff --git a/paas/docs/EntityGroupExportData.md b/paas/docs/EntityGroupExportData.md index acb156eb..f3135664 100644 --- a/paas/docs/EntityGroupExportData.md +++ b/paas/docs/EntityGroupExportData.md @@ -54,8 +54,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -105,56 +107,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -172,9 +174,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -218,11 +220,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -358,26 +360,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -408,41 +410,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -459,17 +461,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -478,46 +483,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -526,7 +528,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -535,7 +537,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/EntityGroupInfo.md b/paas/docs/EntityGroupInfo.md index ae2997c9..b58242f5 100644 --- a/paas/docs/EntityGroupInfo.md +++ b/paas/docs/EntityGroupInfo.md @@ -15,7 +15,7 @@ | **additional_info** | **object** | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | **configuration** | **object** | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | **version** | **int** | | [optional] | -| **owner_ids** | [**List[EntityGroupInfoOwnerIdsInner]**](EntityGroupInfoOwnerIdsInner.md) | List of the entity group owners. | | +| **owner_ids** | [**List[EntityId]**](EntityId.md) | | [optional] | | **edge_group_all** | **bool** | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | **group_all** | **bool** | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | **tenant_id** | [**TenantId**](TenantId.md) | | [optional] | @@ -84,12 +84,6 @@ > **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. -#### EntityGroupInfoOwnerIdsInner -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| entity_type | EntityType | | | -| id | UUID | ID of the entity, time-based UUID v1 | | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) diff --git a/paas/docs/EntityGroupInfoOwnerIdsInner.md b/paas/docs/EntityGroupInfoOwnerIdsInner.md deleted file mode 100644 index 349a8e49..00000000 --- a/paas/docs/EntityGroupInfoOwnerIdsInner.md +++ /dev/null @@ -1,29 +0,0 @@ - -# EntityGroupInfoOwnerIdsInner - -`tb_paas_client.models.EntityGroupInfoOwnerIdsInner` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **entity_type** | [**EntityType**](EntityType.md) | | | -| **id** | **UUID** | ID of the entity, time-based UUID v1 | | - - - -## Referenced Types - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.entity_type`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `EntityGroupInfoOwnerIdsInner.model_validate(data)` or `EntityGroupInfoOwnerIdsInner.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/EntityTableComponent.md b/paas/docs/EntityTableComponent.md index 674097c8..94aa3111 100644 --- a/paas/docs/EntityTableComponent.md +++ b/paas/docs/EntityTableComponent.md @@ -65,7 +65,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### ReportComponentSubType (enum) `DOUGHNUTCHART` | `HORIZONTALDOUGHNUTCHART` | `POINTCHART` | `BARCHART` | `PIECHART` | `LINECHART` | `LATESTBARCHART` | `RANGECHART` | `BARCHARTWITHLABELS` | `STATECHART` | … (11 values total) @@ -114,7 +114,7 @@ #### VerticalAlignment (enum) `BOTTOM` | `TOP` | `MIDDLE` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### Aggregation (enum) diff --git a/paas/docs/EntityViewExportData.md b/paas/docs/EntityViewExportData.md index 62a40c29..664c6e08 100644 --- a/paas/docs/EntityViewExportData.md +++ b/paas/docs/EntityViewExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/ErrorComponent.md b/paas/docs/ErrorComponent.md index 0cae9295..296f74e3 100644 --- a/paas/docs/ErrorComponent.md +++ b/paas/docs/ErrorComponent.md @@ -53,8 +53,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | --- diff --git a/paas/docs/ErrorComponentAllOfException.md b/paas/docs/ErrorComponentAllOfException.md index bc2d2ef0..184fea98 100644 --- a/paas/docs/ErrorComponentAllOfException.md +++ b/paas/docs/ErrorComponentAllOfException.md @@ -33,8 +33,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | --- diff --git a/paas/docs/ErrorComponentAllOfExceptionCause.md b/paas/docs/ErrorComponentAllOfExceptionCause.md index 907f8227..a0931b73 100644 --- a/paas/docs/ErrorComponentAllOfExceptionCause.md +++ b/paas/docs/ErrorComponentAllOfExceptionCause.md @@ -24,8 +24,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | --- diff --git a/paas/docs/ErrorComponentAllOfExceptionCauseStackTrace.md b/paas/docs/ErrorComponentAllOfExceptionCauseStackTrace.md index aed240a8..4bf383ec 100644 --- a/paas/docs/ErrorComponentAllOfExceptionCauseStackTrace.md +++ b/paas/docs/ErrorComponentAllOfExceptionCauseStackTrace.md @@ -13,8 +13,8 @@ | **method_name** | **str** | | [optional] | | **file_name** | **str** | | [optional] | | **line_number** | **int** | | [optional] | -| **class_name** | **str** | | [optional] | | **native_method** | **bool** | | [optional] | +| **class_name** | **str** | | [optional] | diff --git a/paas/docs/ExportableEntity.md b/paas/docs/ExportableEntity.md index fa7bd96a..947b12a2 100644 --- a/paas/docs/ExportableEntity.md +++ b/paas/docs/ExportableEntity.md @@ -7,8 +7,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **created_time** | **int** | | [optional] | | **id** | [**EntityId**](EntityId.md) | | [optional] | | **name** | **str** | | [optional] | +| **tenant_id** | [**TenantId**](TenantId.md) | | [optional] | @@ -24,7 +26,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.id`, `obj.name`, etc. +- **Attribute access:** `obj.created_time`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `ExportableEntity.model_validate(data)` or `ExportableEntity.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/FilterPredicateValueInteger.md b/paas/docs/FilterPredicateValueInteger.md deleted file mode 100644 index d4193342..00000000 --- a/paas/docs/FilterPredicateValueInteger.md +++ /dev/null @@ -1,38 +0,0 @@ - -# FilterPredicateValueInteger - -`tb_paas_client.models.FilterPredicateValueInteger` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **default_value** | **int** | | [optional] | -| **user_value** | **int** | | [optional] | -| **dynamic_value** | [**DynamicValueInteger**](DynamicValueInteger.md) | | [optional] | - - - -## Referenced Types - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.default_value`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `FilterPredicateValueInteger.model_validate(data)` or `FilterPredicateValueInteger.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/FilterPredicateValueLong.md b/paas/docs/FilterPredicateValueLong.md deleted file mode 100644 index 2bb9bf43..00000000 --- a/paas/docs/FilterPredicateValueLong.md +++ /dev/null @@ -1,38 +0,0 @@ - -# FilterPredicateValueLong - -`tb_paas_client.models.FilterPredicateValueLong` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **default_value** | **int** | | [optional] | -| **user_value** | **int** | | [optional] | -| **dynamic_value** | [**DynamicValueLong**](DynamicValueLong.md) | | [optional] | - - - -## Referenced Types - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.default_value`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `FilterPredicateValueLong.model_validate(data)` or `FilterPredicateValueLong.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/GeofencingCalculatedFieldConfiguration.md b/paas/docs/GeofencingCalculatedFieldConfiguration.md index 930f76bc..2baafcb0 100644 --- a/paas/docs/GeofencingCalculatedFieldConfiguration.md +++ b/paas/docs/GeofencingCalculatedFieldConfiguration.md @@ -10,9 +10,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **entity_coordinates** | [**EntityCoordinates**](EntityCoordinates.md) | | | +| **zone_groups** | [**Dict[str, ZoneGroupConfiguration]**](ZoneGroupConfiguration.md) | | | | **scheduled_update_enabled** | **bool** | | [optional] | | **scheduled_update_interval** | **int** | | [optional] | -| **zone_groups** | [**Dict[str, ZoneGroupConfiguration]**](ZoneGroupConfiguration.md) | | | @@ -23,8 +23,8 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### EntityCoordinates | Name | Type | Description | Notes | @@ -46,9 +46,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | diff --git a/paas/docs/GitHubModelsChatModelConfig.md b/paas/docs/GitHubModelsChatModelConfig.md index 982a5180..9ae33c9f 100644 --- a/paas/docs/GitHubModelsChatModelConfig.md +++ b/paas/docs/GitHubModelsChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**GitHubModelsProviderConfig**](GitHubModelsProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -19,6 +18,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -29,20 +29,20 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### GitHubModelsProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | personal_access_token | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `GitHubModelsChatModelConfig.model_validate(data)` or `GitHubModelsChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/GoogleAiGeminiChatModelConfig.md b/paas/docs/GoogleAiGeminiChatModelConfig.md index a14e71a3..5334469d 100644 --- a/paas/docs/GoogleAiGeminiChatModelConfig.md +++ b/paas/docs/GoogleAiGeminiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**GoogleAiGeminiProviderConfig**](GoogleAiGeminiProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -20,6 +19,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -30,20 +30,20 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### GoogleAiGeminiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | api_key | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `GoogleAiGeminiChatModelConfig.model_validate(data)` or `GoogleAiGeminiChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/GoogleVertexAiGeminiChatModelConfig.md b/paas/docs/GoogleVertexAiGeminiChatModelConfig.md index 0a3e3537..579a5475 100644 --- a/paas/docs/GoogleVertexAiGeminiChatModelConfig.md +++ b/paas/docs/GoogleVertexAiGeminiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**GoogleVertexAiGeminiProviderConfig**](GoogleVertexAiGeminiProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -20,6 +19,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -30,9 +30,6 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### GoogleVertexAiGeminiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -41,12 +38,15 @@ | location | str | | | | service_account_key | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `GoogleVertexAiGeminiChatModelConfig.model_validate(data)` or `GoogleVertexAiGeminiChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/GroupPermissionInfo.md b/paas/docs/GroupPermissionInfo.md index 3a31b2e2..e230103d 100644 --- a/paas/docs/GroupPermissionInfo.md +++ b/paas/docs/GroupPermissionInfo.md @@ -40,11 +40,12 @@ | id | RoleId | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | created_time | int | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the role. May include: 'description' (string). | [optional] | -| tenant_id | TenantId | JSON object with Tenant Id. | [readonly] | +| tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | | customer_id | CustomerId | JSON object with Customer Id. | [optional] [readonly] | | name | str | Role Name | | | type | RoleType | Type of the role: generic or group | | -| permissions | object | | [optional] | +| permissions | object | JSON object with the set of permissions. Structure is specific for role type | | +| excluded_permissions | object | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] | | version | int | | [optional] | | owner_id | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/HeaderFooter.md b/paas/docs/HeaderFooter.md index 90128bf7..8c8b3307 100644 --- a/paas/docs/HeaderFooter.md +++ b/paas/docs/HeaderFooter.md @@ -263,7 +263,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -309,35 +309,6 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportLatestChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -359,35 +330,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### DashboardReportConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -453,7 +395,7 @@ #### FontStyle (enum) `NORMAL` | `ITALIC` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History @@ -620,8 +562,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### Aggregation (enum) `MIN` | `MAX` | `AVG` | `SUM` | `COUNT` | `NONE` @@ -702,19 +644,14 @@ #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### ColorRange -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -751,26 +688,12 @@ | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### EntityType (enum) -`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` - -#### ChartFillType (enum) -`NONE` | `OPACITY` | `GRADIENT` - -#### ChartFillSettingsGradient +#### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| start | float | | [optional] | -| end | float | | [optional] | +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | #### LineSeriesStepType (enum) `START` | `MIDDLE` | `END` @@ -778,15 +701,21 @@ #### ChartLabelPosition (enum) `TOP` | `BOTTOM` -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` +#### ChartFillSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | -#### DataKeyComparisonSettings +#### ChartFillType (enum) +`NONE` | `OPACITY` | `GRADIENT` + +#### ChartFillSettingsGradient | Name | Type | Description | Notes | |------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | +| start | float | | [optional] | +| end | float | | [optional] | --- diff --git a/paas/docs/HomeDashboard.md b/paas/docs/HomeDashboard.md new file mode 100644 index 00000000..0d9740ba --- /dev/null +++ b/paas/docs/HomeDashboard.md @@ -0,0 +1,72 @@ + +# HomeDashboard + +`tb_paas_client.models.HomeDashboard` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **id** | [**DashboardId**](DashboardId.md) | JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard. | [optional] | +| **created_time** | **int** | Timestamp of the dashboard creation, in milliseconds | [optional] [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. Tenant Id of the dashboard can't be changed. | [optional] [readonly] | +| **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. | [optional] | +| **owner_id** | [**EntityId**](EntityId.md) | JSON object with Customer or Tenant Id | [optional] [readonly] | +| **title** | **str** | Title of the dashboard. | [optional] | +| **name** | **str** | Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard. | [optional] [readonly] | +| **image** | **str** | Thumbnail picture for rendering of the dashboards in a grid view on mobile devices. | [optional] [readonly] | +| **assigned_customers** | [**List[ShortCustomerInfo]**](ShortCustomerInfo.md) | List of assigned customers with their info. | [optional] | +| **mobile_hide** | **bool** | Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens. | [optional] [readonly] | +| **mobile_order** | **int** | Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications | [optional] [readonly] | +| **configuration** | **object** | | [optional] | +| **resources** | [**List[ResourceExportData]**](ResourceExportData.md) | | [optional] | +| **version** | **int** | | [optional] | +| **hide_dashboard_toolbar** | **bool** | Hide dashboard toolbar flag. Useful for rendering dashboards on mobile. | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### ShortCustomerInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| customer_id | CustomerId | JSON object with the customer Id. | [optional] | +| title | str | Title of the customer. | [optional] | +| public | bool | Indicates special 'Public' customer used to embed dashboards on public websites. | [optional] | + +#### ResourceExportData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| link | str | | [optional] | +| title | str | | [optional] | +| type | ResourceType | | [optional] | +| sub_type | ResourceSubType | | [optional] | +| resource_key | str | | [optional] | +| file_name | str | | [optional] | +| public_resource_key | str | | [optional] | +| media_type | str | | [optional] | +| data | str | | [optional] | +| is_public | bool | | [optional] | +| public | bool | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +#### ResourceType (enum) +`LWM2_M_MODEL` | `JKS` | `PKCS_12` | `JS_MODULE` | `IMAGE` | `DASHBOARD` | `GENERAL` + +#### ResourceSubType (enum) +`IMAGE` | `SCADA_SYMBOL` | `EXTENSION` | `MODULE` + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.id`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `HomeDashboard.model_validate(data)` or `HomeDashboard.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/IntegrationExportData.md b/paas/docs/IntegrationExportData.md index c89bfb74..d5cbe2e2 100644 --- a/paas/docs/IntegrationExportData.md +++ b/paas/docs/IntegrationExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/Job.md b/paas/docs/Job.md index dd97df47..830e9747 100644 --- a/paas/docs/Job.md +++ b/paas/docs/Job.md @@ -108,6 +108,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### NotificationRequest diff --git a/paas/docs/JobConfiguration.md b/paas/docs/JobConfiguration.md index 056fecd9..8fc494bf 100644 --- a/paas/docs/JobConfiguration.md +++ b/paas/docs/JobConfiguration.md @@ -62,6 +62,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### NotificationRequest diff --git a/paas/docs/JobResult.md b/paas/docs/JobResult.md index 35885a39..f83ff74a 100644 --- a/paas/docs/JobResult.md +++ b/paas/docs/JobResult.md @@ -46,6 +46,7 @@ Job execution result | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### Report diff --git a/paas/docs/LatestChartComponent.md b/paas/docs/LatestChartComponent.md index e09189c3..0b290cd9 100644 --- a/paas/docs/LatestChartComponent.md +++ b/paas/docs/LatestChartComponent.md @@ -80,35 +80,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### ReportComponentSubType (enum) `DOUGHNUTCHART` | `HORIZONTALDOUGHNUTCHART` | `POINTCHART` | `BARCHART` | `PIECHART` | `LINECHART` | `LATESTBARCHART` | `RANGECHART` | `BARCHARTWITHLABELS` | `STATECHART` | … (11 values total) @@ -205,27 +176,6 @@ #### FontStyle (enum) `NORMAL` | `ITALIC` -#### BarSeriesSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_border | bool | | [optional] | -| border_width | float | | [optional] | -| border_radius | float | | [optional] | -| bar_width | float | | [optional] | -| show_label | bool | | [optional] | -| label_position | ChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| enable_label_background | bool | | [optional] | -| label_background | str | | [optional] | -| background_settings | ChartFillSettings | | [optional] | - -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - #### History | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -244,16 +194,6 @@ #### DataKeySettingsType (enum) `COLUMN` | `TIME_SERIES_CHART` | `DEFAULT` -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | - #### Interval | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -301,6 +241,21 @@ | point_size | float | | [optional] | | fill_area_settings | ChartFillSettings | | [optional] | +#### BarSeriesSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| show_border | bool | | [optional] | +| border_width | float | | [optional] | +| border_radius | float | | [optional] | +| bar_width | float | | [optional] | +| show_label | bool | | [optional] | +| label_position | ChartLabelPosition | | [optional] | +| label_font | Font | | [optional] | +| label_color | str | | [optional] | +| enable_label_background | bool | | [optional] | +| label_background | str | | [optional] | +| background_settings | ChartFillSettings | | [optional] | + #### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -311,15 +266,6 @@ #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### ChartFillType (enum) -`NONE` | `OPACITY` | `GRADIENT` - -#### ChartFillSettingsGradient -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| start | float | | [optional] | -| end | float | | [optional] | - #### IntervalType (enum) `MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` @@ -332,9 +278,28 @@ #### ChartLineType (enum) `SOLID` | `DASHED` | `DOTTED` +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + #### ChartShape (enum) `EMPTYCIRCLE` | `CIRCLE` | `RECT` | `ROUNDRECT` | `TRIANGLE` | `DIAMOND` | `PIN` | `ARROW` | `NONE` +#### ChartFillSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | + +#### ChartFillType (enum) +`NONE` | `OPACITY` | `GRADIENT` + +#### ChartFillSettingsGradient +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| start | float | | [optional] | +| end | float | | [optional] | + --- ### Conventions diff --git a/paas/docs/MailConfigTemplateControllerApi.md b/paas/docs/MailConfigTemplateControllerApi.md index 4092d092..6908140a 100644 --- a/paas/docs/MailConfigTemplateControllerApi.md +++ b/paas/docs/MailConfigTemplateControllerApi.md @@ -3,19 +3,19 @@ `ThingsboardClient` methods: ```python -object client.get_client_registration_templates() # Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +object client.get_mail_config_templates() # Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. ``` -## get_client_registration_templates +## get_mail_config_templates ```python -object client.get_client_registration_templates() +object client.get_mail_config_templates() ``` **GET** `/api/mail/config/template` -Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. +Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Mail configuration template is set of default smtp settings for mail server that specific provider supports diff --git a/paas/docs/MistralAiChatModelConfig.md b/paas/docs/MistralAiChatModelConfig.md index ba5d52ed..122a3b71 100644 --- a/paas/docs/MistralAiChatModelConfig.md +++ b/paas/docs/MistralAiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**MistralAiProviderConfig**](MistralAiProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -19,6 +18,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -29,20 +29,20 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### MistralAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | api_key | str | | | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `MistralAiChatModelConfig.model_validate(data)` or `MistralAiChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmRuleNoDataFilterPredicate.md b/paas/docs/NoDataFilterPredicate.md similarity index 77% rename from paas/docs/AlarmRuleNoDataFilterPredicate.md rename to paas/docs/NoDataFilterPredicate.md index 07acb9a3..eeb8fc58 100644 --- a/paas/docs/AlarmRuleNoDataFilterPredicate.md +++ b/paas/docs/NoDataFilterPredicate.md @@ -1,7 +1,7 @@ -# AlarmRuleNoDataFilterPredicate +# NoDataFilterPredicate -`tb_paas_client.models.AlarmRuleNoDataFilterPredicate` +`tb_paas_client.models.NoDataFilterPredicate` **Extends:** **AlarmRuleKeyFilterPredicate** @@ -9,8 +9,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **duration** | [**AlarmConditionValueLong**](AlarmConditionValueLong.md) | | | | **unit** | [**TimeUnit**](TimeUnit.md) | | | +| **duration** | [**AlarmConditionValueLong**](AlarmConditionValueLong.md) | | | @@ -21,22 +21,22 @@ |------|------|-------------|-------| | type | str | | | +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + #### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.duration`, `obj.name`, etc. +- **Attribute access:** `obj.unit`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleNoDataFilterPredicate.model_validate(data)` or `AlarmRuleNoDataFilterPredicate.model_validate_json(json_str)` +- **Deserialize:** `NoDataFilterPredicate.model_validate(data)` or `NoDataFilterPredicate.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/NotificationRuleExportData.md b/paas/docs/NotificationRuleExportData.md index 65ec2556..3600e315 100644 --- a/paas/docs/NotificationRuleExportData.md +++ b/paas/docs/NotificationRuleExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/NotificationTargetExportData.md b/paas/docs/NotificationTargetExportData.md index 7bb254b1..2e7bbb2c 100644 --- a/paas/docs/NotificationTargetExportData.md +++ b/paas/docs/NotificationTargetExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/NotificationTemplateExportData.md b/paas/docs/NotificationTemplateExportData.md index fcd15be1..b7551b56 100644 --- a/paas/docs/NotificationTemplateExportData.md +++ b/paas/docs/NotificationTemplateExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/OllamaChatModelConfig.md b/paas/docs/OllamaChatModelConfig.md index 2aa122b8..ecd1b9c7 100644 --- a/paas/docs/OllamaChatModelConfig.md +++ b/paas/docs/OllamaChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**OllamaProviderConfig**](OllamaProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -19,6 +18,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -29,15 +29,15 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### OllamaProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | base_url | str | | | | auth | OllamaAuth | | | +#### AiModelType (enum) +`CHAT` + #### OllamaAuth | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -62,7 +62,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `OllamaChatModelConfig.model_validate(data)` or `OllamaChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/OpenAiChatModelConfig.md b/paas/docs/OpenAiChatModelConfig.md index efc53d4f..30019010 100644 --- a/paas/docs/OpenAiChatModelConfig.md +++ b/paas/docs/OpenAiChatModelConfig.md @@ -9,7 +9,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | | **provider_config** | [**OpenAiProviderConfig**](OpenAiProviderConfig.md) | | | | **model_id** | **str** | | | | **temperature** | **float** | | [optional] | @@ -19,6 +18,7 @@ | **max_output_tokens** | **int** | | [optional] | | **timeout_seconds** | **int** | | [optional] | | **max_retries** | **int** | | [optional] | +| **model_type** | [**AiModelType**](AiModelType.md) | | [optional] [readonly] | @@ -29,21 +29,21 @@ |------|------|-------------|-------| | provider | str | | | -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | base_url | str | | [optional] | | api_key | str | | [optional] | +#### AiModelType (enum) +`CHAT` + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.model_type`, `obj.name`, etc. +- **Attribute access:** `obj.provider_config`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `OpenAiChatModelConfig.model_validate(data)` or `OpenAiChatModelConfig.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/OtaPackageControllerApi.md b/paas/docs/OtaPackageControllerApi.md index 994ee709..f4f8a16c 100644 --- a/paas/docs/OtaPackageControllerApi.md +++ b/paas/docs/OtaPackageControllerApi.md @@ -9,7 +9,7 @@ PageDataOtaPackageInfo client.get_group_ota_packages(group_id: str, type: str, p OtaPackage client.get_ota_package_by_id(ota_package_id: str) # Get OTA Package (getOtaPackageById) OtaPackageInfo client.get_ota_package_info_by_id(ota_package_id: str) # Get OTA Package Info (getOtaPackageInfoById) PageDataOtaPackageInfo client.get_ota_packages(page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get OTA Package Infos (getOtaPackages) -PageDataOtaPackageInfo client.get_ota_packages_by_device_profile_id_and_type(device_profile_id: str, type: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) +PageDataOtaPackageInfo client.get_ota_packages_by_device_profile_and_type(device_profile_id: str, type: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) # Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileAndType) OtaPackageInfo client.save_ota_package_data(ota_package_id: str, checksum_algorithm: str, file: bytearray, checksum: Optional[str] = None) # Save OTA Package data (saveOtaPackageData) OtaPackageInfo client.save_ota_package_info(save_ota_package_info_request: SaveOtaPackageInfoRequest) # Create Or Update OTA Package Info (saveOtaPackageInfo) ``` @@ -169,15 +169,15 @@ Returns a page of OTA Package Info objects owned by tenant. You can specify para **PageDataOtaPackageInfo** -## get_ota_packages_by_device_profile_id_and_type +## get_ota_packages_by_device_profile_and_type ```python -PageDataOtaPackageInfo client.get_ota_packages_by_device_profile_id_and_type(device_profile_id: str, type: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) +PageDataOtaPackageInfo client.get_ota_packages_by_device_profile_and_type(device_profile_id: str, type: str, page_size: int, page: int, text_search: Optional[str] = None, sort_property: Optional[str] = None, sort_order: Optional[str] = None) ``` **GET** `/api/otaPackages/{deviceProfileId}/{type}` -Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) +Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileAndType) Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. diff --git a/paas/docs/OtaPackageExportData.md b/paas/docs/OtaPackageExportData.md index 0f3ffd7c..fb36ba0d 100644 --- a/paas/docs/OtaPackageExportData.md +++ b/paas/docs/OtaPackageExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/Output.md b/paas/docs/Output.md index ae96595f..c1e64211 100644 --- a/paas/docs/Output.md +++ b/paas/docs/Output.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **decimals_by_default** | **int** | | [optional] | | **name** | **str** | | [optional] | | **scope** | [**AttributeScope**](AttributeScope.md) | | [optional] | -| **decimals_by_default** | **int** | | [optional] | | **strategy** | **object** | | [optional] | | **type** | **str** | | | @@ -71,7 +71,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.name`, `obj.name`, etc. +- **Attribute access:** `obj.decimals_by_default`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `Output.model_validate(data)` or `Output.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/PageDataAiModel.md b/paas/docs/PageDataAiModel.md index 3fb623b9..91a4aaca 100644 --- a/paas/docs/PageDataAiModel.md +++ b/paas/docs/PageDataAiModel.md @@ -23,8 +23,8 @@ |------|------|-------------|-------| | id | AiModelId | | [optional] | | created_time | int | Entity creation timestamp in milliseconds since Unix epoch | [optional] [readonly] | -| tenant_id | TenantId | JSON object representing the ID of the tenant associated with this AI model | [readonly] | -| version | int | Version of the AI model record; increments automatically whenever the record is changed | [readonly] | +| tenant_id | TenantId | JSON object representing the ID of the tenant associated with this AI model | [optional] [readonly] | +| version | int | Version of the AI model record; increments automatically whenever the record is changed | [optional] [readonly] | | name | str | Display name for this AI model configuration; not the technical model identifier | | | configuration | AiModelConfig | Configuration of the AI model | [optional] | @@ -36,7 +36,6 @@ #### AmazonBedrockChatModelConfig *(extends AiModelConfig, provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AmazonBedrockProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -44,11 +43,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(extends AiModelConfig, provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AnthropicProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -57,11 +56,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(extends AiModelConfig, provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AzureOpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -71,11 +70,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(extends AiModelConfig, provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GitHubModelsProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -85,11 +84,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -100,11 +99,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleVertexAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -115,11 +114,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(extends AiModelConfig, provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | MistralAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -129,11 +128,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(extends AiModelConfig, provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OllamaProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -143,11 +142,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(extends AiModelConfig, provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -157,19 +156,20 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | base_url | str | | [optional] | | api_key | str | | [optional] | +#### AiModelType (enum) +`CHAT` + #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/paas/docs/PageDataAlarmRuleDefinition.md b/paas/docs/PageDataAlarmRuleDefinition.md new file mode 100644 index 00000000..21f5c3b8 --- /dev/null +++ b/paas/docs/PageDataAlarmRuleDefinition.md @@ -0,0 +1,497 @@ + +# PageDataAlarmRuleDefinition + +`tb_paas_client.models.PageDataAlarmRuleDefinition` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **data** | [**List[AlarmRuleDefinition]**](AlarmRuleDefinition.md) | Array of the entities | [optional] | +| **total_pages** | **int** | Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria | [optional] [readonly] | +| **total_elements** | **int** | Total number of elements in all available pages | [optional] [readonly] | +| **has_next** | **bool** | 'false' value indicates the end of the result set | [optional] [readonly] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### AlarmRuleDefinition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | CalculatedFieldId | JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. | [optional] | +| created_time | int | Timestamp of the alarm rule creation, in milliseconds | [optional] [readonly] | +| tenant_id | TenantId | | [optional] | +| entity_id | EntityId | | [optional] | +| name | str | User defined name of the alarm rule. | [optional] | +| debug_settings | DebugSettings | Debug settings object. | [optional] | +| configuration_version | int | Version of alarm rule configuration. | [optional] | +| configuration | AlarmCalculatedFieldConfiguration | | | +| version | int | | [optional] | +| additional_info | object | Additional parameters of the alarm rule. May include: 'description' (string). | [optional] | +| debug_mode | bool | | [optional] | + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failures_enabled | bool | Debug failures. | [optional] | +| all_enabled | bool | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| all_enabled_until | int | Timestamp of the end time for the processing debug events. | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | str | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | +| propagate | bool | | [optional] | +| propagate_to_owner | bool | | [optional] | +| propagate_to_owner_hierarchy | bool | | [optional] | +| propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| metrics | Dict[str, AggMetric] | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | +| scheduled_update_enabled | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Dict[str, Argument] | | | +| deduplication_interval_in_sec | int | | [optional] | +| metrics | Dict[str, AggMetric] | | | +| use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| use_latest_ts | bool | | [optional] | + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| ref_entity_key | ReferencedEntityKey | | [optional] | +| default_value | str | | [optional] | +| limit | int | | [optional] | +| time_window | int | | [optional] | + +#### AlarmRule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| condition | AlarmCondition | | | +| alarm_details | str | | [optional] | +| dashboard_id | DashboardId | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| decimals_by_default | int | | [optional] | +| name | str | | [optional] | +| scope | AttributeScope | | [optional] | +| strategy | object | | [optional] | +| type | str | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List[RelationPathLevel] | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### AlarmCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | +| type | str | | | + +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitude_key_name | str | | | +| longitude_key_name | str | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeter_key_name | str | | | +| report_strategy | GeofencingReportStrategy | | | +| create_relations_with_matched_zones | bool | | [optional] | +| relation_type | str | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relation_type | str | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | str | | [optional] | +| input | AggInput | | [optional] | +| default_value | float | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | +| duration_sec | int | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | int | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | str | | | + +#### AlarmConditionValueAlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | int | | [optional] | +| save_time_series | bool | | [optional] | +| save_latest | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| send_attributes_updated_notification | bool | | [optional] | +| update_attributes_only_on_value_change | bool | | [optional] | +| save_attribute | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | str | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | + +#### AlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* + +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | + +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | str | | [optional] | +| days_of_week | List[int] | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | str | | | +| value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | + +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | + +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | + +#### CustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| enabled | bool | | [optional] | +| day_of_week | int | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### AlarmRuleStringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | str | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmRuleNumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | float | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmRuleBooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | bool | | [optional] | +| dynamic_value_argument | str | | [optional] | + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.data`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `PageDataAlarmRuleDefinition.model_validate(data)` or `PageDataAlarmRuleDefinition.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/PageDataAlarmRuleDefinitionInfo.md b/paas/docs/PageDataAlarmRuleDefinitionInfo.md new file mode 100644 index 00000000..08494c35 --- /dev/null +++ b/paas/docs/PageDataAlarmRuleDefinitionInfo.md @@ -0,0 +1,498 @@ + +# PageDataAlarmRuleDefinitionInfo + +`tb_paas_client.models.PageDataAlarmRuleDefinitionInfo` + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **data** | [**List[AlarmRuleDefinitionInfo]**](AlarmRuleDefinitionInfo.md) | Array of the entities | [optional] | +| **total_pages** | **int** | Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria | [optional] [readonly] | +| **total_elements** | **int** | Total number of elements in all available pages | [optional] [readonly] | +| **has_next** | **bool** | 'false' value indicates the end of the result set | [optional] [readonly] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### AlarmRuleDefinitionInfo +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| id | CalculatedFieldId | JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error. | [optional] | +| created_time | int | Timestamp of the alarm rule creation, in milliseconds | [optional] [readonly] | +| tenant_id | TenantId | | [optional] | +| entity_id | EntityId | | [optional] | +| name | str | User defined name of the alarm rule. | [optional] | +| debug_settings | DebugSettings | Debug settings object. | [optional] | +| configuration_version | int | Version of alarm rule configuration. | [optional] | +| configuration | AlarmCalculatedFieldConfiguration | | | +| version | int | | [optional] | +| additional_info | object | Additional parameters of the alarm rule. May include: 'description' (string). | [optional] | +| entity_name | str | | [optional] | +| debug_mode | bool | | [optional] | + +#### DebugSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| failures_enabled | bool | Debug failures. | [optional] | +| all_enabled | bool | Debug All. Used as a trigger for updating debugAllUntil. | [optional] | +| all_enabled_until | int | Timestamp of the end time for the processing debug events. | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +#### CalculatedFieldConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| output | Output | | [optional] | +| type | str | | | + +#### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | +| propagate | bool | | [optional] | +| propagate_to_owner | bool | | [optional] | +| propagate_to_owner_hierarchy | bool | | [optional] | +| propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | + +#### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| metrics | Dict[str, AggMetric] | | | +| interval | AggInterval | | | +| watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | + +#### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | +| scheduled_update_enabled | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | + +#### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | + +#### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| relation | RelationPathLevel | | | +| arguments | Dict[str, Argument] | | | +| deduplication_interval_in_sec | int | | [optional] | +| metrics | Dict[str, AggMetric] | | | +| use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | + +#### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | + +#### SimpleCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| arguments | Dict[str, Argument] | | | +| expression | str | | [optional] | +| use_latest_ts | bool | | [optional] | + +#### Argument +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| ref_entity_key | ReferencedEntityKey | | [optional] | +| default_value | str | | [optional] | +| limit | int | | [optional] | +| time_window | int | | [optional] | + +#### AlarmRule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| condition | AlarmCondition | | | +| alarm_details | str | | [optional] | +| dashboard_id | DashboardId | | [optional] | + +#### Output +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| decimals_by_default | int | | [optional] | +| name | str | | [optional] | +| scope | AttributeScope | | [optional] | +| strategy | object | | [optional] | +| type | str | | | + +#### AttributesOutput *(extends Output, type=`ATTRIBUTES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | AttributesOutputStrategy | | [optional] | + +#### TimeSeriesOutput *(extends Output, type=`TIME_SERIES`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| strategy | TimeSeriesOutputStrategy | | [optional] | + +#### CfArgumentDynamicSourceConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CurrentOwnerDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`CURRENT_OWNER`)* +*See CfArgumentDynamicSourceConfiguration for properties.* + +#### RelationPathQueryDynamicSourceConfiguration *(extends CfArgumentDynamicSourceConfiguration, type=`RELATION_PATH_QUERY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| levels | List[RelationPathLevel] | | [optional] | + +#### ReferencedEntityKey +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | +| type | ArgumentType | | [optional] | +| scope | AttributeScope | | [optional] | + +#### AlarmCondition +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | AlarmConditionExpression | | | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | +| type | str | | | + +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| value | AlarmConditionValueLong | | | + +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| count | AlarmConditionValueInteger | | | + +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* + +#### AttributeScope (enum) +`CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` + +#### EntityCoordinates +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| latitude_key_name | str | | | +| longitude_key_name | str | | | + +#### ZoneGroupConfiguration +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ref_entity_id | EntityId | | [optional] | +| ref_dynamic_source_configuration | CfArgumentDynamicSourceConfiguration | | [optional] | +| perimeter_key_name | str | | | +| report_strategy | GeofencingReportStrategy | | | +| create_relations_with_matched_zones | bool | | [optional] | +| relation_type | str | | [optional] | +| direction | EntitySearchDirection | | [optional] | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relation_type | str | | | + +#### AggMetric +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | AggFunction | | [optional] | +| filter | str | | [optional] | +| input | AggInput | | [optional] | +| default_value | float | | [optional] | + +#### AggInterval +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### CustomInterval *(extends AggInterval, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | +| duration_sec | int | | | + +#### DayInterval *(extends AggInterval, type=`DAY`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### HourInterval *(extends AggInterval, type=`HOUR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### MonthInterval *(extends AggInterval, type=`MONTH`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### QuarterInterval *(extends AggInterval, type=`QUARTER`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekInterval *(extends AggInterval, type=`WEEK`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### WeekSunSatInterval *(extends AggInterval, type=`WEEK_SUN_SAT`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### YearInterval *(extends AggInterval, type=`YEAR`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| tz | str | | | +| offset_sec | int | | [optional] | + +#### Watermark +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| duration | int | | [optional] | + +#### ArgumentType (enum) +`TS_LATEST` | `ATTRIBUTE` | `TS_ROLLING` + +#### AlarmConditionExpression +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | + +#### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| expression | str | | | + +#### AlarmConditionValueAlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### TimeSeriesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### TimeSeriesImmediateOutputStrategy *(extends TimeSeriesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| ttl | int | | [optional] | +| save_time_series | bool | | [optional] | +| save_latest | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### TimeSeriesRuleChainOutputStrategy *(extends TimeSeriesOutputStrategy, type=`RULE_CHAIN`)* +*See TimeSeriesOutputStrategy for properties.* + +#### AttributesOutputStrategy +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AttributesImmediateOutputStrategy *(extends AttributesOutputStrategy, type=`IMMEDIATE`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| send_attributes_updated_notification | bool | | [optional] | +| update_attributes_only_on_value_change | bool | | [optional] | +| save_attribute | bool | | [optional] | +| send_ws_update | bool | | [optional] | +| process_cfs | bool | | [optional] | + +#### AttributesRuleChainOutputStrategy *(extends AttributesOutputStrategy, type=`RULE_CHAIN`)* +*See AttributesOutputStrategy for properties.* + +#### GeofencingReportStrategy (enum) +`REPORT_TRANSITION_EVENTS_ONLY` | `REPORT_PRESENCE_STATUS_ONLY` | `REPORT_TRANSITION_EVENTS_AND_PRESENCE_STATUS` + +#### EntitySearchDirection (enum) +`FROM` | `TO` + +#### AggFunction (enum) +`MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` + +#### AggInput +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AggFunctionInput *(extends AggInput, type=`function`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| function | str | | [optional] | + +#### AggKeyInput *(extends AggInput, type=`key`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| key | str | | [optional] | + +#### AlarmSchedule +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* + +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | + +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| timezone | str | | [optional] | +| days_of_week | List[int] | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + +#### AlarmConditionValueLong +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmConditionValueInteger +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | int | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmConditionFilter +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| argument | str | | | +| value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | + +#### AlarmRuleComplexOperation (enum) +`AND` | `OR` + +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + +#### AlarmRuleKeyFilterPredicate +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | str | | | + +#### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleBooleanOperation | | | +| value | AlarmConditionValueBoolean | | | + +#### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | + +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | + +#### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleNumericOperation | | | +| value | AlarmConditionValueDouble | | | + +#### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| operation | AlarmRuleStringOperation | | | +| value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | + +#### CustomTimeScheduleItem +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| enabled | bool | | [optional] | +| day_of_week | int | | [optional] | +| starts_on | int | | [optional] | +| ends_on | int | | [optional] | + +#### AlarmRuleStringOperation (enum) +`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` + +#### AlarmConditionValueString +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | str | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmRuleNumericOperation (enum) +`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` + +#### AlarmConditionValueDouble +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | float | | [optional] | +| dynamic_value_argument | str | | [optional] | + +#### AlarmRuleBooleanOperation (enum) +`EQUAL` | `NOT_EQUAL` + +#### AlarmConditionValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| static_value | bool | | [optional] | +| dynamic_value_argument | str | | [optional] | + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.data`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `PageDataAlarmRuleDefinitionInfo.model_validate(data)` or `PageDataAlarmRuleDefinitionInfo.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/PageDataAssetProfileInfo.md b/paas/docs/PageDataAssetProfileInfo.md index a063c0c9..ae86843a 100644 --- a/paas/docs/PageDataAssetProfileInfo.md +++ b/paas/docs/PageDataAssetProfileInfo.md @@ -21,7 +21,7 @@ #### AssetProfileInfo | Name | Type | Description | Notes | |------|------|-------------|-------| -| id | EntityId | JSON object with the entity Id. | [optional] | +| id | AssetProfileId | JSON object with the Asset Profile Id. | [optional] | | name | str | Entity Name | [optional] | | image | str | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. | [optional] | | default_dashboard_id | DashboardId | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details. | [optional] | diff --git a/paas/docs/PageDataCalculatedField.md b/paas/docs/PageDataCalculatedField.md index 30314d99..64d1c0b3 100644 --- a/paas/docs/PageDataCalculatedField.md +++ b/paas/docs/PageDataCalculatedField.md @@ -47,56 +47,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -117,9 +117,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -163,11 +163,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -303,26 +303,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -353,41 +353,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -404,17 +404,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -423,46 +426,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -471,7 +471,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -480,7 +480,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/PageDataCalculatedFieldInfo.md b/paas/docs/PageDataCalculatedFieldInfo.md index 7d37900b..a8bfaf2c 100644 --- a/paas/docs/PageDataCalculatedFieldInfo.md +++ b/paas/docs/PageDataCalculatedFieldInfo.md @@ -48,56 +48,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -118,9 +118,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -164,11 +164,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -304,26 +304,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -354,41 +354,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -405,17 +405,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -424,46 +427,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -472,7 +472,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -481,7 +481,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/PageDataCustomer.md b/paas/docs/PageDataCustomer.md index 250f569c..b8295905 100644 --- a/paas/docs/PageDataCustomer.md +++ b/paas/docs/PageDataCustomer.md @@ -31,7 +31,7 @@ | address2 | str | Address Line 2 | [optional] | | zip | str | Zip code | [optional] | | phone | str | Phone number | [optional] | -| email | str | Email | | +| email | str | Email | [optional] | | title | str | Title of the customer | | | tenant_id | TenantId | JSON object with Tenant Id | [optional] | | parent_customer_id | CustomerId | JSON object with parent Customer Id | [optional] | diff --git a/paas/docs/PageDataCustomerInfo.md b/paas/docs/PageDataCustomerInfo.md index 8260146c..fe7b1426 100644 --- a/paas/docs/PageDataCustomerInfo.md +++ b/paas/docs/PageDataCustomerInfo.md @@ -31,7 +31,7 @@ | address2 | str | Address Line 2 | [optional] | | zip | str | Zip code | [optional] | | phone | str | Phone number | [optional] | -| email | str | Email | | +| email | str | Email | [optional] | | title | str | Title of the customer | | | tenant_id | TenantId | JSON object with Tenant Id | [optional] | | parent_customer_id | CustomerId | JSON object with parent Customer Id | [optional] | diff --git a/paas/docs/PageDataDevice.md b/paas/docs/PageDataDevice.md index 305d74ab..45905a02 100644 --- a/paas/docs/PageDataDevice.md +++ b/paas/docs/PageDataDevice.md @@ -29,7 +29,7 @@ | name | str | Unique Device Name in scope of Tenant | [optional] | | type | str | Device Profile Name | [optional] | | label | str | Label that may be used in widgets | [optional] | -| device_profile_id | DeviceProfileId | JSON object with Device Profile Id. | | +| device_profile_id | DeviceProfileId | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | device_data | DeviceData | JSON object with content specific to type of transport in the device profile. | [optional] | | firmware_id | OtaPackageId | JSON object with Ota Package Id. | [optional] | | software_id | OtaPackageId | JSON object with Ota Package Id. | [optional] | diff --git a/paas/docs/PageDataDeviceInfo.md b/paas/docs/PageDataDeviceInfo.md index 31c5def9..2c67e2d9 100644 --- a/paas/docs/PageDataDeviceInfo.md +++ b/paas/docs/PageDataDeviceInfo.md @@ -29,7 +29,7 @@ | name | str | Unique Device Name in scope of Tenant | [optional] | | type | str | Device Profile Name | [optional] | | label | str | Label that may be used in widgets | [optional] | -| device_profile_id | DeviceProfileId | JSON object with Device Profile Id. | | +| device_profile_id | DeviceProfileId | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | device_data | DeviceData | JSON object with content specific to type of transport in the device profile. | [optional] | | firmware_id | OtaPackageId | JSON object with Ota Package Id. | [optional] | | software_id | OtaPackageId | JSON object with Ota Package Id. | [optional] | diff --git a/paas/docs/PageDataDeviceProfile.md b/paas/docs/PageDataDeviceProfile.md index 98e55dd8..88cb5cf6 100644 --- a/paas/docs/PageDataDeviceProfile.md +++ b/paas/docs/PageDataDeviceProfile.md @@ -56,7 +56,6 @@ | configuration | DeviceProfileConfiguration | JSON object of device profile configuration | [optional] | | transport_configuration | DeviceProfileTransportConfiguration | JSON object of device profile transport configuration | [optional] | | provision_configuration | DeviceProfileProvisionConfiguration | JSON object of provisioning strategy type per device profile | [optional] | -| alarms | List[DeviceProfileAlarm] | | [optional] | #### DeviceProfileConfiguration | Name | Type | Description | Notes | @@ -127,30 +126,9 @@ | certificate_reg_ex_pattern | str | | [optional] | | allow_create_new_devices_by_x509_certificate | bool | | [optional] | -#### DeviceProfileAlarm -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | String value representing the alarm rule id | [optional] | -| alarm_type | str | String value representing type of the alarm | [optional] | -| create_rules | Dict[str, AlarmRule] | Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details | [optional] | -| clear_rule | AlarmRule | JSON object representing clear alarm rule | [optional] | -| propagate | bool | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | [optional] | -| propagate_to_owner | bool | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | [optional] | -| propagate_to_owner_hierarchy | bool | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy | [optional] | -| propagate_to_tenant | bool | Propagation flag to specify if alarm should be propagated to the tenant entity | [optional] | -| propagate_relation_types | List[str] | JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored. | [optional] | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) -#### AlarmRule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | AlarmCondition | JSON object representing the alarm rule condition | [optional] | -| alarm_details | str | String value representing the additional details for an alarm rule | [optional] | -| dashboard_id | DashboardId | JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application | [optional] | -| schedule | AlarmSchedule | JSON object representing time interval during which the rule is active | [optional] | - #### TransportPayloadTypeConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -253,35 +231,6 @@ |------|------|-------------|-------| | mappings | List[SnmpMapping] | | [optional] | -#### AlarmCondition -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| condition | List[AlarmConditionFilter] | | [optional] | -| spec | AlarmConditionSpec | JSON object representing alarm condition type | [optional] | - -#### AlarmSchedule -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* -*See AlarmSchedule for properties.* - -#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| timezone | str | | [optional] | -| items | List[CustomTimeScheduleItem] | | [optional] | - -#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | -| timezone | str | | [optional] | - #### ObjectAttributes | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -307,44 +256,6 @@ #### SnmpCommunicationSpec (enum) `TELEMETRY_QUERYING` | `CLIENT_ATTRIBUTES_QUERYING` | `SHARED_ATTRIBUTES_SETTING` | `TO_DEVICE_RPC_REQUEST` | `TO_SERVER_RPC_REQUEST` -#### AlarmConditionFilter -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| value_type | EntityKeyValueType | String representation of the type of the value | [optional] | -| key | AlarmConditionFilterKey | JSON object for specifying alarm condition by specific key | [optional] | -| predicate | KeyFilterPredicate | JSON object representing filter condition | [optional] | -| value | object | | [optional] | - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### DurationAlarmConditionSpec *(extends AlarmConditionSpec, type=`DURATION`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| unit | TimeUnit | Duration time unit | [optional] | -| predicate | FilterPredicateValueLong | Duration predicate | [optional] | - -#### RepeatingAlarmConditionSpec *(extends AlarmConditionSpec, type=`REPEATING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| predicate | FilterPredicateValueInteger | Repeating predicate | [optional] | - -#### SimpleAlarmConditionSpec *(extends AlarmConditionSpec, type=`SIMPLE`)* -*See AlarmConditionSpec for properties.* - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - #### LwM2mVersion | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -357,144 +268,9 @@ | key | str | | [optional] | | data_type | DataType | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmConditionFilterKey -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | AlarmConditionKeyType | The key type | [optional] | -| key | str | String value representing the key | [optional] | - -#### KeyFilterPredicate -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### BooleanFilterPredicate *(extends KeyFilterPredicate, type=`BOOLEAN`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | BooleanOperation | | [optional] | -| value | FilterPredicateValueBoolean | The value associated with the filter predicate | [optional] | - -#### ComplexFilterPredicate *(extends KeyFilterPredicate, type=`COMPLEX`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | -| predicates | List[KeyFilterPredicate] | | [optional] | - -#### NumericFilterPredicate *(extends KeyFilterPredicate, type=`NUMERIC`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | NumericOperation | | [optional] | -| value | FilterPredicateValueDouble | The value associated with the filter predicate | [optional] | - -#### StringFilterPredicate *(extends KeyFilterPredicate, type=`STRING`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| operation | StringOperation | | [optional] | -| value | FilterPredicateValueString | The value associated with the filter predicate | [optional] | -| ignore_case | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### CustomTimeScheduleItem -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| day_of_week | int | | [optional] | -| enabled | bool | | [optional] | -| ends_on | int | | [optional] | -| starts_on | int | | [optional] | - #### DataType (enum) `BOOLEAN` | `LONG` | `DOUBLE` | `STRING` | `JSON` -#### AlarmConditionKeyType (enum) -`ATTRIBUTE` | `TIME_SERIES` | `ENTITY_FIELD` | `CONSTANT` - -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - -#### FilterPredicateValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueLong | | [optional] | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### StringOperation (enum) -`EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` - -#### FilterPredicateValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | str | | [optional] | -| user_value | str | | [optional] | -| dynamic_value | DynamicValueString | | [optional] | - -#### NumericOperation (enum) -`EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` - -#### FilterPredicateValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | float | | [optional] | -| user_value | float | | [optional] | -| dynamic_value | DynamicValueDouble | | [optional] | - -#### BooleanOperation (enum) -`EQUAL` | `NOT_EQUAL` - -#### FilterPredicateValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | bool | | [optional] | -| user_value | bool | | [optional] | -| dynamic_value | DynamicValueBoolean | | [optional] | - -#### ComplexOperation (enum) -`AND` | `OR` - -#### DynamicValueLong -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueBoolean -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - --- ### Conventions diff --git a/paas/docs/PageDataDeviceProfileInfo.md b/paas/docs/PageDataDeviceProfileInfo.md index b3b628bd..22677aec 100644 --- a/paas/docs/PageDataDeviceProfileInfo.md +++ b/paas/docs/PageDataDeviceProfileInfo.md @@ -21,7 +21,7 @@ #### DeviceProfileInfo | Name | Type | Description | Notes | |------|------|-------------|-------| -| id | EntityId | JSON object with the entity Id. | [optional] | +| id | DeviceProfileId | JSON object with the Device Profile Id. | [optional] | | name | str | Entity Name | [optional] | | image | str | Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. | [optional] | | default_dashboard_id | DashboardId | Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details. | [optional] | diff --git a/paas/docs/PageDataDomainInfo.md b/paas/docs/PageDataDomainInfo.md index 2cf3ddf7..1f695c54 100644 --- a/paas/docs/PageDataDomainInfo.md +++ b/paas/docs/PageDataDomainInfo.md @@ -26,10 +26,10 @@ | tenant_id | TenantId | JSON object with Tenant Id | [optional] | | customer_id | CustomerId | JSON object with Customer Id | [optional] | | name | str | Domain name. Cannot be empty | | -| oauth2_client_infos | List[OAuth2ClientInfo] | List of available oauth2 clients | [optional] | | oauth2_enabled | bool | Whether OAuth2 settings are enabled or not | [optional] | -| owner_id | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | | propagate_to_edge | bool | Whether OAuth2 settings are enabled on Edge or not | [optional] | +| oauth2_client_infos | List[OAuth2ClientInfo] | List of available oauth2 clients | [optional] | +| owner_id | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | #### OAuth2ClientInfo | Name | Type | Description | Notes | diff --git a/paas/docs/PageDataEntityGroupInfo.md b/paas/docs/PageDataEntityGroupInfo.md index 11bb4cdb..3a0ee6d4 100644 --- a/paas/docs/PageDataEntityGroupInfo.md +++ b/paas/docs/PageDataEntityGroupInfo.md @@ -29,17 +29,11 @@ | additional_info | object | Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group). | [optional] | | configuration | object | JSON with the configuration for UI components: list of columns, settings, actions, etc | [optional] | | version | int | | [optional] | -| owner_ids | List[EntityGroupInfoOwnerIdsInner] | List of the entity group owners. | | +| owner_ids | List[EntityId] | | [optional] | | edge_group_all | bool | Indicates special edge group 'All' that contains all entities and can't be deleted. | [optional] [readonly] | | group_all | bool | Indicates special group 'All' that contains all entities and can't be deleted. | [optional] | | tenant_id | TenantId | | [optional] | -#### EntityGroupInfoOwnerIdsInner -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| entity_type | EntityType | | | -| id | UUID | ID of the entity, time-based UUID v1 | | - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) diff --git a/paas/docs/PageDataJob.md b/paas/docs/PageDataJob.md index c44904f3..92cf0355 100644 --- a/paas/docs/PageDataJob.md +++ b/paas/docs/PageDataJob.md @@ -116,6 +116,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### NotificationRequest diff --git a/paas/docs/PageDataRole.md b/paas/docs/PageDataRole.md index 6e9aa2d7..286f26c4 100644 --- a/paas/docs/PageDataRole.md +++ b/paas/docs/PageDataRole.md @@ -24,11 +24,12 @@ | id | RoleId | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | created_time | int | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | additional_info | object | Additional parameters of the role. May include: 'description' (string). | [optional] | -| tenant_id | TenantId | JSON object with Tenant Id. | [readonly] | +| tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | | customer_id | CustomerId | JSON object with Customer Id. | [optional] [readonly] | | name | str | Role Name | | | type | RoleType | Type of the role: generic or group | | -| permissions | object | | [optional] | +| permissions | object | JSON object with the set of permissions. Structure is specific for role type | | +| excluded_permissions | object | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] | | version | int | | [optional] | | owner_id | EntityId | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/PageDataRuleChain.md b/paas/docs/PageDataRuleChain.md index 3f5f50e0..daadc14f 100644 --- a/paas/docs/PageDataRuleChain.md +++ b/paas/docs/PageDataRuleChain.md @@ -24,7 +24,7 @@ | id | RuleChainId | JSON object with the Rule Chain Id. Specify this field to update the Rule Chain. Referencing non-existing Rule Chain Id will cause error. Omit this field to create new rule chain. | [optional] | | created_time | int | Timestamp of the rule chain creation, in milliseconds | [optional] [readonly] | | additional_info | object | | [optional] | -| tenant_id | TenantId | JSON object with Tenant Id. | [readonly] | +| tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | | name | str | Rule Chain name | | | type | RuleChainType | Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only. | [optional] | | first_rule_node_id | RuleNodeId | JSON object with Rule Chain Id. Pointer to the first rule node that should receive all messages pushed to this rule chain. | [optional] | diff --git a/paas/docs/PdfReportTemplateConfig.md b/paas/docs/PdfReportTemplateConfig.md index f42e0d39..c5061b6b 100644 --- a/paas/docs/PdfReportTemplateConfig.md +++ b/paas/docs/PdfReportTemplateConfig.md @@ -526,7 +526,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -572,35 +572,6 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportLatestChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -622,35 +593,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### DashboardReportConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -739,7 +681,7 @@ #### FontStyle (enum) `NORMAL` | `ITALIC` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History @@ -906,8 +848,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### AliasEntityType (enum) `CURRENT_CUSTOMER` | `CURRENT_TENANT` | `CURRENT_USER` | `CURRENT_USER_OWNER` @@ -1024,19 +966,38 @@ #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings +#### DynamicValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +| resolved_value | str | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | -#### ColorRange +#### DynamicValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +| resolved_value | float | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### DynamicValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| resolved_value | bool | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` + +#### DynamicValueSourceType (enum) +`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -1073,38 +1034,25 @@ | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### DynamicValueString +#### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` -#### DynamicValueBoolean +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -1115,25 +1063,6 @@ | start | float | | [optional] | | end | float | | [optional] | -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - -#### DataKeyComparisonSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | - --- ### Conventions diff --git a/paas/docs/PropagationCalculatedFieldConfiguration.md b/paas/docs/PropagationCalculatedFieldConfiguration.md index 63e3bd06..ac118064 100644 --- a/paas/docs/PropagationCalculatedFieldConfiguration.md +++ b/paas/docs/PropagationCalculatedFieldConfiguration.md @@ -9,10 +9,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **apply_expression_to_resolved_arguments** | **bool** | | [optional] | | **arguments** | [**Dict[str, Argument]**](Argument.md) | | | | **expression** | **str** | | [optional] | | **relation** | [**RelationPathLevel**](RelationPathLevel.md) | | | +| **apply_expression_to_resolved_arguments** | **bool** | | [optional] | @@ -23,8 +23,8 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### Argument | Name | Type | Description | Notes | @@ -45,9 +45,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -132,7 +132,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.apply_expression_to_resolved_arguments`, `obj.name`, etc. +- **Attribute access:** `obj.arguments`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `PropagationCalculatedFieldConfiguration.model_validate(data)` or `PropagationCalculatedFieldConfiguration.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md b/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md index a9f329b6..665b636f 100644 --- a/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md +++ b/paas/docs/RelatedEntitiesAggregationCalculatedFieldConfiguration.md @@ -9,13 +9,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **relation** | [**RelationPathLevel**](RelationPathLevel.md) | | | | **arguments** | [**Dict[str, Argument]**](Argument.md) | | | | **deduplication_interval_in_sec** | **int** | | [optional] | | **metrics** | [**Dict[str, AggMetric]**](AggMetric.md) | | | -| **relation** | [**RelationPathLevel**](RelationPathLevel.md) | | | -| **scheduled_update_enabled** | **bool** | | [optional] | -| **scheduled_update_interval** | **int** | | [optional] | | **use_latest_ts** | **bool** | | [optional] | +| **scheduled_update_interval** | **int** | | [optional] | +| **scheduled_update_enabled** | **bool** | | [optional] | @@ -26,8 +26,14 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | + +#### RelationPathLevel +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| direction | EntitySearchDirection | | | +| relation_type | str | | | #### Argument | Name | Type | Description | Notes | @@ -47,18 +53,12 @@ | input | AggInput | | [optional] | | default_value | float | | [optional] | -#### RelationPathLevel -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| direction | EntitySearchDirection | | | -| relation_type | str | | | - #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -72,6 +72,9 @@ |------|------|-------------|-------| | strategy | TimeSeriesOutputStrategy | | [optional] | +#### EntitySearchDirection (enum) +`FROM` | `TO` + #### CfArgumentDynamicSourceConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -110,9 +113,6 @@ |------|------|-------------|-------| | key | str | | [optional] | -#### EntitySearchDirection (enum) -`FROM` | `TO` - #### AttributeScope (enum) `CLIENT_SCOPE` | `SERVER_SCOPE` | `SHARED_SCOPE` @@ -161,7 +161,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.arguments`, `obj.name`, etc. +- **Attribute access:** `obj.relation`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `RelatedEntitiesAggregationCalculatedFieldConfiguration.model_validate(data)` or `RelatedEntitiesAggregationCalculatedFieldConfiguration.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/AlarmRuleRepeatingCondition.md b/paas/docs/RepeatingAlarmCondition.md similarity index 77% rename from paas/docs/AlarmRuleRepeatingCondition.md rename to paas/docs/RepeatingAlarmCondition.md index a6e8073d..8cbdbaa3 100644 --- a/paas/docs/AlarmRuleRepeatingCondition.md +++ b/paas/docs/RepeatingAlarmCondition.md @@ -1,9 +1,9 @@ -# AlarmRuleRepeatingCondition +# RepeatingAlarmCondition -`tb_paas_client.models.AlarmRuleRepeatingCondition` +`tb_paas_client.models.RepeatingAlarmCondition` -**Extends:** **AlarmRuleCondition** +**Extends:** **AlarmCondition** ## Properties @@ -15,11 +15,11 @@ ## Referenced Types -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | #### AlarmConditionValueInteger @@ -36,53 +36,56 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -91,46 +94,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -139,7 +139,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -148,7 +148,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -157,15 +157,15 @@ | static_value | bool | | [optional] | | dynamic_value_argument | str | | [optional] | +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + #### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - --- ### Conventions @@ -173,6 +173,6 @@ - **Package:** `tb_paas_client.models` - **Attribute access:** `obj.count`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleRepeatingCondition.model_validate(data)` or `AlarmRuleRepeatingCondition.model_validate_json(json_str)` +- **Deserialize:** `RepeatingAlarmCondition.model_validate(data)` or `RepeatingAlarmCondition.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/RepeatingAlarmConditionSpec.md b/paas/docs/RepeatingAlarmConditionSpec.md deleted file mode 100644 index 14f13ee3..00000000 --- a/paas/docs/RepeatingAlarmConditionSpec.md +++ /dev/null @@ -1,50 +0,0 @@ - -# RepeatingAlarmConditionSpec - -`tb_paas_client.models.RepeatingAlarmConditionSpec` - -**Extends:** **AlarmConditionSpec** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **predicate** | [**FilterPredicateValueInteger**](FilterPredicateValueInteger.md) | Repeating predicate | [optional] | - - - -## Referenced Types - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - -#### FilterPredicateValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| default_value | int | | [optional] | -| user_value | int | | [optional] | -| dynamic_value | DynamicValueInteger | | [optional] | - -#### DynamicValueInteger -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | int | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.predicate`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `RepeatingAlarmConditionSpec.model_validate(data)` or `RepeatingAlarmConditionSpec.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/ReportBarChartSettings.md b/paas/docs/ReportBarChartSettings.md index 62385a4c..362f0114 100644 --- a/paas/docs/ReportBarChartSettings.md +++ b/paas/docs/ReportBarChartSettings.md @@ -3,12 +3,27 @@ `tb_paas_client.models.ReportBarChartSettings` -**Extends:** **ReportLatestChartSettings** - ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **show_title** | **bool** | | [optional] | +| **title** | **str** | | [optional] | +| **title_font** | [**Font**](Font.md) | | [optional] | +| **title_color** | **str** | | [optional] | +| **title_alignment** | [**TextAlignment**](TextAlignment.md) | | [optional] | +| **units** | **str** | | [optional] | +| **decimals** | **int** | | [optional] | +| **auto_scale** | **bool** | | [optional] | +| **sort_series** | **bool** | | [optional] | +| **show_total** | **bool** | | [optional] | +| **show_legend** | **bool** | | [optional] | +| **legend_position** | [**LegendPosition**](LegendPosition.md) | | [optional] | +| **legend_label_font** | [**Font**](Font.md) | | [optional] | +| **legend_label_color** | **str** | | [optional] | +| **legend_value_font** | [**Font**](Font.md) | | [optional] | +| **legend_value_color** | **str** | | [optional] | +| **legend_show_total** | **bool** | | [optional] | | **axis_min** | **float** | | [optional] | | **axis_max** | **float** | | [optional] | | **axis_tick_label_font** | [**Font**](Font.md) | | [optional] | @@ -19,27 +34,6 @@ ## Referenced Types -#### ReportLatestChartSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_title | bool | | [optional] | -| title | str | | [optional] | -| title_font | Font | | [optional] | -| title_color | str | | [optional] | -| title_alignment | TextAlignment | | [optional] | -| units | str | | [optional] | -| decimals | int | | [optional] | -| auto_scale | bool | | [optional] | -| sort_series | bool | | [optional] | -| show_total | bool | | [optional] | -| show_legend | bool | | [optional] | -| legend_position | LegendPosition | | [optional] | -| legend_label_font | Font | | [optional] | -| legend_label_color | str | | [optional] | -| legend_value_font | Font | | [optional] | -| legend_value_color | str | | [optional] | -| legend_show_total | bool | | [optional] | - #### Font | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -48,6 +42,12 @@ | style | FontStyle | | [optional] | | family | str | | [optional] | +#### TextAlignment (enum) +`CENTER` | `RIGHT` | `LEFT` | `JUSTIFY` + +#### LegendPosition (enum) +`TOP` | `BOTTOM` | `LEFT` | `RIGHT` + #### BarSeriesSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -63,12 +63,6 @@ | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### TextAlignment (enum) -`CENTER` | `RIGHT` | `LEFT` | `JUSTIFY` - -#### LegendPosition (enum) -`TOP` | `BOTTOM` | `LEFT` | `RIGHT` - #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` @@ -99,7 +93,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.axis_min`, `obj.name`, etc. +- **Attribute access:** `obj.show_title`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `ReportBarChartSettings.model_validate(data)` or `ReportBarChartSettings.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/ReportBarChartWithLabelsSettings.md b/paas/docs/ReportBarChartWithLabelsSettings.md index b1abfa10..849322fb 100644 --- a/paas/docs/ReportBarChartWithLabelsSettings.md +++ b/paas/docs/ReportBarChartWithLabelsSettings.md @@ -3,12 +3,37 @@ `tb_paas_client.models.ReportBarChartWithLabelsSettings` -**Extends:** **ReportTimeSeriesChartSettings** - ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **show_title** | **bool** | | [optional] | +| **title** | **str** | | [optional] | +| **title_font** | [**Font**](Font.md) | | [optional] | +| **title_color** | **str** | | [optional] | +| **title_alignment** | [**TextAlignment**](TextAlignment.md) | | [optional] | +| **thresholds** | [**List[TimeSeriesChartThreshold]**](TimeSeriesChartThreshold.md) | | [optional] | +| **stack** | **bool** | | [optional] | +| **grid** | [**TimeSeriesChartGridSettings**](TimeSeriesChartGridSettings.md) | | [optional] | +| **y_axes** | [**Dict[str, TimeSeriesChartYAxisSettings]**](TimeSeriesChartYAxisSettings.md) | | [optional] | +| **x_axis** | [**TimeSeriesChartXAxisSettings**](TimeSeriesChartXAxisSettings.md) | | [optional] | +| **bar_width_settings** | [**TimeSeriesChartBarWidthSettings**](TimeSeriesChartBarWidthSettings.md) | | [optional] | +| **no_aggregation_bar_width_settings** | [**TimeSeriesChartNoAggregationBarWidthSettings**](TimeSeriesChartNoAggregationBarWidthSettings.md) | | [optional] | +| **states** | [**List[TimeSeriesChartStateSettings]**](TimeSeriesChartStateSettings.md) | | [optional] | +| **comparison_enabled** | **bool** | | [optional] | +| **time_for_comparison** | [**ComparisonDuration**](ComparisonDuration.md) | | [optional] | +| **comparison_custom_interval_value** | **int** | | [optional] | +| **comparison_x_axis** | [**TimeSeriesChartXAxisSettings**](TimeSeriesChartXAxisSettings.md) | | [optional] | +| **show_legend** | **bool** | | [optional] | +| **legend_column_title_font** | [**Font**](Font.md) | | [optional] | +| **legend_column_title_color** | **str** | | [optional] | +| **legend_label_font** | [**Font**](Font.md) | | [optional] | +| **legend_label_color** | **str** | | [optional] | +| **legend_value_font** | [**Font**](Font.md) | | [optional] | +| **legend_value_color** | **str** | | [optional] | +| **legend_config** | [**LegendConfig**](LegendConfig.md) | | [optional] | +| **xaxis** | [**TimeSeriesChartXAxisSettings**](TimeSeriesChartXAxisSettings.md) | | [optional] | +| **yaxes** | [**Dict[str, TimeSeriesChartYAxisSettings]**](TimeSeriesChartYAxisSettings.md) | | [optional] | | **show_bar_label** | **bool** | | [optional] | | **bar_label_font** | [**Font**](Font.md) | | [optional] | | **bar_label_color** | **str** | | [optional] | @@ -26,37 +51,6 @@ ## Referenced Types -#### ReportTimeSeriesChartSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_title | bool | | [optional] | -| title | str | | [optional] | -| title_font | Font | | [optional] | -| title_color | str | | [optional] | -| title_alignment | TextAlignment | | [optional] | -| thresholds | List[TimeSeriesChartThreshold] | | [optional] | -| stack | bool | | [optional] | -| grid | TimeSeriesChartGridSettings | | [optional] | -| y_axes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -| x_axis | TimeSeriesChartXAxisSettings | | [optional] | -| bar_width_settings | TimeSeriesChartBarWidthSettings | | [optional] | -| no_aggregation_bar_width_settings | TimeSeriesChartNoAggregationBarWidthSettings | | [optional] | -| states | List[TimeSeriesChartStateSettings] | | [optional] | -| comparison_enabled | bool | | [optional] | -| time_for_comparison | ComparisonDuration | | [optional] | -| comparison_custom_interval_value | int | | [optional] | -| comparison_x_axis | TimeSeriesChartXAxisSettings | | [optional] | -| show_legend | bool | | [optional] | -| legend_column_title_font | Font | | [optional] | -| legend_column_title_color | str | | [optional] | -| legend_label_font | Font | | [optional] | -| legend_label_color | str | | [optional] | -| legend_value_font | Font | | [optional] | -| legend_value_color | str | | [optional] | -| legend_config | LegendConfig | | [optional] | -| xaxis | TimeSeriesChartXAxisSettings | | [optional] | -| yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | - #### Font | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -65,13 +59,6 @@ | style | FontStyle | | [optional] | | family | str | | [optional] | -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | - #### TextAlignment (enum) `CENTER` | `RIGHT` | `LEFT` | `JUSTIFY` @@ -193,21 +180,19 @@ | show_total | bool | | [optional] | | show_latest | bool | | [optional] | +#### ChartFillSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | + #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` #### FontStyle (enum) `NORMAL` | `ITALIC` -#### ChartFillType (enum) -`NONE` | `OPACITY` | `GRADIENT` - -#### ChartFillSettingsGradient -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| start | float | | [optional] | -| end | float | | [optional] | - #### ValueSourceType (enum) `CONSTANT` | `LATESTKEY` | `ENTITY` @@ -239,12 +224,21 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` +#### ChartFillType (enum) +`NONE` | `OPACITY` | `GRADIENT` + +#### ChartFillSettingsGradient +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| start | float | | [optional] | +| end | float | | [optional] | + --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.show_bar_label`, `obj.name`, etc. +- **Attribute access:** `obj.show_title`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `ReportBarChartWithLabelsSettings.model_validate(data)` or `ReportBarChartWithLabelsSettings.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/ReportComponent.md b/paas/docs/ReportComponent.md index 7d9efbc5..a8f0a5c9 100644 --- a/paas/docs/ReportComponent.md +++ b/paas/docs/ReportComponent.md @@ -233,7 +233,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### DataSource | Name | Type | Description | Notes | @@ -326,35 +326,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### ReportTimeSeriesChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -386,36 +357,7 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### DataSourceType (enum) @@ -476,8 +418,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` @@ -669,27 +611,6 @@ #### QuickTimeInterval (enum) `YESTERDAY` | `DAY_BEFORE_YESTERDAY` | `THIS_DAY_LAST_WEEK` | `PREVIOUS_WEEK` | `PREVIOUS_WEEK_ISO` | `PREVIOUS_MONTH` | `PREVIOUS_QUARTER` | `PREVIOUS_HALF_YEAR` | `PREVIOUS_YEAR` | `CURRENT_HOUR` | … (24 values total) -#### BarSeriesSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_border | bool | | [optional] | -| border_width | float | | [optional] | -| border_radius | float | | [optional] | -| bar_width | float | | [optional] | -| show_label | bool | | [optional] | -| label_position | ChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| enable_label_background | bool | | [optional] | -| label_background | str | | [optional] | -| background_settings | ChartFillSettings | | [optional] | - -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - #### EntityType (enum) `TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) @@ -721,19 +642,11 @@ #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` -#### ColorRange -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -755,12 +668,41 @@ | point_size | float | | [optional] | | fill_area_settings | ChartFillSettings | | [optional] | -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` +#### BarSeriesSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| show_border | bool | | [optional] | +| border_width | float | | [optional] | +| border_radius | float | | [optional] | +| bar_width | float | | [optional] | +| show_label | bool | | [optional] | +| label_position | ChartLabelPosition | | [optional] | +| label_font | Font | | [optional] | +| label_color | str | | [optional] | +| enable_label_background | bool | | [optional] | +| label_background | str | | [optional] | +| background_settings | ChartFillSettings | | [optional] | + +#### DataKeyComparisonSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | + +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` #### ChartLabelPosition (enum) `TOP` | `BOTTOM` +#### ChartFillSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | + #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -770,19 +712,6 @@ | start | float | | [optional] | | end | float | | [optional] | -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - -#### DataKeyComparisonSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | - --- ### Conventions diff --git a/paas/docs/ReportDoughnutChartSettings.md b/paas/docs/ReportDoughnutChartSettings.md index 7ffebb6c..4b1ff9fe 100644 --- a/paas/docs/ReportDoughnutChartSettings.md +++ b/paas/docs/ReportDoughnutChartSettings.md @@ -3,12 +3,27 @@ `tb_paas_client.models.ReportDoughnutChartSettings` -**Extends:** **ReportLatestChartSettings** - ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **show_title** | **bool** | | [optional] | +| **title** | **str** | | [optional] | +| **title_font** | [**Font**](Font.md) | | [optional] | +| **title_color** | **str** | | [optional] | +| **title_alignment** | [**TextAlignment**](TextAlignment.md) | | [optional] | +| **units** | **str** | | [optional] | +| **decimals** | **int** | | [optional] | +| **auto_scale** | **bool** | | [optional] | +| **sort_series** | **bool** | | [optional] | +| **show_total** | **bool** | | [optional] | +| **show_legend** | **bool** | | [optional] | +| **legend_position** | [**LegendPosition**](LegendPosition.md) | | [optional] | +| **legend_label_font** | [**Font**](Font.md) | | [optional] | +| **legend_label_color** | **str** | | [optional] | +| **legend_value_font** | [**Font**](Font.md) | | [optional] | +| **legend_value_color** | **str** | | [optional] | +| **legend_show_total** | **bool** | | [optional] | | **layout** | [**DoughnutLayout**](DoughnutLayout.md) | | [optional] | | **clockwise** | **bool** | | [optional] | | **total_value_font** | [**Font**](Font.md) | | [optional] | @@ -18,30 +33,6 @@ ## Referenced Types -#### ReportLatestChartSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_title | bool | | [optional] | -| title | str | | [optional] | -| title_font | Font | | [optional] | -| title_color | str | | [optional] | -| title_alignment | TextAlignment | | [optional] | -| units | str | | [optional] | -| decimals | int | | [optional] | -| auto_scale | bool | | [optional] | -| sort_series | bool | | [optional] | -| show_total | bool | | [optional] | -| show_legend | bool | | [optional] | -| legend_position | LegendPosition | | [optional] | -| legend_label_font | Font | | [optional] | -| legend_label_color | str | | [optional] | -| legend_value_font | Font | | [optional] | -| legend_value_color | str | | [optional] | -| legend_show_total | bool | | [optional] | - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - #### Font | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -56,6 +47,9 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` +#### DoughnutLayout (enum) +`DEFAULT` | `WITH_TOTAL` + #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` @@ -67,7 +61,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.layout`, `obj.name`, etc. +- **Attribute access:** `obj.show_title`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `ReportDoughnutChartSettings.model_validate(data)` or `ReportDoughnutChartSettings.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/ReportJobConfiguration.md b/paas/docs/ReportJobConfiguration.md index 8b0c376c..b524e79f 100644 --- a/paas/docs/ReportJobConfiguration.md +++ b/paas/docs/ReportJobConfiguration.md @@ -80,6 +80,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### NotificationTemplate diff --git a/paas/docs/ReportJobResult.md b/paas/docs/ReportJobResult.md index fca2131a..052386e9 100644 --- a/paas/docs/ReportJobResult.md +++ b/paas/docs/ReportJobResult.md @@ -51,6 +51,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### TbReportFormat (enum) diff --git a/paas/docs/ReportLatestChartSettings.md b/paas/docs/ReportLatestChartSettings.md index 9846da47..1f46a8af 100644 --- a/paas/docs/ReportLatestChartSettings.md +++ b/paas/docs/ReportLatestChartSettings.md @@ -27,45 +27,6 @@ -## Subtypes - -#### ReportDoughnutChartSettings *(sub_type=`doughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportDoughnutChartSettings *(sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - ## Referenced Types #### Font @@ -82,52 +43,12 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### BarSeriesSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_border | bool | | [optional] | -| border_width | float | | [optional] | -| border_radius | float | | [optional] | -| bar_width | float | | [optional] | -| show_label | bool | | [optional] | -| label_position | ChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| enable_label_background | bool | | [optional] | -| label_background | str | | [optional] | -| background_settings | ChartFillSettings | | [optional] | - -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` #### FontStyle (enum) `NORMAL` | `ITALIC` -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | - -#### ChartFillType (enum) -`NONE` | `OPACITY` | `GRADIENT` - -#### ChartFillSettingsGradient -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| start | float | | [optional] | -| end | float | | [optional] | - --- ### Conventions diff --git a/paas/docs/ReportPieChartSettings.md b/paas/docs/ReportPieChartSettings.md index 2a0ad145..ea14c142 100644 --- a/paas/docs/ReportPieChartSettings.md +++ b/paas/docs/ReportPieChartSettings.md @@ -3,12 +3,27 @@ `tb_paas_client.models.ReportPieChartSettings` -**Extends:** **ReportLatestChartSettings** - ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **show_title** | **bool** | | [optional] | +| **title** | **str** | | [optional] | +| **title_font** | [**Font**](Font.md) | | [optional] | +| **title_color** | **str** | | [optional] | +| **title_alignment** | [**TextAlignment**](TextAlignment.md) | | [optional] | +| **units** | **str** | | [optional] | +| **decimals** | **int** | | [optional] | +| **auto_scale** | **bool** | | [optional] | +| **sort_series** | **bool** | | [optional] | +| **show_total** | **bool** | | [optional] | +| **show_legend** | **bool** | | [optional] | +| **legend_position** | [**LegendPosition**](LegendPosition.md) | | [optional] | +| **legend_label_font** | [**Font**](Font.md) | | [optional] | +| **legend_label_color** | **str** | | [optional] | +| **legend_value_font** | [**Font**](Font.md) | | [optional] | +| **legend_value_color** | **str** | | [optional] | +| **legend_show_total** | **bool** | | [optional] | | **show_label** | **bool** | | [optional] | | **label_position** | [**PieChartLabelPosition**](PieChartLabelPosition.md) | | [optional] | | **label_font** | [**Font**](Font.md) | | [optional] | @@ -22,30 +37,6 @@ ## Referenced Types -#### ReportLatestChartSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_title | bool | | [optional] | -| title | str | | [optional] | -| title_font | Font | | [optional] | -| title_color | str | | [optional] | -| title_alignment | TextAlignment | | [optional] | -| units | str | | [optional] | -| decimals | int | | [optional] | -| auto_scale | bool | | [optional] | -| sort_series | bool | | [optional] | -| show_total | bool | | [optional] | -| show_legend | bool | | [optional] | -| legend_position | LegendPosition | | [optional] | -| legend_label_font | Font | | [optional] | -| legend_label_color | str | | [optional] | -| legend_value_font | Font | | [optional] | -| legend_value_color | str | | [optional] | -| legend_show_total | bool | | [optional] | - -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - #### Font | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -60,6 +51,9 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` +#### PieChartLabelPosition (enum) +`INSIDE` | `OUTSIDE` + #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` @@ -71,7 +65,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.show_label`, `obj.name`, etc. +- **Attribute access:** `obj.show_title`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `ReportPieChartSettings.model_validate(data)` or `ReportPieChartSettings.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/ReportRangeChartSettings.md b/paas/docs/ReportRangeChartSettings.md index 4e0aec21..91827ad6 100644 --- a/paas/docs/ReportRangeChartSettings.md +++ b/paas/docs/ReportRangeChartSettings.md @@ -3,12 +3,37 @@ `tb_paas_client.models.ReportRangeChartSettings` -**Extends:** **ReportTimeSeriesChartSettings** - ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **show_title** | **bool** | | [optional] | +| **title** | **str** | | [optional] | +| **title_font** | [**Font**](Font.md) | | [optional] | +| **title_color** | **str** | | [optional] | +| **title_alignment** | [**TextAlignment**](TextAlignment.md) | | [optional] | +| **thresholds** | [**List[TimeSeriesChartThreshold]**](TimeSeriesChartThreshold.md) | | [optional] | +| **stack** | **bool** | | [optional] | +| **grid** | [**TimeSeriesChartGridSettings**](TimeSeriesChartGridSettings.md) | | [optional] | +| **y_axes** | [**Dict[str, TimeSeriesChartYAxisSettings]**](TimeSeriesChartYAxisSettings.md) | | [optional] | +| **x_axis** | [**TimeSeriesChartXAxisSettings**](TimeSeriesChartXAxisSettings.md) | | [optional] | +| **bar_width_settings** | [**TimeSeriesChartBarWidthSettings**](TimeSeriesChartBarWidthSettings.md) | | [optional] | +| **no_aggregation_bar_width_settings** | [**TimeSeriesChartNoAggregationBarWidthSettings**](TimeSeriesChartNoAggregationBarWidthSettings.md) | | [optional] | +| **states** | [**List[TimeSeriesChartStateSettings]**](TimeSeriesChartStateSettings.md) | | [optional] | +| **comparison_enabled** | **bool** | | [optional] | +| **time_for_comparison** | [**ComparisonDuration**](ComparisonDuration.md) | | [optional] | +| **comparison_custom_interval_value** | **int** | | [optional] | +| **comparison_x_axis** | [**TimeSeriesChartXAxisSettings**](TimeSeriesChartXAxisSettings.md) | | [optional] | +| **show_legend** | **bool** | | [optional] | +| **legend_column_title_font** | [**Font**](Font.md) | | [optional] | +| **legend_column_title_color** | **str** | | [optional] | +| **legend_label_font** | [**Font**](Font.md) | | [optional] | +| **legend_label_color** | **str** | | [optional] | +| **legend_value_font** | [**Font**](Font.md) | | [optional] | +| **legend_value_color** | **str** | | [optional] | +| **legend_config** | [**LegendConfig**](LegendConfig.md) | | [optional] | +| **xaxis** | [**TimeSeriesChartXAxisSettings**](TimeSeriesChartXAxisSettings.md) | | [optional] | +| **yaxes** | [**Dict[str, TimeSeriesChartYAxisSettings]**](TimeSeriesChartYAxisSettings.md) | | [optional] | | **range_colors** | [**List[ColorRange]**](ColorRange.md) | | [optional] | | **out_of_range_color** | **str** | | [optional] | | **show_range_thresholds** | **bool** | | [optional] | @@ -23,43 +48,16 @@ ## Referenced Types -#### ReportTimeSeriesChartSettings +#### Font | Name | Type | Description | Notes | |------|------|-------------|-------| -| show_title | bool | | [optional] | -| title | str | | [optional] | -| title_font | Font | | [optional] | -| title_color | str | | [optional] | -| title_alignment | TextAlignment | | [optional] | -| thresholds | List[TimeSeriesChartThreshold] | | [optional] | -| stack | bool | | [optional] | -| grid | TimeSeriesChartGridSettings | | [optional] | -| y_axes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -| x_axis | TimeSeriesChartXAxisSettings | | [optional] | -| bar_width_settings | TimeSeriesChartBarWidthSettings | | [optional] | -| no_aggregation_bar_width_settings | TimeSeriesChartNoAggregationBarWidthSettings | | [optional] | -| states | List[TimeSeriesChartStateSettings] | | [optional] | -| comparison_enabled | bool | | [optional] | -| time_for_comparison | ComparisonDuration | | [optional] | -| comparison_custom_interval_value | int | | [optional] | -| comparison_x_axis | TimeSeriesChartXAxisSettings | | [optional] | -| show_legend | bool | | [optional] | -| legend_column_title_font | Font | | [optional] | -| legend_column_title_color | str | | [optional] | -| legend_label_font | Font | | [optional] | -| legend_label_color | str | | [optional] | -| legend_value_font | Font | | [optional] | -| legend_value_color | str | | [optional] | -| legend_config | LegendConfig | | [optional] | -| xaxis | TimeSeriesChartXAxisSettings | | [optional] | -| yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | +| size | float | | [optional] | +| weight | FontWeight | | [optional] | +| style | FontStyle | | [optional] | +| family | str | | [optional] | -#### ColorRange -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +#### TextAlignment (enum) +`CENTER` | `RIGHT` | `LEFT` | `JUSTIFY` #### TimeSeriesChartThreshold | Name | Type | Description | Notes | @@ -89,37 +87,6 @@ | label_background | str | | [optional] | | yaxis_id | str | | [optional] | -#### LineSeriesSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_line | bool | | [optional] | -| step | bool | | [optional] | -| step_type | LineSeriesStepType | | [optional] | -| smooth | bool | | [optional] | -| line_type | ChartLineType | | [optional] | -| line_width | float | | [optional] | -| show_points | bool | | [optional] | -| show_point_label | bool | | [optional] | -| point_label_position | ChartLabelPosition | | [optional] | -| point_label_font | Font | | [optional] | -| point_label_color | str | | [optional] | -| enable_point_label_background | bool | | [optional] | -| point_label_background | str | | [optional] | -| point_shape | ChartShape | | [optional] | -| point_size | float | | [optional] | -| fill_area_settings | ChartFillSettings | | [optional] | - -#### Font -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| size | float | | [optional] | -| weight | FontWeight | | [optional] | -| style | FontStyle | | [optional] | -| family | str | | [optional] | - -#### TextAlignment (enum) -`CENTER` | `RIGHT` | `LEFT` | `JUSTIFY` - #### TimeSeriesChartGridSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -210,6 +177,39 @@ | show_total | bool | | [optional] | | show_latest | bool | | [optional] | +#### ColorRange +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| var_from | float | | [optional] | +| to | float | | [optional] | +| color | str | | [optional] | + +#### LineSeriesSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| show_line | bool | | [optional] | +| step | bool | | [optional] | +| step_type | LineSeriesStepType | | [optional] | +| smooth | bool | | [optional] | +| line_type | ChartLineType | | [optional] | +| line_width | float | | [optional] | +| show_points | bool | | [optional] | +| show_point_label | bool | | [optional] | +| point_label_position | ChartLabelPosition | | [optional] | +| point_label_font | Font | | [optional] | +| point_label_color | str | | [optional] | +| enable_point_label_background | bool | | [optional] | +| point_label_background | str | | [optional] | +| point_shape | ChartShape | | [optional] | +| point_size | float | | [optional] | +| fill_area_settings | ChartFillSettings | | [optional] | + +#### FontWeight (enum) +`NORMAL` | `BOLD` | `ENUM_500` + +#### FontStyle (enum) +`NORMAL` | `ITALIC` + #### ValueSourceType (enum) `CONSTANT` | `LATESTKEY` | `ENTITY` @@ -222,25 +222,6 @@ #### ThresholdLabelPosition (enum) `START` | `MIDDLE` | `END` | `INSIDESTART` | `INSIDESTARTTOP` | `INSIDESTARTBOTTOM` | `INSIDEMIDDLE` | `INSIDEMIDDLETOP` | `INSIDEMIDDLEBOTTOM` | `INSIDEEND` | … (12 values total) -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | - -#### FontWeight (enum) -`NORMAL` | `BOLD` | `ENUM_500` - -#### FontStyle (enum) -`NORMAL` | `ITALIC` - #### AxisPosition (enum) `LEFT` | `RIGHT` | `TOP` | `BOTTOM` @@ -260,6 +241,19 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` + +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | + #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -274,7 +268,7 @@ ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.range_colors`, `obj.name`, etc. +- **Attribute access:** `obj.show_title`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `ReportRangeChartSettings.model_validate(data)` or `ReportRangeChartSettings.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/ReportRequest.md b/paas/docs/ReportRequest.md index 91ae43e0..72aff950 100644 --- a/paas/docs/ReportRequest.md +++ b/paas/docs/ReportRequest.md @@ -541,7 +541,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -587,35 +587,6 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportLatestChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -637,35 +608,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### DashboardReportConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -751,7 +693,7 @@ #### FontStyle (enum) `NORMAL` | `ITALIC` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History @@ -918,8 +860,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### AliasEntityType (enum) `CURRENT_CUSTOMER` | `CURRENT_TENANT` | `CURRENT_USER` | `CURRENT_USER_OWNER` @@ -1036,19 +978,38 @@ #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings +#### DynamicValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +| resolved_value | str | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | -#### ColorRange +#### DynamicValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +| resolved_value | float | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### DynamicValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| resolved_value | bool | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` + +#### DynamicValueSourceType (enum) +`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -1085,38 +1046,25 @@ | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### DynamicValueString +#### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` -#### DynamicValueBoolean +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -1127,25 +1075,6 @@ | start | float | | [optional] | | end | float | | [optional] | -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - -#### DataKeyComparisonSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | - --- ### Conventions diff --git a/paas/docs/ReportTaskResult.md b/paas/docs/ReportTaskResult.md index c69fde8a..c3db9e5a 100644 --- a/paas/docs/ReportTaskResult.md +++ b/paas/docs/ReportTaskResult.md @@ -24,6 +24,7 @@ | success | bool | | [optional] | | discarded | bool | | [optional] | | finish_ts | int | | [optional] | +| error | str | | [optional] | | job_type | str | | | #### Report diff --git a/paas/docs/ReportTemplate.md b/paas/docs/ReportTemplate.md index 4be6829b..6c2b2fa0 100644 --- a/paas/docs/ReportTemplate.md +++ b/paas/docs/ReportTemplate.md @@ -550,7 +550,7 @@ A JSON value representing the Report Template. | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -596,35 +596,6 @@ A JSON value representing the Report Template. | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportLatestChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -646,35 +617,6 @@ A JSON value representing the Report Template. | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### DashboardReportConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -760,7 +702,7 @@ A JSON value representing the Report Template. #### FontStyle (enum) `NORMAL` | `ITALIC` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History @@ -927,8 +869,8 @@ A JSON value representing the Report Template. | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### AliasEntityType (enum) `CURRENT_CUSTOMER` | `CURRENT_TENANT` | `CURRENT_USER` | `CURRENT_USER_OWNER` @@ -1045,19 +987,38 @@ A JSON value representing the Report Template. #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings +#### DynamicValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +| resolved_value | str | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | -#### ColorRange +#### DynamicValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +| resolved_value | float | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### DynamicValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| resolved_value | bool | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` + +#### DynamicValueSourceType (enum) +`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -1094,38 +1055,25 @@ A JSON value representing the Report Template. | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### DynamicValueString +#### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` -#### DynamicValueBoolean +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -1136,25 +1084,6 @@ A JSON value representing the Report Template. | start | float | | [optional] | | end | float | | [optional] | -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - -#### DataKeyComparisonSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | - --- ### Conventions diff --git a/paas/docs/ReportTemplateConfig.md b/paas/docs/ReportTemplateConfig.md index 857252e3..caac8d4d 100644 --- a/paas/docs/ReportTemplateConfig.md +++ b/paas/docs/ReportTemplateConfig.md @@ -529,7 +529,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -575,35 +575,6 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportLatestChartSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -625,35 +596,6 @@ | legend_value_color | str | | [optional] | | legend_show_total | bool | | [optional] | -#### ReportDoughnutChartSettings *(extends ReportLatestChartSettings, sub_type=`horizontalDoughnutChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| layout | DoughnutLayout | | [optional] | -| clockwise | bool | | [optional] | -| total_value_font | Font | | [optional] | -| total_value_color | str | | [optional] | - -#### ReportBarChartSettings *(extends ReportLatestChartSettings, sub_type=`latestBarChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| axis_min | float | | [optional] | -| axis_max | float | | [optional] | -| axis_tick_label_font | Font | | [optional] | -| axis_tick_label_color | str | | [optional] | -| bar_settings | BarSeriesSettings | | [optional] | - -#### ReportPieChartSettings *(extends ReportLatestChartSettings, sub_type=`pieChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_label | bool | | [optional] | -| label_position | PieChartLabelPosition | | [optional] | -| label_font | Font | | [optional] | -| label_color | str | | [optional] | -| border_width | float | | [optional] | -| border_color | str | | [optional] | -| radius | float | | [optional] | -| clockwise | bool | | [optional] | - #### DashboardReportConfig | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -742,7 +684,7 @@ #### FontStyle (enum) `NORMAL` | `ITALIC` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History @@ -909,8 +851,8 @@ | method_name | str | | [optional] | | file_name | str | | [optional] | | line_number | int | | [optional] | -| class_name | str | | [optional] | | native_method | bool | | [optional] | +| class_name | str | | [optional] | #### AliasEntityType (enum) `CURRENT_CUSTOMER` | `CURRENT_TENANT` | `CURRENT_USER` | `CURRENT_USER_OWNER` @@ -1027,19 +969,38 @@ #### TimeSeriesChartStateSourceType (enum) `CONSTANT` | `RANGE` -#### ChartFillSettings +#### DynamicValueString | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +| resolved_value | str | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | -#### ColorRange +#### DynamicValueDouble | Name | Type | Description | Notes | |------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | +| resolved_value | float | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### DynamicValueBoolean +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| resolved_value | bool | | [optional] | +| source_type | DynamicValueSourceType | | [optional] | +| source_attribute | str | | [optional] | +| inherit | bool | | [optional] | + +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` + +#### DynamicValueSourceType (enum) +`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -1076,38 +1037,25 @@ | label_background | str | | [optional] | | background_settings | ChartFillSettings | | [optional] | -#### PieChartLabelPosition (enum) -`INSIDE` | `OUTSIDE` - -#### DoughnutLayout (enum) -`DEFAULT` | `WITH_TOTAL` - -#### DynamicValueString +#### DataKeyComparisonSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +| show_values_for_comparison | bool | | [optional] | +| comparison_values_label | str | | [optional] | +| color | str | | [optional] | -#### DynamicValueDouble -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | float | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` -#### DynamicValueBoolean +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| resolved_value | bool | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | #### ChartFillType (enum) `NONE` | `OPACITY` | `GRADIENT` @@ -1118,25 +1066,6 @@ | start | float | | [optional] | | end | float | | [optional] | -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - -#### DataKeyComparisonSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_values_for_comparison | bool | | [optional] | -| comparison_values_label | str | | [optional] | -| color | str | | [optional] | - --- ### Conventions diff --git a/paas/docs/ReportTemplateExportData.md b/paas/docs/ReportTemplateExportData.md index 300c5d0c..6a2b0ff6 100644 --- a/paas/docs/ReportTemplateExportData.md +++ b/paas/docs/ReportTemplateExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/ReportTimeSeriesChartSettings.md b/paas/docs/ReportTimeSeriesChartSettings.md index 3a6252d9..39ffdff8 100644 --- a/paas/docs/ReportTimeSeriesChartSettings.md +++ b/paas/docs/ReportTimeSeriesChartSettings.md @@ -37,37 +37,6 @@ -## Subtypes - -#### ReportBarChartWithLabelsSettings *(sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - ## Referenced Types #### Font @@ -199,40 +168,6 @@ | show_total | bool | | [optional] | | show_latest | bool | | [optional] | -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | - -#### ColorRange -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | -| color | str | | [optional] | - -#### LineSeriesSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_line | bool | | [optional] | -| step | bool | | [optional] | -| step_type | LineSeriesStepType | | [optional] | -| smooth | bool | | [optional] | -| line_type | ChartLineType | | [optional] | -| line_width | float | | [optional] | -| show_points | bool | | [optional] | -| show_point_label | bool | | [optional] | -| point_label_position | ChartLabelPosition | | [optional] | -| point_label_font | Font | | [optional] | -| point_label_color | str | | [optional] | -| enable_point_label_background | bool | | [optional] | -| point_label_background | str | | [optional] | -| point_shape | ChartShape | | [optional] | -| point_size | float | | [optional] | -| fill_area_settings | ChartFillSettings | | [optional] | - #### FontWeight (enum) `NORMAL` | `BOLD` | `ENUM_500` @@ -270,21 +205,6 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` -#### ChartFillType (enum) -`NONE` | `OPACITY` | `GRADIENT` - -#### ChartFillSettingsGradient -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| start | float | | [optional] | -| end | float | | [optional] | - -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - --- ### Conventions diff --git a/paas/docs/Role.md b/paas/docs/Role.md index 541d21aa..f9e0e570 100644 --- a/paas/docs/Role.md +++ b/paas/docs/Role.md @@ -12,11 +12,12 @@ A JSON value representing the role. | **id** | [**RoleId**](RoleId.md) | JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role. | [optional] | | **created_time** | **int** | Timestamp of the role creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | Additional parameters of the role. May include: 'description' (string). | [optional] | -| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | | **customer_id** | [**CustomerId**](CustomerId.md) | JSON object with Customer Id. | [optional] [readonly] | | **name** | **str** | Role Name | | | **type** | [**RoleType**](RoleType.md) | Type of the role: generic or group | | -| **permissions** | **object** | | [optional] | +| **permissions** | **object** | JSON object with the set of permissions. Structure is specific for role type | | +| **excluded_permissions** | **object** | JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions | [optional] | | **version** | **int** | | [optional] | | **owner_id** | [**EntityId**](EntityId.md) | JSON object with Customer or Tenant Id | [optional] [readonly] | diff --git a/paas/docs/RoleExportData.md b/paas/docs/RoleExportData.md index de015031..02136d76 100644 --- a/paas/docs/RoleExportData.md +++ b/paas/docs/RoleExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/RpcV1ControllerApi.md b/paas/docs/RpcV1ControllerApi.md index c81db6b5..8531954a 100644 --- a/paas/docs/RpcV1ControllerApi.md +++ b/paas/docs/RpcV1ControllerApi.md @@ -26,7 +26,7 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **device_id** | **str** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the RPC request. | | ### Return type @@ -51,7 +51,7 @@ Deprecated. See 'Rpc V 2 Controller' instead. Available for users with 'TENANT_ | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **device_id** | **str** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the RPC request. | | ### Return type diff --git a/paas/docs/RpcV2ControllerApi.md b/paas/docs/RpcV2ControllerApi.md index 9b49eb2b..a992a128 100644 --- a/paas/docs/RpcV2ControllerApi.md +++ b/paas/docs/RpcV2ControllerApi.md @@ -107,7 +107,7 @@ Sends the one-way remote-procedure call (RPC) request to device. Sends the one-w | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **device_id** | **str** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the RPC request. | | ### Return type @@ -132,7 +132,7 @@ Sends the two-way remote-procedure call (RPC) request to device. Sends the one-w | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **device_id** | **str** | A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the RPC request. | | ### Return type diff --git a/paas/docs/RuleChain.md b/paas/docs/RuleChain.md index ada600fc..864aa86a 100644 --- a/paas/docs/RuleChain.md +++ b/paas/docs/RuleChain.md @@ -12,7 +12,7 @@ A JSON value representing the rule chain. | **id** | [**RuleChainId**](RuleChainId.md) | JSON object with the Rule Chain Id. Specify this field to update the Rule Chain. Referencing non-existing Rule Chain Id will cause error. Omit this field to create new rule chain. | [optional] | | **created_time** | **int** | Timestamp of the rule chain creation, in milliseconds | [optional] [readonly] | | **additional_info** | **object** | | [optional] | -| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [readonly] | +| **tenant_id** | [**TenantId**](TenantId.md) | JSON object with Tenant Id. | [optional] [readonly] | | **name** | **str** | Rule Chain name | | | **type** | [**RuleChainType**](RuleChainType.md) | Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only. | [optional] | | **first_rule_node_id** | [**RuleNodeId**](RuleNodeId.md) | JSON object with Rule Chain Id. Pointer to the first rule node that should receive all messages pushed to this rule chain. | [optional] | diff --git a/paas/docs/RuleChainData.md b/paas/docs/RuleChainData.md index 17452e52..0871dbba 100644 --- a/paas/docs/RuleChainData.md +++ b/paas/docs/RuleChainData.md @@ -24,7 +24,7 @@ A JSON value representing the rule chains. | id | RuleChainId | JSON object with the Rule Chain Id. Specify this field to update the Rule Chain. Referencing non-existing Rule Chain Id will cause error. Omit this field to create new rule chain. | [optional] | | created_time | int | Timestamp of the rule chain creation, in milliseconds | [optional] [readonly] | | additional_info | object | | [optional] | -| tenant_id | TenantId | JSON object with Tenant Id. | [readonly] | +| tenant_id | TenantId | JSON object with Tenant Id. | [optional] [readonly] | | name | str | Rule Chain name | | | type | RuleChainType | Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only. | [optional] | | first_rule_node_id | RuleNodeId | JSON object with Rule Chain Id. Pointer to the first rule node that should receive all messages pushed to this rule chain. | [optional] | @@ -42,7 +42,6 @@ A JSON value representing the rule chains. | nodes | List[RuleNode] | List of rule node JSON objects | | | connections | List[NodeConnectionInfo] | List of JSON objects that represent connections between rule nodes | | | rule_chain_connections | List[RuleChainConnectionInfo] | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List[RuleChainNote] | List of sticky notes placed on the rule chain canvas | [optional] | #### RuleChainType (enum) `CORE` | `EDGE` @@ -79,21 +78,6 @@ A JSON value representing the rule chains. | additional_info | object | JSON object with the additional information about the connection. | | | type | str | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | Unique identifier of the note on the canvas | [optional] | -| x | int | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | int | Vertical position of the note on the canvas, in pixels | [optional] | -| width | int | Width of the note, in pixels | [optional] | -| height | int | Height of the note, in pixels | [optional] | -| content | str | Markdown or HTML content of the note | [optional] | -| background_color | str | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| border_color | str | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| border_width | int | Border width of the note in pixels | [optional] | -| apply_default_markdown_style | bool | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdown_css | str | Custom CSS styles applied to the note content | [optional] | - #### DebugSettings | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/paas/docs/RuleChainExportData.md b/paas/docs/RuleChainExportData.md index e6a9c953..f6ee1491 100644 --- a/paas/docs/RuleChainExportData.md +++ b/paas/docs/RuleChainExportData.md @@ -35,13 +35,14 @@ | nodes | List[RuleNode] | List of rule node JSON objects | | | connections | List[NodeConnectionInfo] | List of JSON objects that represent connections between rule nodes | | | rule_chain_connections | List[RuleChainConnectionInfo] | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| notes | List[RuleChainNote] | List of sticky notes placed on the rule chain canvas | [optional] | #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -104,21 +105,6 @@ | additional_info | object | JSON object with the additional information about the connection. | | | type | str | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | Unique identifier of the note on the canvas | [optional] | -| x | int | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | int | Vertical position of the note on the canvas, in pixels | [optional] | -| width | int | Width of the note, in pixels | [optional] | -| height | int | Height of the note, in pixels | [optional] | -| content | str | Markdown or HTML content of the note | [optional] | -| background_color | str | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| border_color | str | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| border_width | int | Border width of the note in pixels | [optional] | -| apply_default_markdown_style | bool | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdown_css | str | Custom CSS styles applied to the note content | [optional] | - #### RelationTypeGroup (enum) `COMMON` | `DASHBOARD` | `FROM_ENTITY_GROUP` | `RULE_CHAIN` | `RULE_NODE` | `EDGE` | `EDGE_AUTO_ASSIGN_RULE_CHAIN` @@ -135,56 +121,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -202,9 +188,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -248,11 +234,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -388,26 +374,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -438,41 +424,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -489,17 +475,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -508,46 +497,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -556,7 +542,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -565,7 +551,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/RuleChainMetaData.md b/paas/docs/RuleChainMetaData.md index 0d514184..6458a2ea 100644 --- a/paas/docs/RuleChainMetaData.md +++ b/paas/docs/RuleChainMetaData.md @@ -15,7 +15,6 @@ A JSON value representing the rule chain metadata. | **nodes** | [**List[RuleNode]**](RuleNode.md) | List of rule node JSON objects | | | **connections** | [**List[NodeConnectionInfo]**](NodeConnectionInfo.md) | List of JSON objects that represent connections between rule nodes | | | **rule_chain_connections** | [**List[RuleChainConnectionInfo]**](RuleChainConnectionInfo.md) | List of JSON objects that represent connections between rule nodes and other rule chains. | | -| **notes** | [**List[RuleChainNote]**](RuleChainNote.md) | List of sticky notes placed on the rule chain canvas | [optional] | @@ -55,21 +54,6 @@ A JSON value representing the rule chain metadata. | additional_info | object | JSON object with the additional information about the connection. | | | type | str | Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure' | | -#### RuleChainNote -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| id | str | Unique identifier of the note on the canvas | [optional] | -| x | int | Horizontal position of the note on the canvas, in pixels | [optional] | -| y | int | Vertical position of the note on the canvas, in pixels | [optional] | -| width | int | Width of the note, in pixels | [optional] | -| height | int | Height of the note, in pixels | [optional] | -| content | str | Markdown or HTML content of the note | [optional] | -| background_color | str | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| border_color | str | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| border_width | int | Border width of the note in pixels | [optional] | -| apply_default_markdown_style | bool | Whether to apply the default markdown stylesheet to the note content | [optional] | -| markdown_css | str | Custom CSS styles applied to the note content | [optional] | - #### DebugSettings | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/paas/docs/RuleChainNote.md b/paas/docs/RuleChainNote.md deleted file mode 100644 index 9ca563ef..00000000 --- a/paas/docs/RuleChainNote.md +++ /dev/null @@ -1,33 +0,0 @@ - -# RuleChainNote - -`tb_paas_client.models.RuleChainNote` - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -| **id** | **str** | Unique identifier of the note on the canvas | [optional] | -| **x** | **int** | Horizontal position of the note on the canvas, in pixels | [optional] | -| **y** | **int** | Vertical position of the note on the canvas, in pixels | [optional] | -| **width** | **int** | Width of the note, in pixels | [optional] | -| **height** | **int** | Height of the note, in pixels | [optional] | -| **content** | **str** | Markdown or HTML content of the note | [optional] | -| **background_color** | **str** | Background color of the note in CSS hex format, e.g. '#FFF9C4' | [optional] | -| **border_color** | **str** | Border color of the note in CSS hex format, e.g. '#E6C800' | [optional] | -| **border_width** | **int** | Border width of the note in pixels | [optional] | -| **apply_default_markdown_style** | **bool** | Whether to apply the default markdown stylesheet to the note content | [optional] | -| **markdown_css** | **str** | Custom CSS styles applied to the note content | [optional] | - - - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.id`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `RuleChainNote.model_validate(data)` or `RuleChainNote.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/RuleEngineControllerApi.md b/paas/docs/RuleEngineControllerApi.md index 4c52da83..0a6bfd1b 100644 --- a/paas/docs/RuleEngineControllerApi.md +++ b/paas/docs/RuleEngineControllerApi.md @@ -29,7 +29,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ |------------- | ------------- | ------------- | -------------| | **entity_type** | **str** | A string value representing the entity type. For example, 'DEVICE' | | | **entity_id** | **str** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the message. | | ### Return type @@ -57,7 +57,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ | **entity_id** | **str** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **queue_name** | **str** | Queue name to process the request in the rule engine | | | **timeout** | **int** | Timeout to process the request in milliseconds | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the message. | | ### Return type @@ -84,7 +84,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ | **entity_type** | **str** | A string value representing the entity type. For example, 'DEVICE' | | | **entity_id** | **str** | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | | | **timeout** | **int** | Timeout to process the request in milliseconds | | -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the message. | | ### Return type @@ -108,7 +108,7 @@ Creates the Message with type 'REST_API_REQUEST' and payload taken from the requ | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **body** | **str** | | | +| **body** | **str** | A JSON object representing the message. | | ### Return type diff --git a/paas/docs/SaveDeviceWithCredentialsRequest.md b/paas/docs/SaveDeviceWithCredentialsRequest.md index f6d3abd9..170c5da8 100644 --- a/paas/docs/SaveDeviceWithCredentialsRequest.md +++ b/paas/docs/SaveDeviceWithCredentialsRequest.md @@ -29,7 +29,7 @@ The JSON object with device and credentials. See method description above for ex | name | str | Unique Device Name in scope of Tenant | [optional] | | type | str | Device Profile Name | [optional] | | label | str | Label that may be used in widgets | [optional] | -| device_profile_id | DeviceProfileId | JSON object with Device Profile Id. | | +| device_profile_id | DeviceProfileId | JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used. | [optional] | | device_data | DeviceData | JSON object with content specific to type of transport in the device profile. | [optional] | | firmware_id | OtaPackageId | JSON object with Ota Package Id. | [optional] | | software_id | OtaPackageId | JSON object with Ota Package Id. | [optional] | diff --git a/paas/docs/SchedulerEventExportData.md b/paas/docs/SchedulerEventExportData.md index bf30d069..892d53d1 100644 --- a/paas/docs/SchedulerEventExportData.md +++ b/paas/docs/SchedulerEventExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/ScriptCalculatedFieldConfiguration.md b/paas/docs/ScriptCalculatedFieldConfiguration.md index 80cf0b62..b99f92e3 100644 --- a/paas/docs/ScriptCalculatedFieldConfiguration.md +++ b/paas/docs/ScriptCalculatedFieldConfiguration.md @@ -21,8 +21,8 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### Argument | Name | Type | Description | Notes | @@ -37,9 +37,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | diff --git a/paas/docs/AlarmRuleSimpleCondition.md b/paas/docs/SimpleAlarmCondition.md similarity index 76% rename from paas/docs/AlarmRuleSimpleCondition.md rename to paas/docs/SimpleAlarmCondition.md index 8b450ff6..a3883522 100644 --- a/paas/docs/AlarmRuleSimpleCondition.md +++ b/paas/docs/SimpleAlarmCondition.md @@ -1,9 +1,9 @@ -# AlarmRuleSimpleCondition +# SimpleAlarmCondition -`tb_paas_client.models.AlarmRuleSimpleCondition` +`tb_paas_client.models.SimpleAlarmCondition` -**Extends:** **AlarmRuleCondition** +**Extends:** **AlarmCondition** ## Properties @@ -14,11 +14,11 @@ ## Referenced Types -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | #### AlarmConditionExpression @@ -29,53 +29,56 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -84,46 +87,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -132,7 +132,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -141,7 +141,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -150,15 +150,15 @@ | static_value | bool | | [optional] | | dynamic_value_argument | str | | [optional] | +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + #### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - --- ### Conventions @@ -166,6 +166,6 @@ - **Package:** `tb_paas_client.models` - **Attribute access:** `obj.`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `AlarmRuleSimpleCondition.model_validate(data)` or `AlarmRuleSimpleCondition.model_validate_json(json_str)` +- **Deserialize:** `SimpleAlarmCondition.model_validate(data)` or `SimpleAlarmCondition.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/SimpleAlarmConditionExpression.md b/paas/docs/SimpleAlarmConditionExpression.md index a116f0e0..57c02bbe 100644 --- a/paas/docs/SimpleAlarmConditionExpression.md +++ b/paas/docs/SimpleAlarmConditionExpression.md @@ -9,8 +9,8 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -| **filters** | [**List[AlarmRuleConditionFilter]**](AlarmRuleConditionFilter.md) | | | -| **operation** | [**ComplexOperation**](ComplexOperation.md) | | [optional] | +| **filters** | [**List[AlarmConditionFilter]**](AlarmConditionFilter.md) | | | +| **operation** | [**AlarmRuleComplexOperation**](AlarmRuleComplexOperation.md) | | [optional] | @@ -21,17 +21,20 @@ |------|------|-------------|-------| | type | str | | | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -40,38 +43,35 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -80,7 +80,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -89,7 +89,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean @@ -98,15 +98,15 @@ | static_value | bool | | [optional] | | dynamic_value_argument | str | | [optional] | +#### TimeUnit (enum) +`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` + #### AlarmConditionValueLong | Name | Type | Description | Notes | |------|------|-------------|-------| | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### TimeUnit (enum) -`NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` - --- ### Conventions diff --git a/paas/docs/SimpleAlarmConditionSpec.md b/paas/docs/SimpleAlarmConditionSpec.md deleted file mode 100644 index e852ef10..00000000 --- a/paas/docs/SimpleAlarmConditionSpec.md +++ /dev/null @@ -1,31 +0,0 @@ - -# SimpleAlarmConditionSpec - -`tb_paas_client.models.SimpleAlarmConditionSpec` - -**Extends:** **AlarmConditionSpec** - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| - - - -## Referenced Types - -#### AlarmConditionSpec -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | str | | | - ---- - -### Conventions - -- **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.`, `obj.name`, etc. -- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON -- **Deserialize:** `SimpleAlarmConditionSpec.model_validate(data)` or `SimpleAlarmConditionSpec.model_validate_json(json_str)` -- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions - diff --git a/paas/docs/SimpleCalculatedFieldConfiguration.md b/paas/docs/SimpleCalculatedFieldConfiguration.md index 3142359d..3362b534 100644 --- a/paas/docs/SimpleCalculatedFieldConfiguration.md +++ b/paas/docs/SimpleCalculatedFieldConfiguration.md @@ -22,8 +22,8 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### Argument | Name | Type | Description | Notes | @@ -38,9 +38,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | diff --git a/paas/docs/SolutionData.md b/paas/docs/SolutionData.md new file mode 100644 index 00000000..2ec6946c --- /dev/null +++ b/paas/docs/SolutionData.md @@ -0,0 +1,25 @@ + +# SolutionData + +`tb_paas_client.models.SolutionData` + +Portable solution package containing exported entities grouped by type. Represents a self-contained snapshot that can be imported into another tenant. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **entities** | **Dict[str, List[EntityExportData]]** | Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects. | | + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.entities`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `SolutionData.model_validate(data)` or `SolutionData.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/SolutionExportImportControllerApi.md b/paas/docs/SolutionExportImportControllerApi.md new file mode 100644 index 00000000..03c09191 --- /dev/null +++ b/paas/docs/SolutionExportImportControllerApi.md @@ -0,0 +1,82 @@ +# SolutionExportImportControllerApi + +`ThingsboardClient` methods: + +```python +SolutionExportResponse client.export_solution(solution_export_request: SolutionExportRequest) # Export Solution (exportSolution) +SolutionImportResult client.import_solution(solution_data: SolutionData) # Import Solution (importSolution) +SolutionValidationResult client.validate_solution(solution_data: SolutionData) # Validate Solution (validateSolution) +``` + + +## export_solution + +```python +SolutionExportResponse client.export_solution(solution_export_request: SolutionExportRequest) +``` + +**POST** `/api/solution/export` + +Export Solution (exportSolution) + +Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_export_request** | **SolutionExportRequest** | Export request with entity IDs and optional settings. | | + +### Return type + +**SolutionExportResponse** + + +## import_solution + +```python +SolutionImportResult client.import_solution(solution_data: SolutionData) +``` + +**POST** `/api/solution/import` + +Import Solution (importSolution) + +Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_data** | **SolutionData** | Solution data exported via the export endpoint. | | + +### Return type + +**SolutionImportResult** + + +## validate_solution + +```python +SolutionValidationResult client.validate_solution(solution_data: SolutionData) +``` + +**POST** `/api/solution/validate` + +Validate Solution (validateSolution) + +Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_data** | **SolutionData** | Solution data to validate. | | + +### Return type + +**SolutionValidationResult** + diff --git a/paas/docs/SolutionExportRequest.md b/paas/docs/SolutionExportRequest.md new file mode 100644 index 00000000..ead78e27 --- /dev/null +++ b/paas/docs/SolutionExportRequest.md @@ -0,0 +1,43 @@ + +# SolutionExportRequest + +`tb_paas_client.models.SolutionExportRequest` + +Solution export request specifying which entities to include and export settings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **entity_ids** | [**List[EntityId]**](EntityId.md) | | [optional] | +| **settings** | [**EntityExportSettings**](EntityExportSettings.md) | Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data. | [optional] | + + + +## Referenced Types + +> **EntityId types** (`AdminSettingsId`, `AiModelId`, `AlarmId`, `ApiKeyId`, `ApiUsageStateId`, `AssetId`, `AssetProfileId`, `BillingCustomerId`, `BlobEntityId`, `CalculatedFieldId`, `ConverterId`, `CouponId`, `CustomerId`, `DashboardId`, `DeviceId`, `DeviceProfileId`, `DomainId`, `EdgeId`, `EntityGroupId`, `EntityViewId`, `GroupPermissionId`, `IntegrationId`, `JobId`, `MobileAppBundleId`, `MobileAppId`, `NotificationId`, `NotificationRequestId`, `NotificationRuleId`, `NotificationTargetId`, `NotificationTemplateId`, `OAuth2ClientId`, `OtaPackageId`, `ProductId`, `QueueId`, `QueueStatsId`, `ReportId`, `ReportTemplateId`, `RoleId`, `RpcId`, `RuleChainId`, `RuleNodeId`, `SchedulerEventId`, `SecretId`, `SubscriptionAddonId`, `SubscriptionId`, `SubscriptionPlanId`, `TbResourceId`, `TenantId`, `TenantProfileId`, `UserId`, `WidgetTypeId`, `WidgetsBundleId`, etc.): `{entity_type: EntityType, id: UUID}` — all EntityId subtypes share this structure. + +#### EntityExportSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| export_relations | bool | | [optional] | +| export_attributes | bool | | [optional] | +| export_credentials | bool | | [optional] | +| export_calculated_fields | bool | | [optional] | +| export_permissions | bool | | [optional] | +| export_group_entities | bool | | [optional] | + +#### EntityType (enum) +`TENANT` | `CUSTOMER` | `USER` | `DASHBOARD` | `ASSET` | `DEVICE` | `ALARM` | `ENTITY_GROUP` | `CONVERTER` | `INTEGRATION` | … (52 values total) + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.entity_ids`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `SolutionExportRequest.model_validate(data)` or `SolutionExportRequest.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/SolutionExportResponse.md b/paas/docs/SolutionExportResponse.md new file mode 100644 index 00000000..e9ffd4a6 --- /dev/null +++ b/paas/docs/SolutionExportResponse.md @@ -0,0 +1,33 @@ + +# SolutionExportResponse + +`tb_paas_client.models.SolutionExportResponse` + +Solution export response containing the exported solution data and any dependency warnings. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **solution** | [**SolutionData**](SolutionData.md) | The exported solution data containing all requested entities grouped by type. | [optional] | +| **warnings** | **List[str]** | List of dependency warnings. Generated when exported entities reference other entities that are not included in the export (e.g. a device profile references a rule chain that was not selected for export). | [optional] | + + + +## Referenced Types + +#### SolutionData +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| entities | Dict[str, List[EntityExportData]] | Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects. | | + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.solution`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `SolutionExportResponse.model_validate(data)` or `SolutionExportResponse.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/SolutionImportResult.md b/paas/docs/SolutionImportResult.md new file mode 100644 index 00000000..1783c5f1 --- /dev/null +++ b/paas/docs/SolutionImportResult.md @@ -0,0 +1,27 @@ + +# SolutionImportResult + +`tb_paas_client.models.SolutionImportResult` + +Result of a solution import operation. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **success** | **bool** | 'true' if all entities were imported successfully. | [optional] | +| **created** | **Dict[str, int]** | Number of newly created entities per entity type. Entity types with zero created entities are omitted. | [optional] | +| **id_mapping** | **Dict[str, UUID]** | Mapping from external entity IDs (as they appear in the solution file) to the internal entity IDs assigned during import. | [optional] | + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.success`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `SolutionImportResult.model_validate(data)` or `SolutionImportResult.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/SolutionValidationResult.md b/paas/docs/SolutionValidationResult.md new file mode 100644 index 00000000..d39980f5 --- /dev/null +++ b/paas/docs/SolutionValidationResult.md @@ -0,0 +1,28 @@ + +# SolutionValidationResult + +`tb_paas_client.models.SolutionValidationResult` + +Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data. + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +| **valid** | **bool** | 'true' if the solution can be imported without errors. 'false' if there are structural issues (empty entities, unsupported types, malformed data). | [optional] | +| **entity_summary** | **Dict[str, int]** | Number of entities per type found in the solution file. | [optional] | +| **conflicts** | **List[str]** | List of blocking issues that would prevent import (e.g. unsupported entity types, missing or malformed entity data). | [optional] | +| **warnings** | **List[str]** | List of non-blocking warnings (e.g. missing dependency references). | [optional] | + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.valid`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `SolutionValidationResult.model_validate(data)` or `SolutionValidationResult.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/SpecificTimeSchedule.md b/paas/docs/SpecificTimeSchedule.md index bc94bb32..30f9d269 100644 --- a/paas/docs/SpecificTimeSchedule.md +++ b/paas/docs/SpecificTimeSchedule.md @@ -9,10 +9,10 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **timezone** | **str** | | [optional] | | **days_of_week** | **List[int]** | | [optional] | -| **ends_on** | **int** | | [optional] | | **starts_on** | **int** | | [optional] | -| **timezone** | **str** | | [optional] | +| **ends_on** | **int** | | [optional] | @@ -21,29 +21,14 @@ #### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| -| dynamic_value | DynamicValueString | | [optional] | -| type | AlarmScheduleType | | [optional] | - -#### DynamicValueString -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| resolved_value | str | | [optional] | -| source_type | DynamicValueSourceType | | [optional] | -| source_attribute | str | | [optional] | -| inherit | bool | | [optional] | - -#### AlarmScheduleType (enum) -`ANY_TIME` | `SPECIFIC_TIME` | `CUSTOM` - -#### DynamicValueSourceType (enum) -`CURRENT_TENANT` | `CURRENT_CUSTOMER` | `CURRENT_USER` | `CURRENT_DEVICE` +| type | str | | | --- ### Conventions - **Package:** `tb_paas_client.models` -- **Attribute access:** `obj.days_of_week`, `obj.name`, etc. +- **Attribute access:** `obj.timezone`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `SpecificTimeSchedule.model_validate(data)` or `SpecificTimeSchedule.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/paas/docs/TableSortDirection.md b/paas/docs/TableSortDirection.md new file mode 100644 index 00000000..f737d523 --- /dev/null +++ b/paas/docs/TableSortDirection.md @@ -0,0 +1,24 @@ + +# TableSortDirection + +`tb_paas_client.models.TableSortDirection` + +## Enum Values + + +* `ASC` (value: `'ASC'`) + +* `DESC` (value: `'DESC'`) + + + +--- + +### Conventions + +- **Package:** `tb_paas_client.models` +- **Attribute access:** `obj.`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `TableSortDirection.model_validate(data)` or `TableSortDirection.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/paas/docs/TableSortOrder.md b/paas/docs/TableSortOrder.md index 8137357c..79a9a9cb 100644 --- a/paas/docs/TableSortOrder.md +++ b/paas/docs/TableSortOrder.md @@ -8,13 +8,13 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| | **column** | **str** | | [optional] | -| **direction** | [**Direction**](Direction.md) | | [optional] | +| **direction** | [**TableSortDirection**](TableSortDirection.md) | | [optional] | ## Referenced Types -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` --- diff --git a/paas/docs/TaskResult.md b/paas/docs/TaskResult.md index 1f336a2a..c57060b4 100644 --- a/paas/docs/TaskResult.md +++ b/paas/docs/TaskResult.md @@ -11,6 +11,7 @@ | **success** | **bool** | | [optional] | | **discarded** | **bool** | | [optional] | | **finish_ts** | **int** | | [optional] | +| **error** | **str** | | [optional] | | **job_type** | **str** | | | diff --git a/paas/docs/TbChatRequest.md b/paas/docs/TbChatRequest.md index 1e6c2595..35e7b95b 100644 --- a/paas/docs/TbChatRequest.md +++ b/paas/docs/TbChatRequest.md @@ -28,7 +28,6 @@ #### AmazonBedrockChatModelConfig *(extends AiModelConfig, provider=`AMAZON_BEDROCK`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AmazonBedrockProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -36,11 +35,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AnthropicChatModelConfig *(extends AiModelConfig, provider=`ANTHROPIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AnthropicProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -49,11 +48,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### AzureOpenAiChatModelConfig *(extends AiModelConfig, provider=`AZURE_OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | AzureOpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -63,11 +62,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GitHubModelsChatModelConfig *(extends AiModelConfig, provider=`GITHUB_MODELS`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GitHubModelsProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -77,11 +76,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -92,11 +91,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### GoogleVertexAiGeminiChatModelConfig *(extends AiModelConfig, provider=`GOOGLE_VERTEX_AI_GEMINI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | GoogleVertexAiGeminiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -107,11 +106,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### MistralAiChatModelConfig *(extends AiModelConfig, provider=`MISTRAL_AI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | MistralAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -121,11 +120,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OllamaChatModelConfig *(extends AiModelConfig, provider=`OLLAMA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OllamaProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -135,11 +134,11 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### OpenAiChatModelConfig *(extends AiModelConfig, provider=`OPENAI`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| model_type | AiModelType | | [optional] [readonly] | | provider_config | OpenAiProviderConfig | | | | model_id | str | | | | temperature | float | | [optional] | @@ -149,6 +148,7 @@ | max_output_tokens | int | | [optional] | | timeout_seconds | int | | [optional] | | max_retries | int | | [optional] | +| model_type | AiModelType | | [optional] [readonly] | #### TbContent | Name | Type | Description | Notes | @@ -160,15 +160,15 @@ |------|------|-------------|-------| | text | str | The text content | | -#### AiModelType (enum) -`CHAT` - #### OpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| | base_url | str | | [optional] | | api_key | str | | [optional] | +#### AiModelType (enum) +`CHAT` + #### AzureOpenAiProviderConfig | Name | Type | Description | Notes | |------|------|-------------|-------| diff --git a/paas/docs/TbResourceExportData.md b/paas/docs/TbResourceExportData.md index 75c0932b..45fdc828 100644 --- a/paas/docs/TbResourceExportData.md +++ b/paas/docs/TbResourceExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/TimeSeriesOutput.md b/paas/docs/TimeSeriesOutput.md index 18fb4718..b54c1d67 100644 --- a/paas/docs/TimeSeriesOutput.md +++ b/paas/docs/TimeSeriesOutput.md @@ -18,9 +18,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | diff --git a/paas/docs/TimeseriesChartComponent.md b/paas/docs/TimeseriesChartComponent.md index 088ac701..1d98682d 100644 --- a/paas/docs/TimeseriesChartComponent.md +++ b/paas/docs/TimeseriesChartComponent.md @@ -98,35 +98,6 @@ | xaxis | TimeSeriesChartXAxisSettings | | [optional] | | yaxes | Dict[str, TimeSeriesChartYAxisSettings] | | [optional] | -#### ReportBarChartWithLabelsSettings *(extends ReportTimeSeriesChartSettings, sub_type=`barChartWithLabels`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| show_bar_label | bool | | [optional] | -| bar_label_font | Font | | [optional] | -| bar_label_color | str | | [optional] | -| show_bar_value | bool | | [optional] | -| bar_value_font | Font | | [optional] | -| bar_value_color | str | | [optional] | -| show_bar_border | bool | | [optional] | -| bar_border_width | float | | [optional] | -| bar_border_radius | float | | [optional] | -| bar_background_settings | ChartFillSettings | | [optional] | -| bar_units | str | | [optional] | -| bar_decimals | int | | [optional] | - -#### ReportRangeChartSettings *(extends ReportTimeSeriesChartSettings, sub_type=`rangeChart`)* -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| range_colors | List[ColorRange] | | [optional] | -| out_of_range_color | str | | [optional] | -| show_range_thresholds | bool | | [optional] | -| range_threshold | TimeSeriesChartThreshold | | [optional] | -| fill_area | bool | | [optional] | -| fill_area_opacity | float | | [optional] | -| line_settings | LineSeriesSettings | | [optional] | -| range_units | str | | [optional] | -| range_decimals | int | | [optional] | - #### ReportComponentSubType (enum) `DOUGHNUTCHART` | `HORIZONTALDOUGHNUTCHART` | `POINTCHART` | `BARCHART` | `PIECHART` | `LINECHART` | `LATESTBARCHART` | `RANGECHART` | `BARCHARTWITHLABELS` | `STATECHART` | … (11 values total) @@ -392,19 +363,23 @@ #### LegendPosition (enum) `TOP` | `BOTTOM` | `LEFT` | `RIGHT` -#### ChartFillSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| type | ChartFillType | | [optional] | -| opacity | float | | [optional] | -| gradient | ChartFillSettingsGradient | | [optional] | +#### DataKeySettingsType (enum) +`COLUMN` | `TIME_SERIES_CHART` | `DEFAULT` + +#### IntervalType (enum) +`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` -#### ColorRange +#### CellSettings | Name | Type | Description | Notes | |------|------|-------------|-------| -| var_from | float | | [optional] | -| to | float | | [optional] | +| font | Font | | [optional] | | color | str | | [optional] | +| background_color | str | | [optional] | +| text_alignment | TextAlignment | | [optional] | +| vertical_alignment | VerticalAlignment | | [optional] | + +#### TimeSeriesChartSeriesType (enum) +`LINE` | `BAR` #### LineSeriesSettings | Name | Type | Description | Notes | @@ -426,39 +401,6 @@ | point_size | float | | [optional] | | fill_area_settings | ChartFillSettings | | [optional] | -#### DataKeySettingsType (enum) -`COLUMN` | `TIME_SERIES_CHART` | `DEFAULT` - -#### IntervalType (enum) -`MILLISECONDS` | `WEEK` | `WEEK_ISO` | `MONTH` | `QUARTER` - -#### ChartFillType (enum) -`NONE` | `OPACITY` | `GRADIENT` - -#### ChartFillSettingsGradient -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| start | float | | [optional] | -| end | float | | [optional] | - -#### LineSeriesStepType (enum) -`START` | `MIDDLE` | `END` - -#### ChartLabelPosition (enum) -`TOP` | `BOTTOM` - -#### CellSettings -| Name | Type | Description | Notes | -|------|------|-------------|-------| -| font | Font | | [optional] | -| color | str | | [optional] | -| background_color | str | | [optional] | -| text_alignment | TextAlignment | | [optional] | -| vertical_alignment | VerticalAlignment | | [optional] | - -#### TimeSeriesChartSeriesType (enum) -`LINE` | `BAR` - #### BarSeriesSettings | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -487,6 +429,28 @@ #### VerticalAlignment (enum) `BOTTOM` | `TOP` | `MIDDLE` +#### LineSeriesStepType (enum) +`START` | `MIDDLE` | `END` + +#### ChartLabelPosition (enum) +`TOP` | `BOTTOM` + +#### ChartFillSettings +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| type | ChartFillType | | [optional] | +| opacity | float | | [optional] | +| gradient | ChartFillSettingsGradient | | [optional] | + +#### ChartFillType (enum) +`NONE` | `OPACITY` | `GRADIENT` + +#### ChartFillSettingsGradient +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| start | float | | [optional] | +| end | float | | [optional] | + --- ### Conventions diff --git a/paas/docs/TimeseriesTableComponent.md b/paas/docs/TimeseriesTableComponent.md index 0a875e1d..1f7768cb 100644 --- a/paas/docs/TimeseriesTableComponent.md +++ b/paas/docs/TimeseriesTableComponent.md @@ -70,7 +70,7 @@ | Name | Type | Description | Notes | |------|------|-------------|-------| | column | str | | [optional] | -| direction | Direction | | [optional] | +| direction | TableSortDirection | | [optional] | #### TimeWindowConfiguration | Name | Type | Description | Notes | @@ -126,7 +126,7 @@ #### VerticalAlignment (enum) `BOTTOM` | `TOP` | `MIDDLE` -#### Direction (enum) +#### TableSortDirection (enum) `ASC` | `DESC` #### History diff --git a/paas/docs/TranslationControllerApi.md b/paas/docs/TranslationControllerApi.md index 8925caad..ec5f10e8 100644 --- a/paas/docs/TranslationControllerApi.md +++ b/paas/docs/TranslationControllerApi.md @@ -6,7 +6,7 @@ bytearray client.download_full_translation(locale_code: str) # Download end-user all-to-one translation (downloadFullTranslation) object client.get_available_java_locales() # Get list of available java locales (getAvailableJavaLocales) object client.get_available_locales() # Get list of available locales (getAvailableLocales) -None client.get_full_translation(locale_code: str, if_none_match: Optional[str] = None, accept_encoding: Optional[str] = None) # Get end-user all-to-one translation (getFullTranslation) +object client.get_full_translation(locale_code: str, if_none_match: Optional[str] = None, accept_encoding: Optional[str] = None) # Get end-user all-to-one translation (getFullTranslation) object client.get_login_page_translation(locale_code: str, if_none_match: Optional[str] = None, accept_encoding: Optional[str] = None) # Get system translation for login page object client.get_translation_for_basic_edit(locale_code: str) # Get end-user multi-translation for basic edit (getTranslationForBasicEdit) List[TranslationInfo] client.get_translation_infos() # Get Translation info (getTranslationInfos) @@ -74,7 +74,7 @@ Fetch the list of customized locales from all levels Security check is performe ## get_full_translation ```python -None client.get_full_translation(locale_code: str, if_none_match: Optional[str] = None, accept_encoding: Optional[str] = None) +object client.get_full_translation(locale_code: str, if_none_match: Optional[str] = None, accept_encoding: Optional[str] = None) ``` **GET** `/api/translation/full/{localeCode}` @@ -94,7 +94,7 @@ Fetch the end-user translation for specified locale. The result is the merge of ### Return type -None (empty response body) +**object** ## get_login_page_translation diff --git a/paas/docs/WidgetTypeExportData.md b/paas/docs/WidgetTypeExportData.md index c847e5ec..c30ea2d4 100644 --- a/paas/docs/WidgetTypeExportData.md +++ b/paas/docs/WidgetTypeExportData.md @@ -28,8 +28,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -76,56 +78,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -143,9 +145,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -189,11 +191,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -329,26 +331,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -379,41 +381,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -430,17 +432,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -449,46 +454,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -497,7 +499,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -506,7 +508,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/docs/WidgetsBundleExportData.md b/paas/docs/WidgetsBundleExportData.md index a27b46b0..e35c5444 100644 --- a/paas/docs/WidgetsBundleExportData.md +++ b/paas/docs/WidgetsBundleExportData.md @@ -30,8 +30,10 @@ #### ExportableEntity | Name | Type | Description | Notes | |------|------|-------------|-------| +| created_time | int | | [optional] | | id | EntityId | | [optional] | | name | str | | [optional] | +| tenant_id | TenantId | | [optional] | #### EntityRelation | Name | Type | Description | Notes | @@ -78,56 +80,56 @@ #### CalculatedFieldConfiguration | Name | Type | Description | Notes | |------|------|-------------|-------| -| type | str | | | | output | Output | | [optional] | +| type | str | | | #### AlarmCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ALARM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| clear_rule | AlarmRuleDefinition | | [optional] | -| create_rules | Dict[str, AlarmRuleDefinition] | | | +| create_rules | Dict[str, AlarmRule] | | | +| clear_rule | AlarmRule | | [optional] | | propagate | bool | | [optional] | -| propagate_relation_types | List[str] | | [optional] | | propagate_to_owner | bool | | [optional] | | propagate_to_owner_hierarchy | bool | | [optional] | | propagate_to_tenant | bool | | [optional] | +| propagate_relation_types | List[str] | | [optional] | #### EntityAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`ENTITY_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | arguments | Dict[str, Argument] | | | -| interval | AggInterval | | | | metrics | Dict[str, AggMetric] | | | -| produce_intermediate_result | bool | | [optional] | +| interval | AggInterval | | | | watermark | Watermark | | [optional] | +| produce_intermediate_result | bool | | [optional] | #### GeofencingCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`GEOFENCING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | entity_coordinates | EntityCoordinates | | | +| zone_groups | Dict[str, ZoneGroupConfiguration] | | | | scheduled_update_enabled | bool | | [optional] | | scheduled_update_interval | int | | [optional] | -| zone_groups | Dict[str, ZoneGroupConfiguration] | | | #### PropagationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`PROPAGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| apply_expression_to_resolved_arguments | bool | | [optional] | | arguments | Dict[str, Argument] | | | | expression | str | | [optional] | | relation | RelationPathLevel | | | +| apply_expression_to_resolved_arguments | bool | | [optional] | #### RelatedEntitiesAggregationCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`RELATED_ENTITIES_AGGREGATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| relation | RelationPathLevel | | | | arguments | Dict[str, Argument] | | | | deduplication_interval_in_sec | int | | [optional] | | metrics | Dict[str, AggMetric] | | | -| relation | RelationPathLevel | | | -| scheduled_update_enabled | bool | | [optional] | -| scheduled_update_interval | int | | [optional] | | use_latest_ts | bool | | [optional] | +| scheduled_update_interval | int | | [optional] | +| scheduled_update_enabled | bool | | [optional] | #### ScriptCalculatedFieldConfiguration *(extends CalculatedFieldConfiguration, type=`SCRIPT`)* | Name | Type | Description | Notes | @@ -145,9 +147,9 @@ #### Output | Name | Type | Description | Notes | |------|------|-------------|-------| +| decimals_by_default | int | | [optional] | | name | str | | [optional] | | scope | AttributeScope | | [optional] | -| decimals_by_default | int | | [optional] | | strategy | object | | [optional] | | type | str | | | @@ -191,11 +193,11 @@ | relation_type | str | | [optional] | | direction | EntitySearchDirection | | [optional] | -#### AlarmRuleDefinition +#### AlarmRule | Name | Type | Description | Notes | |------|------|-------------|-------| +| condition | AlarmCondition | | | | alarm_details | str | | [optional] | -| condition | AlarmRuleCondition | | | | dashboard_id | DashboardId | | [optional] | #### RelationPathLevel @@ -331,26 +333,26 @@ #### EntitySearchDirection (enum) `FROM` | `TO` -#### AlarmRuleCondition +#### AlarmCondition | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | AlarmConditionExpression | | | -| schedule | AlarmConditionValueAlarmRuleSchedule | | [optional] | +| schedule | AlarmConditionValueAlarmSchedule | | [optional] | | type | str | | | -#### AlarmRuleDurationCondition *(extends AlarmRuleCondition, type=`DURATION`)* +#### DurationAlarmCondition *(extends AlarmCondition, type=`DURATION`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | unit | TimeUnit | | | | value | AlarmConditionValueLong | | | -#### AlarmRuleRepeatingCondition *(extends AlarmRuleCondition, type=`REPEATING`)* +#### RepeatingAlarmCondition *(extends AlarmCondition, type=`REPEATING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | count | AlarmConditionValueInteger | | | -#### AlarmRuleSimpleCondition *(extends AlarmRuleCondition, type=`SIMPLE`)* -*See AlarmRuleCondition for properties.* +#### SimpleAlarmCondition *(extends AlarmCondition, type=`SIMPLE`)* +*See AlarmCondition for properties.* #### AggFunction (enum) `MIN` | `MAX` | `SUM` | `AVG` | `COUNT` | `COUNT_UNIQUE` @@ -381,41 +383,41 @@ #### SimpleAlarmConditionExpression *(extends AlarmConditionExpression, type=`SIMPLE`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| filters | List[AlarmRuleConditionFilter] | | | -| operation | ComplexOperation | | [optional] | +| filters | List[AlarmConditionFilter] | | | +| operation | AlarmRuleComplexOperation | | [optional] | #### TbelAlarmConditionExpression *(extends AlarmConditionExpression, type=`TBEL`)* | Name | Type | Description | Notes | |------|------|-------------|-------| | expression | str | | | -#### AlarmConditionValueAlarmRuleSchedule +#### AlarmConditionValueAlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| +| static_value | AlarmSchedule | | [optional] | | dynamic_value_argument | str | | [optional] | -| static_value | AlarmRuleSchedule | | [optional] | -#### AlarmRuleSchedule +#### AlarmSchedule | Name | Type | Description | Notes | |------|------|-------------|-------| | type | str | | | -#### AlarmRuleAnyTimeSchedule *(extends AlarmRuleSchedule, type=`ANY_TIME`)* -*See AlarmRuleSchedule for properties.* +#### AnyTimeSchedule *(extends AlarmSchedule, type=`ANY_TIME`)* +*See AlarmSchedule for properties.* -#### AlarmRuleCustomTimeSchedule *(extends AlarmRuleSchedule, type=`CUSTOM`)* +#### CustomTimeSchedule *(extends AlarmSchedule, type=`CUSTOM`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| items | List[AlarmRuleCustomTimeScheduleItem] | | [optional] | | timezone | str | | [optional] | +| items | List[CustomTimeScheduleItem] | | [optional] | -#### AlarmRuleSpecificTimeSchedule *(extends AlarmRuleSchedule, type=`SPECIFIC_TIME`)* +#### SpecificTimeSchedule *(extends AlarmSchedule, type=`SPECIFIC_TIME`)* | Name | Type | Description | Notes | |------|------|-------------|-------| +| timezone | str | | [optional] | | days_of_week | List[int] | | [optional] | -| ends_on | int | | [optional] | | starts_on | int | | [optional] | -| timezone | str | | [optional] | +| ends_on | int | | [optional] | #### TimeUnit (enum) `NANOSECONDS` | `MICROSECONDS` | `MILLISECONDS` | `SECONDS` | `MINUTES` | `HOURS` | `DAYS` @@ -432,17 +434,20 @@ | static_value | int | | [optional] | | dynamic_value_argument | str | | [optional] | -#### AlarmRuleConditionFilter +#### AlarmConditionFilter | Name | Type | Description | Notes | |------|------|-------------|-------| | argument | str | | | -| operation | ComplexOperation | | [optional] | -| predicates | List[AlarmRuleKeyFilterPredicate] | | | | value_type | EntityKeyValueType | | | +| operation | AlarmRuleComplexOperation | | [optional] | +| predicates | List[AlarmRuleKeyFilterPredicate] | | | -#### ComplexOperation (enum) +#### AlarmRuleComplexOperation (enum) `AND` | `OR` +#### EntityKeyValueType (enum) +`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` + #### AlarmRuleKeyFilterPredicate | Name | Type | Description | Notes | |------|------|-------------|-------| @@ -451,46 +456,43 @@ #### AlarmRuleBooleanFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`BOOLEAN`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | BooleanOperation | | | +| operation | AlarmRuleBooleanOperation | | | | value | AlarmConditionValueBoolean | | | #### AlarmRuleComplexFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`COMPLEX`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | ComplexOperation | | [optional] | +| operation | AlarmRuleComplexOperation | | [optional] | | predicates | List[AlarmRuleKeyFilterPredicate] | | [optional] | -#### AlarmRuleNoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* +#### NoDataFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NO_DATA`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| duration | AlarmConditionValueLong | | | | unit | TimeUnit | | | +| duration | AlarmConditionValueLong | | | #### AlarmRuleNumericFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`NUMERIC`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| operation | NumericOperation | | | +| operation | AlarmRuleNumericOperation | | | | value | AlarmConditionValueDouble | | | #### AlarmRuleStringFilterPredicate *(extends AlarmRuleKeyFilterPredicate, type=`STRING`)* | Name | Type | Description | Notes | |------|------|-------------|-------| -| ignore_case | bool | | [optional] | -| operation | StringOperation | | | +| operation | AlarmRuleStringOperation | | | | value | AlarmConditionValueString | | | +| ignore_case | bool | | [optional] | -#### EntityKeyValueType (enum) -`STRING` | `NUMERIC` | `BOOLEAN` | `DATE_TIME` - -#### AlarmRuleCustomTimeScheduleItem +#### CustomTimeScheduleItem | Name | Type | Description | Notes | |------|------|-------------|-------| -| day_of_week | int | | [optional] | | enabled | bool | | [optional] | -| ends_on | int | | [optional] | +| day_of_week | int | | [optional] | | starts_on | int | | [optional] | +| ends_on | int | | [optional] | -#### StringOperation (enum) +#### AlarmRuleStringOperation (enum) `EQUAL` | `NOT_EQUAL` | `STARTS_WITH` | `ENDS_WITH` | `CONTAINS` | `NOT_CONTAINS` | `IN` | `NOT_IN` #### AlarmConditionValueString @@ -499,7 +501,7 @@ | static_value | str | | [optional] | | dynamic_value_argument | str | | [optional] | -#### NumericOperation (enum) +#### AlarmRuleNumericOperation (enum) `EQUAL` | `NOT_EQUAL` | `GREATER` | `LESS` | `GREATER_OR_EQUAL` | `LESS_OR_EQUAL` #### AlarmConditionValueDouble @@ -508,7 +510,7 @@ | static_value | float | | [optional] | | dynamic_value_argument | str | | [optional] | -#### BooleanOperation (enum) +#### AlarmRuleBooleanOperation (enum) `EQUAL` | `NOT_EQUAL` #### AlarmConditionValueBoolean diff --git a/paas/spec/openapi.json b/paas/spec/openapi.json index fb4e095e..b3ee2061 100644 --- a/paas/spec/openapi.json +++ b/paas/spec/openapi.json @@ -49,6 +49,10 @@ "name": "alarm-controller", "description": "Alarm Controller" }, + { + "name": "alarm-rule-controller", + "description": "Alarm Rule Controller" + }, { "name": "api-key-controller", "description": "Api Key Controller" @@ -297,6 +301,10 @@ "name": "solution-controller", "description": "Solution Controller" }, + { + "name": "solution-export-import-controller", + "description": "Solution Export Import Controller" + }, { "name": "subscription-controller", "description": "Subscription Controller" @@ -6003,23 +6011,13 @@ ] } }, - "/api/ai/solution/import": { - "post": { + "/api/ai/solution/infos": { + "get": { "tags": [ "ai-solution-controller" ], - "summary": "importSolution", - "operationId": "importSolution", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "getSolutions", + "operationId": "getSolutions", "responses": { "200": { "description": "OK", @@ -6042,7 +6040,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6162,13 +6160,13 @@ ] } }, - "/api/ai/solution/infos": { - "get": { + "/api/ai/solution/start": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "getSolutions", - "operationId": "getSolutions", + "summary": "startNew", + "operationId": "startNew", "responses": { "200": { "description": "OK", @@ -6191,7 +6189,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6311,13 +6309,24 @@ ] } }, - "/api/ai/solution/start": { - "post": { + "/api/ai/solution/{solutionId}": { + "get": { "tags": [ "ai-solution-controller" ], - "summary": "startNew", - "operationId": "startNew", + "summary": "getSolution", + "operationId": "getSolution", + "parameters": [ + { + "name": "solutionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { "200": { "description": "OK", @@ -6340,7 +6349,158 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "ai-solution-controller" + ], + "summary": "deleteSolution", + "operationId": "deleteSolution", + "parameters": [ + { + "name": "solutionId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6460,13 +6620,13 @@ ] } }, - "/api/ai/solution/{solutionId}": { - "get": { + "/api/ai/solution/{solutionId}/create": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "getSolution", - "operationId": "getSolution", + "summary": "createSolution", + "operationId": "createSolution", "parameters": [ { "name": "solutionId", @@ -6500,7 +6660,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6618,13 +6778,15 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ai/solution/{solutionId}/install": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "deleteSolution", - "operationId": "deleteSolution", + "summary": "installSolution", + "operationId": "installSolution", "parameters": [ { "name": "solutionId", @@ -6634,11 +6796,26 @@ "type": "string", "format": "uuid" } + }, + { + "name": "X-Authorization", + "in": "header", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -6651,7 +6828,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -6771,173 +6948,13 @@ ] } }, - "/api/ai/solution/{solutionId}/create": { - "post": { + "/api/ai/solution/{solutionId}/uninstall": { + "delete": { "tags": [ "ai-solution-controller" ], - "summary": "createSolution", - "operationId": "createSolution", - "parameters": [ - { - "name": "solutionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/ai/solution/{solutionId}/export": { - "get": { - "tags": [ - "ai-solution-controller" - ], - "summary": "exportSolution", - "operationId": "exportSolution", + "summary": "uninstallSolution", + "operationId": "uninstallSolution", "parameters": [ { "name": "solutionId", @@ -6947,6 +6964,14 @@ "type": "string", "format": "uuid" } + }, + { + "name": "X-Authorization", + "in": "header", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -7091,13 +7116,13 @@ ] } }, - "/api/ai/solution/{solutionId}/install": { - "post": { + "/api/ai/solution/{solutionId}/{dataKey}": { + "put": { "tags": [ "ai-solution-controller" ], - "summary": "installSolution", - "operationId": "installSolution", + "summary": "updateData", + "operationId": "updateData", "parameters": [ { "name": "solutionId", @@ -7109,14 +7134,24 @@ } }, { - "name": "X-Authorization", - "in": "header", + "name": "dataKey", + "in": "path", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -7139,7 +7174,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7259,13 +7294,13 @@ ] } }, - "/api/ai/solution/{solutionId}/uninstall": { - "delete": { + "/api/ai/solution/{solutionId}/{step}/chat": { + "post": { "tags": [ "ai-solution-controller" ], - "summary": "uninstallSolution", - "operationId": "uninstallSolution", + "summary": "chat", + "operationId": "chat", "parameters": [ { "name": "solutionId", @@ -7277,14 +7312,24 @@ } }, { - "name": "X-Authorization", - "in": "header", + "name": "step", + "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/SolutionStep" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -7307,7 +7352,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -7427,13 +7472,13 @@ ] } }, - "/api/ai/solution/{solutionId}/{dataKey}": { - "put": { + "/api/ai/solution/{solutionId}/{step}/clear": { + "delete": { "tags": [ "ai-solution-controller" ], - "summary": "updateData", - "operationId": "updateData", + "summary": "clearStep", + "operationId": "clearStep", "parameters": [ { "name": "solutionId", @@ -7445,34 +7490,17 @@ } }, { - "name": "dataKey", + "name": "step", "in": "path", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/SolutionStep" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -7605,37 +7633,18 @@ ] } }, - "/api/ai/solution/{solutionId}/{step}/chat": { + "/api/ai/tools/resolve-approval": { "post": { "tags": [ - "ai-solution-controller" - ], - "summary": "chat", - "operationId": "chat", - "parameters": [ - { - "name": "solutionId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "step", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/SolutionStep" - } - } + "ai-tool-controller" ], + "summary": "resolveToolApproval", + "operationId": "resolveToolApproval", "requestBody": { "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JsonNode" } } }, @@ -7783,35 +7792,81 @@ ] } }, - "/api/ai/solution/{solutionId}/{step}/clear": { - "delete": { + "/api/alarm/{alarmId}/comment": { + "get": { "tags": [ - "ai-solution-controller" + "alarm-comment-controller" ], - "summary": "clearStep", - "operationId": "clearStep", + "summary": "Get Alarm comments (getAlarmComments)", + "description": "Returns a page of alarm comments for specified alarm. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAlarmComments", "parameters": [ { - "name": "solutionId", + "name": "alarmId", "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } }, { - "name": "step", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "$ref": "#/components/schemas/SolutionStep" + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAlarmCommentInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -7942,20 +7997,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ai/tools/resolve-approval": { + }, "post": { "tags": [ - "ai-tool-controller" + "alarm-comment-controller" + ], + "summary": "Create or update Alarm Comment ", + "description": "Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. \n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. \n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveAlarmComment", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "resolveToolApproval", - "operationId": "resolveToolApproval", "requestBody": { + "description": "A JSON value representing the comment.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/AlarmComment" } } }, @@ -7967,7 +8033,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/AlarmComment" } } } @@ -8103,14 +8169,14 @@ ] } }, - "/api/alarm/{alarmId}/comment": { - "get": { + "/api/alarm/{alarmId}/comment/{commentId}": { + "delete": { "tags": [ "alarm-comment-controller" ], - "summary": "Get Alarm comments (getAlarmComments)", - "description": "Returns a page of alarm comments for specified alarm. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAlarmComments", + "summary": "Delete Alarm comment (deleteAlarmComment)", + "description": "Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteAlarmComment", "parameters": [ { "name": "alarmId", @@ -8122,62 +8188,18 @@ } }, { - "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": "commentId", + "in": "path", + "description": "A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "id" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataAlarmCommentInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -8308,31 +8330,22 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/alarm": { "post": { "tags": [ - "alarm-comment-controller" - ], - "summary": "Create or update Alarm Comment ", - "description": "Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. \n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. \n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveAlarmComment", - "parameters": [ - { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "alarm-controller" ], + "summary": "Create or Update Alarm (saveAlarm)", + "description": "Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. \n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveAlarm", "requestBody": { - "description": "A JSON value representing the comment.", + "description": "A JSON value representing the alarm.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmComment" + "$ref": "#/components/schemas/Alarm" } } }, @@ -8344,7 +8357,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmComment" + "$ref": "#/components/schemas/Alarm" } } } @@ -8480,37 +8493,84 @@ ] } }, - "/api/alarm/{alarmId}/comment/{commentId}": { - "delete": { + "/api/alarm/highestSeverity/{entityType}/{entityId}": { + "get": { "tags": [ - "alarm-comment-controller" + "alarm-controller" ], - "summary": "Delete Alarm comment (deleteAlarmComment)", - "description": "Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteAlarmComment", + "summary": "Get Highest Alarm Severity (getHighestAlarmSeverity)", + "description": "Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getHighestAlarmSeverity", "parameters": [ { - "name": "alarmId", + "name": "entityType", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } }, { - "name": "commentId", + "name": "entityId", "in": "path", - "description": "A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "searchStatus", + "in": "query", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ] + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmSeverity" + } + } + } }, "400": { "description": "Bad Request", @@ -8643,32 +8703,32 @@ ] } }, - "/api/alarm": { - "post": { + "/api/alarm/info/{alarmId}": { + "get": { "tags": [ "alarm-controller" ], - "summary": "Create or Update Alarm (saveAlarm)", - "description": "Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. \n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveAlarm", - "requestBody": { - "description": "A JSON value representing the alarm.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Alarm" - } + "summary": "Get Alarm Info (getAlarmInfoById)", + "description": "Fetch the Alarm Info object based on the provided Alarm Id. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmInfoById", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm 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/Alarm" + "$ref": "#/components/schemas/AlarmInfo" } } } @@ -8684,7 +8744,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -8804,69 +8864,214 @@ ] } }, - "/api/alarm/highestSeverity/{entityType}/{entityId}": { + "/api/alarm/types": { "get": { "tags": [ "alarm-controller" ], - "summary": "Get Highest Alarm Severity (getHighestAlarmSeverity)", - "description": "Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getHighestAlarmSeverity", + "summary": "Get Alarm Types (getAlarmTypes)", + "description": "Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request.", + "operationId": "getAlarmTypes", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "searchStatus", + "name": "textSearch", "in": "query", - "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", "required": false, "schema": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] + "type": "string" } }, { - "name": "status", + "name": "sortOrder", "in": "query", - "description": "A string value representing one of the AlarmStatus enumeration value", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", "enum": [ - "ACTIVE_UNACK", - "ACTIVE_ACK", - "CLEARED_UNACK", - "CLEARED_ACK" + "ASC", + "DESC" ] } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntitySubtype" + } + } + } }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/alarm/{alarmId}": { + "get": { + "tags": [ + "alarm-controller" + ], + "summary": "Get Alarm (getAlarmById)", + "description": "Fetch the Alarm object based on the provided Alarm Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmById", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -8878,7 +9083,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmSeverity" + "$ref": "#/components/schemas/Alarm" } } } @@ -9012,16 +9217,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/info/{alarmId}": { - "get": { + }, + "delete": { "tags": [ "alarm-controller" ], - "summary": "Get Alarm Info (getAlarmInfoById)", - "description": "Fetch the Alarm Info object based on the provided Alarm Id. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmInfoById", + "summary": "Delete Alarm (deleteAlarm)", + "description": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteAlarm", "parameters": [ { "name": "alarmId", @@ -9039,7 +9242,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmInfo" + "type": "boolean" } } } @@ -9175,56 +9378,23 @@ ] } }, - "/api/alarm/types": { - "get": { + "/api/alarm/{alarmId}/ack": { + "post": { "tags": [ "alarm-controller" ], - "summary": "Get Alarm Types (getAlarmTypes)", - "description": "Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request.", - "operationId": "getAlarmTypes", + "summary": "Acknowledge Alarm (ackAlarm)", + "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "ackAlarm", "parameters": [ { - "name": "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": "alarmId", + "in": "path", + "description": "A string value representing the alarm 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 of next alarm fields: type, severity or status", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -9233,7 +9403,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntitySubtype" + "$ref": "#/components/schemas/AlarmInfo" } } } @@ -9249,7 +9419,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -9369,14 +9539,14 @@ ] } }, - "/api/alarm/{alarmId}": { - "get": { + "/api/alarm/{alarmId}/assign": { + "delete": { "tags": [ "alarm-controller" ], - "summary": "Get Alarm (getAlarmById)", - "description": "Fetch the Alarm object based on the provided Alarm Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmById", + "summary": "Unassign Alarm (unassignAlarm)", + "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "unassignAlarm", "parameters": [ { "name": "alarmId", @@ -9528,14 +9698,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/alarm/{alarmId}/assign/{assigneeId}": { + "post": { "tags": [ "alarm-controller" ], - "summary": "Delete Alarm (deleteAlarm)", - "description": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteAlarm", + "summary": "Assign/Reassign Alarm (assignAlarm)", + "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "assignAlarm", "parameters": [ { "name": "alarmId", @@ -9545,6 +9717,15 @@ "schema": { "type": "string" } + }, + { + "name": "assigneeId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -9553,7 +9734,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/Alarm" } } } @@ -9569,7 +9750,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -9689,14 +9870,14 @@ ] } }, - "/api/alarm/{alarmId}/ack": { + "/api/alarm/{alarmId}/clear": { "post": { "tags": [ "alarm-controller" ], - "summary": "Acknowledge Alarm (ackAlarm)", - "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "ackAlarm", + "summary": "Clear Alarm (clearAlarm)", + "description": "Clear the Alarm. Once cleared, the 'clear_ts' field will be set to current timestamp and special rule chain event 'ALARM_CLEAR' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "clearAlarm", "parameters": [ { "name": "alarmId", @@ -9850,192 +10031,161 @@ ] } }, - "/api/alarm/{alarmId}/assign": { - "delete": { + "/api/alarm/{entityType}/{entityId}": { + "get": { "tags": [ "alarm-controller" ], - "summary": "Unassign Alarm (unassignAlarm)", - "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "unassignAlarm", + "summary": "Get Alarms (getAlarmsByEntity)", + "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmsByEntity", "parameters": [ { - "name": "alarmId", + "name": "entityType", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Alarm" - } - } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "searchStatus", + "in": "query", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ] } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } - } - }, - "security": [ + }, { - "HttpLoginForm": [] + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", + "required": false, + "schema": { + "type": "string" + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/alarm/{alarmId}/assign/{assigneeId}": { - "post": { - "tags": [ - "alarm-controller" - ], - "summary": "Assign/Reassign Alarm (assignAlarm)", - "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "assignAlarm", - "parameters": [ + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } }, { - "name": "assigneeId", - "in": "path", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "fetchOriginator", + "in": "query", + "description": "A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null.", + "required": false, + "schema": { + "type": "boolean" } } ], @@ -10045,7 +10195,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/PageDataAlarmInfo" } } } @@ -10061,7 +10211,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -10181,194 +10331,15 @@ ] } }, - "/api/alarm/{alarmId}/clear": { - "post": { - "tags": [ - "alarm-controller" - ], - "summary": "Clear Alarm (clearAlarm)", - "description": "Clear the Alarm. Once cleared, the 'clear_ts' field will be set to current timestamp and special rule chain event 'ALARM_CLEAR' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "clearAlarm", - "parameters": [ - { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmInfo" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/alarm/{entityType}/{entityId}": { + "/api/alarms": { "get": { "tags": [ "alarm-controller" ], - "summary": "Get Alarms (getAlarmsByEntity)", - "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmsByEntity", + "summary": "Get All Alarms (getAllAlarms)", + "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllAlarms", "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": "searchStatus", "in": "query", @@ -10642,44 +10613,81 @@ ] } }, - "/api/alarms": { + "/api/v2/alarm/{entityType}/{entityId}": { "get": { "tags": [ "alarm-controller" ], - "summary": "Get All Alarms (getAllAlarms)", - "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllAlarms", + "summary": "Get Alarms (getAlarmsV2)", + "description": "Returns a page of alarms for the selected entity. You can specify parameters to filter the 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": "getAlarmsV2", "parameters": [ { - "name": "searchStatus", + "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": "statusList", "in": "query", - "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value", "required": false, "schema": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } } }, { - "name": "status", + "name": "severityList", "in": "query", - "description": "A string value representing one of the AlarmStatus enumeration value", + "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value", "required": false, "schema": { - "type": "string", - "enum": [ - "ACTIVE_UNACK", - "ACTIVE_ACK", - "CLEARED_UNACK", - "CLEARED_ACK" - ] + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + } + } + }, + { + "name": "typeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing alarm types", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } } }, { @@ -10771,15 +10779,6 @@ "type": "integer", "format": "int64" } - }, - { - "name": "fetchOriginator", - "in": "query", - "description": "A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null.", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -10924,33 +10923,15 @@ ] } }, - "/api/v2/alarm/{entityType}/{entityId}": { + "/api/v2/alarms": { "get": { "tags": [ "alarm-controller" ], - "summary": "Get Alarms (getAlarmsV2)", - "description": "Returns a page of alarms for the selected entity. You can specify parameters to filter the 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": "getAlarmsV2", + "summary": "Get All Alarms (getAllAlarmsV2)", + "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAllAlarmsV2", "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": "statusList", "in": "query", @@ -11234,163 +11215,32 @@ ] } }, - "/api/v2/alarms": { - "get": { + "/api/alarm/rule": { + "post": { "tags": [ - "alarm-controller" + "alarm-rule-controller" ], - "summary": "Get All Alarms (getAllAlarmsV2)", - "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAllAlarmsV2", - "parameters": [ - { - "name": "statusList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] - } - } - }, - { - "name": "severityList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "INDETERMINATE" - ] - } - } - }, - { - "name": "typeList", - "in": "query", - "description": "A list of string values separated by comma ',' representing alarm types", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Create Or Update Alarm Rule (saveAlarmRule)", + "description": "Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAlarmRule", + "requestBody": { + "description": "A JSON value representing the alarm rule.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmRuleDefinition" } } }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "startTs", - "endTs", - "type", - "ackTs", - "clearTs", - "severity", - "status" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmInfo" + "$ref": "#/components/schemas/AlarmRuleDefinition" } } } @@ -11406,7 +11256,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -11526,19 +11376,20 @@ ] } }, - "/api/apiKey": { + "/api/alarm/rule/testScript": { "post": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", - "operationId": "saveApiKey", + "summary": "Test alarm rule TBEL expression (testAlarmRuleScript)", + "description": "Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: \n\n```json\n{\n \"expression\": \"return temperature > 50;\",\n \"arguments\": {\n \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testAlarmRuleScript", "requestBody": { + "description": "Test alarm rule TBEL condition expression. The expression must return a boolean value.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/JsonNode" } } }, @@ -11550,7 +11401,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/JsonNode" } } } @@ -11686,28 +11537,34 @@ ] } }, - "/api/apiKey/{id}": { - "delete": { + "/api/alarm/rule/{alarmRuleId}": { + "get": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Delete API key by ID (deleteApiKey)", - "description": "Deletes the API key. Referencing non-existing ApiKey Id will cause an error.\n\nAvailable for any authorized user. ", - "operationId": "deleteApiKey", + "summary": "Get Alarm Rule (getAlarmRuleById)", + "description": "Fetch the Alarm Rule object based on the provided Alarm Rule Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRuleById", "parameters": [ { - "name": "id", + "name": "alarmRuleId", "in": "path", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmRuleDefinition" + } + } + } }, "400": { "description": "Bad Request", @@ -11838,48 +11695,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/apiKey/{id}/description": { - "put": { + }, + "delete": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Update API key Description", - "description": "Updates the description of the existing API key by apiKeyId. Only the description can be updated. Referencing a non-existing ApiKey Id will cause a 'Not Found' error.\n\nAvailable for any authorized user. ", - "operationId": "updateApiKeyDescription", + "summary": "Delete Alarm Rule (deleteAlarmRule)", + "description": "Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAlarmRule", "parameters": [ { - "name": "id", + "name": "alarmRuleId", "in": "path", - "description": "A string value representing the api key id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the API key" - } - } - } - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -12012,32 +11848,21 @@ ] } }, - "/api/apiKey/{id}/enabled/{enabledValue}": { - "put": { + "/api/alarm/rule/{alarmRuleId}/debug": { + "get": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Enable or disable API key (enableApiKey)", - "description": "Updates api key with enabled = true/false. \n\nAvailable for any authorized user. ", - "operationId": "enableApiKey", + "summary": "Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent)", + "description": "Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestAlarmRuleDebugEvent", "parameters": [ { - "name": "id", - "in": "path", - "description": "Unique identifier of the API key to enable/disable", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "enabledValue", + "name": "alarmRuleId", "in": "path", - "description": "Enabled or disabled api key", "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -12047,7 +11872,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -12183,24 +12008,15 @@ ] } }, - "/api/apiKeys/{userId}": { + "/api/alarm/rules": { "get": { "tags": [ - "api-key-controller" + "alarm-rule-controller" ], - "summary": "Get User Api Keys (getUserApiKeys)", - "description": "Returns a page of api keys owned by user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. ", - "operationId": "getUserApiKeys", + "summary": "Get alarm rules (getAlarmRules)", + "description": "Fetch tenant alarm rules based on the filter.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRules", "parameters": [ - { - "name": "userId", - "in": "path", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -12221,10 +12037,33 @@ "format": "int32" } }, + { + "name": "entityType", + "in": "query", + "description": "Entity type filter. If not specified, alarm rules for all supported entity types will be returned.", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "entities", + "in": "query", + "description": "Entities filter. If not specified, alarm rules for entity type filter will be returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the description.", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { "type": "string" @@ -12239,9 +12078,7 @@ "type": "string", "enum": [ "createdTime", - "expirationTime", - "description", - "enabled" + "name" ] } }, @@ -12265,7 +12102,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataApiKeyInfo" + "$ref": "#/components/schemas/PageDataAlarmRuleDefinitionInfo" } } } @@ -12401,85 +12238,65 @@ ] } }, - "/api/asset": { - "post": { + "/api/alarm/rules/names": { + "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Create Or Update Asset (saveAsset)", - "description": "Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. \n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveAsset", + "summary": "Get alarm rule names (getAlarmRuleNames)", + "description": "Fetch the list of alarm rule names.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRuleNames", "parameters": [ { - "name": "entityGroupId", + "name": "pageSize", "in": "query", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", - "required": false, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "entityGroupIds", + "name": "page", "in": "query", - "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", - "required": false, + "description": "Sequence number of page starting from 0", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int32" } }, { - "name": "nameConflictPolicy", + "name": "textSearch", "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string" } }, { - "name": "uniquifySeparator", + "name": "sortOrder", "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "description": "A JSON value representing the asset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Asset" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Asset" + "$ref": "#/components/schemas/PageDataString" } } } @@ -12495,7 +12312,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -12615,31 +12432,96 @@ ] } }, - "/api/asset/bulk_import": { - "post": { + "/api/alarm/rules/{entityType}/{entityId}": { + "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Import the bulk of assets (processAssetsBulkImport)", - "description": "There's an ability to import the bulk of assets using the only .csv file.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processAssetBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get Alarm Rules by Entity Id (getAlarmRulesByEntityId)", + "description": "Fetch the Alarm Rules based on the provided Entity Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRulesByEntityId", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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": "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 calculated field 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" + ] + } + }, + { + "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/BulkImportResultAsset" + "$ref": "#/components/schemas/PageDataAlarmRuleDefinition" } } } @@ -12655,7 +12537,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -12775,32 +12657,31 @@ ] } }, - "/api/asset/info/{assetId}": { - "get": { + "/api/apiKey": { + "post": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Asset Info (getAssetInfoById)", - "description": "Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetInfoById", - "parameters": [ - { - "name": "assetId", - "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Save API key for user (saveApiKey)", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", + "operationId": "saveApiKey", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyInfo" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetInfo" + "$ref": "#/components/schemas/ApiKey" } } } @@ -12816,7 +12697,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -12936,27 +12817,28 @@ ] } }, - "/api/asset/types": { - "get": { + "/api/apiKey/{id}": { + "delete": { "tags": [ - "asset-controller" + "api-key-controller" + ], + "summary": "Delete API key by ID (deleteApiKey)", + "description": "Deletes the API key. Referencing non-existing ApiKey Id will cause an error.\n\nAvailable for any authorized user. ", + "operationId": "deleteApiKey", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Get Asset Types (getAssetTypes)", - "description": "Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetTypes", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -13079,7 +12961,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -13090,32 +12971,43 @@ ] } }, - "/api/asset/{assetId}": { - "get": { + "/api/apiKey/{id}/description": { + "put": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Asset (getAssetById)", - "description": "Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetById", + "summary": "Update API key Description", + "description": "Updates the description of the existing API key by apiKeyId. Only the description can be updated. Referencing a non-existing ApiKey Id will cause a 'Not Found' error.\n\nAvailable for any authorized user. ", + "operationId": "updateApiKeyDescription", "parameters": [ { - "name": "assetId", + "name": "id", "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the api key id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New description for the API key" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Asset" + "$ref": "#/components/schemas/ApiKeyInfo" } } } @@ -13249,28 +13141,47 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/apiKey/{id}/enabled/{enabledValue}": { + "put": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Delete asset (deleteAsset)", - "description": "Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteAsset", + "summary": "Enable or disable API key (enableApiKey)", + "description": "Updates api key with enabled = true/false. \n\nAvailable for any authorized user. ", + "operationId": "enableApiKey", "parameters": [ { - "name": "assetId", + "name": "id", "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Unique identifier of the API key to enable/disable", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled api key", + "required": true, + "schema": { + "type": "boolean" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -13403,15 +13314,24 @@ ] } }, - "/api/assetInfos/all": { + "/api/apiKeys/{userId}": { "get": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get All Asset Infos for current user (getAllAssetInfos)", - "description": "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. \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": "getAllAssetInfos", + "summary": "Get User Api Keys (getUserApiKeys)", + "description": "Returns a page of api keys owned by user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. ", + "operationId": "getUserApiKeys", "parameters": [ + { + "name": "userId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -13432,28 +13352,10 @@ "format": "int32" } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", + "description": "The case insensitive 'substring' filter based on the description.", "required": false, "schema": { "type": "string" @@ -13468,10 +13370,9 @@ "type": "string", "enum": [ "createdTime", - "name", - "type", - "label", - "customerTitle" + "expirationTime", + "description", + "enabled" ] } }, @@ -13495,7 +13396,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetInfo" + "$ref": "#/components/schemas/PageDataApiKeyInfo" } } } @@ -13631,38 +13532,85 @@ ] } }, - "/api/assets": { - "get": { + "/api/asset": { + "post": { "tags": [ "asset-controller" ], - "summary": "Get Assets By Ids (getAssetsByIds)", - "description": "Requested assets must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetsByIds", + "summary": "Create Or Update Asset (saveAsset)", + "description": "Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. \n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveAsset", "parameters": [ { - "name": "assetIds", + "name": "entityGroupId", "in": "query", - "description": "A list of asset ids, separated by comma ','", - "required": true, + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", + "required": false, "schema": { "type": "array", "items": { "type": "string" } } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } } ], + "requestBody": { + "description": "A JSON value representing the asset.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Asset" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } + "$ref": "#/components/schemas/Asset" } } } @@ -13678,7 +13626,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -13796,19 +13744,21 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/asset/bulk_import": { "post": { "tags": [ "asset-controller" ], - "summary": "Find related assets (findAssetsByQuery)", - "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAssetsByQuery", + "summary": "Import the bulk of assets (processAssetsBulkImport)", + "description": "There's an ability to import the bulk of assets using the only .csv file.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processAssetBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetSearchQuery" + "$ref": "#/components/schemas/BulkImportRequest" } } }, @@ -13820,10 +13770,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } + "$ref": "#/components/schemas/BulkImportResultAsset" } } } @@ -13959,99 +13906,23 @@ ] } }, - "/api/customer/{customerId}/assetInfos": { + "/api/asset/info/{assetId}": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Customer Asset Infos (getCustomerAssetInfos)", - "description": "Returns a page of asset info objects owned by the specified customer. 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. \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": "getCustomerAssetInfos", + "summary": "Get Asset Info (getAssetInfoById)", + "description": "Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetInfoById", "parameters": [ { - "name": "customerId", + "name": "assetId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -14060,7 +13931,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetInfo" + "$ref": "#/components/schemas/AssetInfo" } } } @@ -14196,99 +14067,24 @@ ] } }, - "/api/customer/{customerId}/assets": { + "/api/asset/types": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Customer Assets (getCustomerAssets)", - "description": "Returns a page of assets objects owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerAssets", - "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Asset Types (getAssetTypes)", + "description": "Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -14414,6 +14210,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -14424,81 +14221,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/assets": { + "/api/asset/{assetId}": { "get": { "tags": [ "asset-controller" ], - "summary": "Get assets by Entity Group Id (getAssetsByEntityGroupId)", - "description": "Returns a page of asset objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAssetsByEntityGroupId", + "summary": "Get Asset (getAssetById)", + "description": "Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetById", "parameters": [ { - "name": "entityGroupId", + "name": "assetId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -14507,7 +14246,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/Asset" } } } @@ -14641,21 +14380,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/asset": { - "get": { + }, + "delete": { "tags": [ "asset-controller" ], - "summary": "Get Tenant Asset (getTenantAssetByName)", - "description": "Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantAssetByName", + "summary": "Delete asset (deleteAsset)", + "description": "Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteAsset", "parameters": [ { - "name": "assetName", - "in": "query", - "description": "A string value representing the Asset name.", + "name": "assetId", + "in": "path", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -14664,14 +14401,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Asset" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -14804,14 +14534,14 @@ ] } }, - "/api/tenant/assets": { + "/api/assetInfos/all": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Tenant Assets (getTenantAssets)", - "description": "Returns a page of assets 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": "getTenantAssets", + "summary": "Get All Asset Infos for current user (getAllAssetInfos)", + "description": "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. \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": "getAllAssetInfos", "parameters": [ { "name": "pageSize", @@ -14834,9 +14564,18 @@ } }, { - "name": "type", + "name": "includeCustomers", "in": "query", - "description": "Asset type", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" @@ -14887,7 +14626,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/PageDataAssetInfo" } } } @@ -15023,89 +14762,25 @@ ] } }, - "/api/user/assets": { + "/api/assets": { "get": { "tags": [ "asset-controller" ], - "summary": "Get Assets (getUserAssets)", - "description": "Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Info is an extension of the default Asset object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserAssets", + "summary": "Get Assets By Ids (getAssetsByIds)", + "description": "Requested assets must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetsByIds", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "assetIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of asset ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -15115,7 +14790,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } } } } @@ -15249,21 +14927,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/assetProfile": { + }, "post": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Create Or Update Asset Profile (saveAssetProfile)", - "description": "Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. \n\nAsset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveAssetProfile", + "summary": "Find related assets (findAssetsByQuery)", + "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAssetsByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/AssetSearchQuery" } } }, @@ -15275,7 +14951,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } } } } @@ -15411,23 +15090,98 @@ ] } }, - "/api/assetProfile/names": { + "/api/customer/{customerId}/assetInfos": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile names (getAssetProfileNames)", - "description": "Returns a set of unique asset profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileNames", + "summary": "Get Customer Asset Infos (getCustomerAssetInfos)", + "description": "Returns a page of asset info objects owned by the specified customer. 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. \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": "getCustomerAssetInfos", "parameters": [ { - "name": "activeOnly", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "boolean" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -15437,10 +15191,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/PageDataAssetInfo" } } } @@ -15576,31 +15327,89 @@ ] } }, - "/api/assetProfile/{assetProfileId}": { + "/api/customer/{customerId}/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile (getAssetProfileById)", - "description": "Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAssetProfileById", + "summary": "Get Customer Assets (getCustomerAssets)", + "description": "Returns a page of assets objects owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerAssets", "parameters": [ { - "name": "assetProfileId", + "name": "customerId", "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "inlineImages", + "name": "pageSize", "in": "query", - "description": "Inline images as a data URL (Base64)", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Asset type", "required": false, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -15610,7 +15419,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -15744,28 +15553,95 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entityGroup/{entityGroupId}/assets": { + "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Delete asset profile (deleteAssetProfile)", - "description": "Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteAssetProfile", + "summary": "Get assets by Entity Group Id (getAssetsByEntityGroupId)", + "description": "Returns a page of asset objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAssetsByEntityGroupId", "parameters": [ { - "name": "assetProfileId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAsset" + } + } + } }, "400": { "description": "Bad Request", @@ -15898,19 +15774,19 @@ ] } }, - "/api/assetProfile/{assetProfileId}/default": { - "post": { + "/api/tenant/asset": { + "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Make Asset Profile Default (setDefaultAssetProfile)", - "description": "Marks asset profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultAssetProfile", + "summary": "Get Tenant Asset (getTenantAssetByName)", + "description": "Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantAssetByName", "parameters": [ { - "name": "assetProfileId", - "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "assetName", + "in": "query", + "description": "A string value representing the Asset name.", "required": true, "schema": { "type": "string" @@ -15923,7 +15799,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/Asset" } } } @@ -15939,7 +15815,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -16059,21 +15935,90 @@ ] } }, - "/api/assetProfileInfo/default": { + "/api/tenant/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" + ], + "summary": "Get Tenant Assets (getTenantAssets)", + "description": "Returns a page of assets 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": "getTenantAssets", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Asset type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Default Asset Profile (getDefaultAssetProfileInfo)", - "description": "Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultAssetProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfileInfo" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -16209,23 +16154,90 @@ ] } }, - "/api/assetProfileInfo/{assetProfileId}": { + "/api/user/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile Info (getAssetProfileInfoById)", - "description": "Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileInfoById", + "summary": "Get Assets (getUserAssets)", + "description": "Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Info is an extension of the default Asset object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserAssets", "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Asset type", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "assetProfileId", - "in": "path", + "in": "query", "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "required": false, "schema": { "type": "string" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -16234,7 +16246,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfileInfo" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -16370,80 +16382,31 @@ ] } }, - "/api/assetProfileInfos": { - "get": { + "/api/assetProfile": { + "post": { "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profile infos (getAssetProfileInfos)", - "description": "Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileInfos", - "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 asset profile name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "description", - "isDefault" - ] + "summary": "Create Or Update Asset Profile (saveAssetProfile)", + "description": "Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. \n\nAsset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAssetProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } } }, - { - "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/PageDataAssetProfileInfo" + "$ref": "#/components/schemas/AssetProfile" } } } @@ -16459,7 +16422,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -16579,25 +16542,23 @@ ] } }, - "/api/assetProfileInfos/list": { + "/api/assetProfile/names": { "get": { "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", - "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetProfilesByIds", + "summary": "Get Asset Profile names (getAssetProfileNames)", + "description": "Returns a set of unique asset profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileNames", "parameters": [ { - "name": "assetProfileIds", + "name": "activeOnly", "in": "query", - "description": "A list of asset profile ids, separated by comma ','", - "required": true, + "description": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "boolean", + "default": false } } ], @@ -16609,7 +16570,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/AssetProfileInfo" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -16746,70 +16707,31 @@ ] } }, - "/api/assetProfiles": { + "/api/assetProfile/{assetProfileId}": { "get": { "tags": [ "asset-profile-controller" ], - "summary": "Get Asset Profiles (getAssetProfiles)", - "description": "Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAssetProfiles", + "summary": "Get Asset Profile (getAssetProfileById)", + "description": "Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAssetProfileById", "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": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset profile name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", + "name": "inlineImages", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Inline images as a data URL (Base64)", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "boolean" } } ], @@ -16819,7 +16741,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetProfile" + "$ref": "#/components/schemas/AssetProfile" } } } @@ -16953,101 +16875,20 @@ "ApiKeyForm": [] } ] - } - }, - "/api/audit/logs": { - "get": { + }, + "delete": { "tags": [ - "audit-log-controller" + "asset-profile-controller" ], - "summary": "Get all audit logs (getAuditLogs)", - "description": "Returns a page of audit logs related to all entities in the scope of the current user's 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 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", - "operationId": "getAuditLogs", + "summary": "Delete asset profile (deleteAssetProfile)", + "description": "Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAssetProfile", "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": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, "schema": { "type": "string" } @@ -17055,14 +16896,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -17195,108 +17029,20 @@ ] } }, - "/api/audit/logs/customer/{customerId}": { - "get": { + "/api/assetProfile/{assetProfileId}/default": { + "post": { "tags": [ - "audit-log-controller" + "asset-profile-controller" ], - "summary": "Get audit logs by customer id (getAuditLogsByCustomerId)", - "description": "Returns a page of audit logs related to the targeted customer entities (devices, assets, etc.), and users actions (login, logout, etc.) that belong to this customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", - "operationId": "getAuditLogsByCustomerId", + "summary": "Make Asset Profile Default (setDefaultAssetProfile)", + "description": "Marks asset profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultAssetProfile", "parameters": [ { - "name": "customerId", + "name": "assetProfileId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, "schema": { "type": "string" } @@ -17308,7 +17054,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/AssetProfile" } } } @@ -17324,7 +17070,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -17444,129 +17190,21 @@ ] } }, - "/api/audit/logs/entity/{entityType}/{entityId}": { + "/api/assetProfileInfo/default": { "get": { "tags": [ - "audit-log-controller" - ], - "summary": "Get audit logs by entity id (getAuditLogsByEntityId)", - "description": "Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", - "operationId": "getAuditLogsByEntityId", - "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": "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 one of the next properties: entityType, entityName, userName, actionType, actionStatus.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, - "schema": { - "type": "string" - } - } + "asset-profile-controller" ], + "summary": "Get Default Asset Profile (getDefaultAssetProfileInfo)", + "description": "Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultAssetProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/AssetProfileInfo" } } } @@ -17702,108 +17340,20 @@ ] } }, - "/api/audit/logs/user/{userId}": { + "/api/assetProfileInfo/{assetProfileId}": { "get": { "tags": [ - "audit-log-controller" + "asset-profile-controller" ], - "summary": "Get audit logs by user id (getAuditLogsByUserId)", - "description": "Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", - "operationId": "getAuditLogsByUserId", + "summary": "Get Asset Profile Info (getAssetProfileInfoById)", + "description": "Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileInfoById", "parameters": [ { - "name": "userId", + "name": "assetProfileId", "in": "path", - "description": "A string value representing the user 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 asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, "schema": { "type": "string" } @@ -17815,7 +17365,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/AssetProfileInfo" } } } @@ -17951,31 +17501,80 @@ ] } }, - "/api/auth/changePassword": { - "post": { + "/api/assetProfileInfos": { + "get": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Change password for current User (changePassword)", - "description": "Change the password for the User which credentials are used to perform this REST API call. Be aware that previously generated [JWT](https://jwt.io/) tokens will be still valid until they expire.", - "operationId": "changePassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangePasswordRequest" - } + "summary": "Get Asset Profile infos (getAssetProfileInfos)", + "description": "Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileInfos", + "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 asset profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "description", + "isDefault" + ] + } + }, + { + "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/JwtPair" + "$ref": "#/components/schemas/PageDataAssetProfileInfo" } } } @@ -17991,7 +17590,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -18111,17 +17710,41 @@ ] } }, - "/api/auth/logout": { - "post": { + "/api/assetProfileInfos/list": { + "get": { "tags": [ - "auth-controller" + "asset-profile-controller" + ], + "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", + "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetProfilesByIds", + "parameters": [ + { + "name": "assetProfileIds", + "in": "query", + "description": "A list of asset profile ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } ], - "summary": "Logout (logout)", - "description": "Special API call to record the 'logout' of the user to the Audit Logs. Since platform uses [JWT](https://jwt.io/), the actual logout is the procedure of clearing the [JWT](https://jwt.io/) token on the client side. ", - "operationId": "logout", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetProfileInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -18134,7 +17757,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -18254,21 +17877,80 @@ ] } }, - "/api/auth/user": { + "/api/assetProfiles": { "get": { "tags": [ - "auth-controller" + "asset-profile-controller" + ], + "summary": "Get Asset Profiles (getAssetProfiles)", + "description": "Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAssetProfiles", + "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 asset profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get current User (getUser)", - "description": "Get the information about the User which credentials are used to perform this REST API call.", - "operationId": "getUser", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/PageDataAssetProfile" } } } @@ -18404,20 +18086,99 @@ ] } }, - "/api/noauth/activate": { + "/api/audit/logs": { "get": { "tags": [ - "auth-controller" + "audit-log-controller" ], - "summary": "Check Activate User Token (checkActivateToken)", - "description": "Checks the activation token and forwards user to 'Create Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Create Password' page and same 'activateToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", - "operationId": "checkActivateToken", + "summary": "Get all audit logs (getAuditLogs)", + "description": "Returns a page of audit logs related to all entities in the scope of the current user's 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 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", + "operationId": "getAuditLogs", "parameters": [ { - "name": "activateToken", + "name": "pageSize", "in": "query", - "description": "The activate token string.", + "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 one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, "schema": { "type": "string" } @@ -18429,7 +18190,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/PageDataAuditLog" } } } @@ -18554,43 +18315,389 @@ } } } - } - }, - "post": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/audit/logs/customer/{customerId}": { + "get": { "tags": [ - "auth-controller" + "audit-log-controller" ], - "summary": "Activate User", - "description": "Checks the activation token and updates corresponding user password in the database. Now the user may start using his password to login. The response already contains the [JWT](https://jwt.io) activation and refresh tokens, to simplify the user activation flow and avoid asking user to input password again after activation. If token is valid, returns the object that contains [JWT](https://jwt.io/) access and refresh tokens. If token is not valid, returns '400 Bad Request'.", - "operationId": "activateUser", + "summary": "Get audit logs by customer id (getAuditLogsByCustomerId)", + "description": "Returns a page of audit logs related to the targeted customer entities (devices, assets, etc.), and users actions (login, logout, etc.) that belong to this customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", + "operationId": "getAuditLogsByCustomerId", "parameters": [ { - "name": "sendActivationMail", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", "in": "query", + "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, + "schema": { + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivateUserRequest" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAuditLog" + } } } }, - "required": true + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/audit/logs/entity/{entityType}/{entityId}": { + "get": { + "tags": [ + "audit-log-controller" + ], + "summary": "Get audit logs by entity id (getAuditLogsByEntityId)", + "description": "Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", + "operationId": "getAuditLogsByEntityId", + "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": "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 one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/PageDataAuditLog" } } } @@ -18606,7 +18713,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -18715,23 +18822,119 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/resetPassword": { + "/api/audit/logs/user/{userId}": { "get": { "tags": [ - "auth-controller" + "audit-log-controller" ], - "summary": "Check password reset token (checkResetToken)", - "description": "Checks the password reset token and forwards user to 'Reset Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Reset Password' page and same 'resetToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", - "operationId": "checkResetToken", + "summary": "Get audit logs by user id (getAuditLogsByUserId)", + "description": "Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", + "operationId": "getAuditLogsByUserId", "parameters": [ { - "name": "resetToken", + "name": "userId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "The reset token string.", + "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 one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, "schema": { "type": "string" } @@ -18743,7 +18946,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/PageDataAuditLog" } } } @@ -18868,20 +19071,30 @@ } } } - } - }, + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/auth/changePassword": { "post": { "tags": [ "auth-controller" ], - "summary": "Reset password (resetPassword)", - "description": "Checks the password reset token and updates the password. If token is not valid, returns '400 Bad Request'.", - "operationId": "resetPassword", + "summary": "Change password for current User (changePassword)", + "description": "Change the password for the User which credentials are used to perform this REST API call. Be aware that previously generated [JWT](https://jwt.io/) tokens will be still valid until they expire.", + "operationId": "changePassword", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ResetPasswordRequest" + "$ref": "#/components/schemas/ChangePasswordRequest" } } }, @@ -18889,7 +19102,14 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -19011,30 +19231,178 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/resetPasswordByEmail": { + "/api/auth/logout": { "post": { "tags": [ "auth-controller" ], - "summary": "Request reset password email (requestResetPasswordByEmail)", - "description": "Request to send the reset password email if the user with specified email address is present in the database. Always return '200 OK' status for security purposes.", - "operationId": "requestResetPasswordByEmail", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPasswordEmailRequest" + "summary": "Logout (logout)", + "description": "Special API call to record the 'logout' of the user to the Audit Logs. Since platform uses [JWT](https://jwt.io/), the actual logout is the procedure of clearing the [JWT](https://jwt.io/) token on the client side. ", + "operationId": "logout", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } } } }, - "required": true + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/auth/user": { + "get": { + "tags": [ + "auth-controller" + ], + "summary": "Get current User (getUser)", + "description": "Get the information about the User which credentials are used to perform this REST API call.", + "operationId": "getUser", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } }, "400": { "description": "Bad Request", @@ -19047,7 +19415,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -19156,24 +19524,43 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/userPasswordPolicy": { + "/api/noauth/activate": { "get": { "tags": [ "auth-controller" ], - "summary": "Get the current User password policy (getUserPasswordPolicy)", - "description": "API call to get the password policy for the password validation form(s).", - "operationId": "getUserPasswordPolicy", + "summary": "Check Activate User Token (checkActivateToken)", + "description": "Checks the activation token and forwards user to 'Create Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Create Password' page and same 'activateToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", + "operationId": "checkActivateToken", + "parameters": [ + { + "name": "activateToken", + "in": "query", + "description": "The activate token string.", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserPasswordPolicy" + "type": "object" } } } @@ -19299,20 +19686,30 @@ } } } - } - }, - "/api/billingEndpoint/sendAccountActivated": { + }, "post": { "tags": [ - "billing-endpoint-controller" + "auth-controller" + ], + "summary": "Activate User", + "description": "Checks the activation token and updates corresponding user password in the database. Now the user may start using his password to login. The response already contains the [JWT](https://jwt.io) activation and refresh tokens, to simplify the user activation flow and avoid asking user to input password again after activation. If token is valid, returns the object that contains [JWT](https://jwt.io/) access and refresh tokens. If token is not valid, returns '400 Bad Request'.", + "operationId": "activateUser", + "parameters": [ + { + "name": "sendActivationMail", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } ], - "summary": "sendAccountActivatedEmail", - "operationId": "sendAccountActivatedEmail", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/ActivateUserRequest" } } }, @@ -19320,7 +19717,14 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -19442,37 +19846,38 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/billingEndpoint/sendActivation": { - "post": { + "/api/noauth/resetPassword": { + "get": { "tags": [ - "billing-endpoint-controller" + "auth-controller" ], - "summary": "sendBillingActivationEmail", - "operationId": "sendBillingActivationEmail", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Check password reset token (checkResetToken)", + "description": "Checks the password reset token and forwards user to 'Reset Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Reset Password' page and same 'resetToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", + "operationId": "checkResetToken", + "parameters": [ + { + "name": "resetToken", + "in": "query", + "description": "The reset token string.", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } }, "400": { "description": "Bad Request", @@ -19485,7 +19890,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -19594,29 +19999,20 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/billingEndpoint/sendPasswordWasReset": { + } + }, "post": { "tags": [ - "billing-endpoint-controller" + "auth-controller" ], - "summary": "sendPasswordWasResetEmail", - "operationId": "sendPasswordWasResetEmail", + "summary": "Reset password (resetPassword)", + "description": "Checks the password reset token and updates the password. If token is not valid, returns '400 Bad Request'.", + "operationId": "resetPassword", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/ResetPasswordRequest" } } }, @@ -19746,29 +20142,22 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/billingEndpoint/sendResetPassword": { + "/api/noauth/resetPasswordByEmail": { "post": { "tags": [ - "billing-endpoint-controller" + "auth-controller" ], - "summary": "sendResetPasswordEmail", - "operationId": "sendResetPasswordEmail", + "summary": "Request reset password email (requestResetPasswordByEmail)", + "description": "Request to send the reset password email if the user with specified email address is present in the database. Always return '200 OK' status for security purposes.", + "operationId": "requestResetPasswordByEmail", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/ResetPasswordEmailRequest" } } }, @@ -19898,31 +20287,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/billingEndpoint/tenant/permission/billing/hiddenPlans": { + "/api/noauth/userPasswordPolicy": { "get": { "tags": [ - "billing-endpoint-controller" + "auth-controller" ], - "summary": "tenantHasHiddenPlansAccess", - "operationId": "tenantHasHiddenPlansAccess", + "summary": "Get the current User password policy (getUserPasswordPolicy)", + "description": "API call to get the password policy for the password validation form(s).", + "operationId": "getUserPasswordPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/UserPasswordPolicy" } } } @@ -20047,6 +20429,150 @@ } } } + } + } + }, + "/api/billingEndpoint/sendAccountActivated": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "sendAccountActivatedEmail", + "operationId": "sendAccountActivatedEmail", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } }, "security": [ { @@ -20058,24 +20584,27 @@ ] } }, - "/api/billingEndpoint/tenant/permission/billing/read": { - "get": { + "/api/billingEndpoint/sendActivation": { + "post": { "tags": [ "billing-endpoint-controller" ], - "summary": "tenantHasBillingRead", - "operationId": "tenantHasBillingRead", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } + "summary": "sendBillingActivationEmail", + "operationId": "sendBillingActivationEmail", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -20087,7 +20616,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -20207,24 +20736,27 @@ ] } }, - "/api/billingEndpoint/tenant/permission/billing/write": { - "get": { + "/api/billingEndpoint/sendPasswordWasReset": { + "post": { "tags": [ "billing-endpoint-controller" ], - "summary": "tenantHasBillingWrite", - "operationId": "tenantHasBillingWrite", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } + "summary": "sendPasswordWasResetEmail", + "operationId": "sendPasswordWasResetEmail", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -20236,7 +20768,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -20356,13 +20888,13 @@ ] } }, - "/api/billingEndpoint/tenantCanUpdatePlan": { + "/api/billingEndpoint/sendResetPassword": { "post": { "tags": [ "billing-endpoint-controller" ], - "summary": "checkTenantCanUpdatePlan", - "operationId": "checkTenantCanUpdatePlan", + "summary": "sendResetPasswordEmail", + "operationId": "sendResetPasswordEmail", "requestBody": { "content": { "application/json": { @@ -20508,26 +21040,23 @@ ] } }, - "/api/billingEndpoint/tenantPlanChanged": { - "post": { + "/api/billingEndpoint/tenant/permission/billing/hiddenPlans": { + "get": { "tags": [ "billing-endpoint-controller" ], - "summary": "notifyTenantPlanChanged", - "operationId": "notifyTenantPlanChanged", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "tenantHasHiddenPlansAccess", + "operationId": "tenantHasHiddenPlansAccess", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } }, "400": { "description": "Bad Request", @@ -20540,7 +21069,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -20660,26 +21189,23 @@ ] } }, - "/api/billingEndpoint/tenantStateChanged": { - "post": { + "/api/billingEndpoint/tenant/permission/billing/read": { + "get": { "tags": [ "billing-endpoint-controller" ], - "summary": "notifyTenantStateChanged", - "operationId": "notifyTenantStateChanged", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "tenantHasBillingRead", + "operationId": "tenantHasBillingRead", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } }, "400": { "description": "Bad Request", @@ -20692,7 +21218,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -20812,26 +21338,23 @@ ] } }, - "/api/billingEndpoint/tenantSubscriptionCreated": { - "post": { + "/api/billingEndpoint/tenant/permission/billing/write": { + "get": { "tags": [ "billing-endpoint-controller" ], - "summary": "notifyTenantSubscriptionCreated", - "operationId": "notifyTenantSubscriptionCreated", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "tenantHasBillingWrite", + "operationId": "tenantHasBillingWrite", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } }, "400": { "description": "Bad Request", @@ -20844,7 +21367,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -20964,113 +21487,26 @@ ] } }, - "/api/blobEntities": { - "get": { + "/api/billingEndpoint/tenantCanUpdatePlan": { + "post": { "tags": [ - "blob-entity-controller" + "billing-endpoint-controller" ], - "summary": "Get Blob Entities (getBlobEntities)", - "description": "Returns a page of BlobEntityWithCustomerInfo object that are available for the current user. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. You can specify parameters to filter the 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": "getBlobEntities", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the blob entity type. For example, 'report'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the blob entity 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", - "contentType", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "summary": "checkTenantCanUpdatePlan", + "operationId": "checkTenantCanUpdatePlan", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataBlobEntityWithCustomerInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -21083,7 +21519,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -21203,41 +21639,26 @@ ] } }, - "/api/blobEntities/list": { - "get": { + "/api/billingEndpoint/tenantPlanChanged": { + "post": { "tags": [ - "blob-entity-controller" + "billing-endpoint-controller" ], - "summary": "Get Blob Entities By Ids (getBlobEntitiesByIds)", - "description": "Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getBlobEntitiesByIds", - "parameters": [ - { - "name": "blobEntityIds", - "in": "query", - "description": "A list of blob entity ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "notifyTenantPlanChanged", + "operationId": "notifyTenantPlanChanged", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BlobEntityInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -21250,7 +21671,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -21370,35 +21791,26 @@ ] } }, - "/api/blobEntity/info/{blobEntityId}": { - "get": { + "/api/billingEndpoint/tenantStateChanged": { + "post": { "tags": [ - "blob-entity-controller" + "billing-endpoint-controller" ], - "summary": "Get Blob Entity With Customer Info (getBlobEntityInfoById)", - "description": "Fetch the BlobEntityWithCustomerInfo object based on the provided Blob entity Id. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getBlobEntityInfoById", - "parameters": [ - { - "name": "blobEntityId", - "in": "path", - "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "notifyTenantStateChanged", + "operationId": "notifyTenantStateChanged", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BlobEntityWithCustomerInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -21411,7 +21823,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -21531,25 +21943,23 @@ ] } }, - "/api/blobEntity/{blobEntityId}": { - "delete": { + "/api/billingEndpoint/tenantSubscriptionCreated": { + "post": { "tags": [ - "blob-entity-controller" + "billing-endpoint-controller" ], - "summary": "Delete Blob Entity (deleteBlobEntity)", - "description": "Delete Blob entity based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteBlobEntity", - "parameters": [ - { - "name": "blobEntityId", - "in": "path", - "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "notifyTenantSubscriptionCreated", + "operationId": "notifyTenantSubscriptionCreated", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK" @@ -21565,7 +21975,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -21685,23 +22095,101 @@ ] } }, - "/api/blobEntity/{blobEntityId}/download": { + "/api/blobEntities": { "get": { "tags": [ "blob-entity-controller" ], - "summary": "Download Blob Entity By Id (downloadBlobEntity)", - "description": "Download report file based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "downloadBlobEntity", + "summary": "Get Blob Entities (getBlobEntities)", + "description": "Returns a page of BlobEntityWithCustomerInfo object that are available for the current user. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. You can specify parameters to filter the 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": "getBlobEntities", "parameters": [ { - "name": "blobEntityId", - "in": "path", - "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the blob entity type. For example, 'report'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the blob entity 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", + "contentType", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -21710,8 +22198,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataBlobEntityWithCustomerInfo" } } } @@ -21847,32 +22334,38 @@ ] } }, - "/api/calculatedField": { - "post": { + "/api/blobEntities/list": { + "get": { "tags": [ - "calculated-field-controller" + "blob-entity-controller" ], - "summary": "Create Or Update Calculated Field (saveCalculatedField)", - "description": "Creates or Updates the Calculated Field. When creating calculated field, platform generates Calculated Field Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Calculated Field Id will be present in the response. Specify existing Calculated Field Id to update the calculated field. Referencing non-existing Calculated Field Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Calculated Field entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveCalculatedField", - "requestBody": { - "description": "A JSON value representing the calculated field.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CalculatedField" + "summary": "Get Blob Entities By Ids (getBlobEntitiesByIds)", + "description": "Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getBlobEntitiesByIds", + "parameters": [ + { + "name": "blobEntityIds", + "in": "query", + "description": "A list of blob entity ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CalculatedField" + "type": "array", + "items": { + "$ref": "#/components/schemas/BlobEntityInfo" + } } } } @@ -21888,7 +22381,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -22008,32 +22501,32 @@ ] } }, - "/api/calculatedField/testScript": { - "post": { + "/api/blobEntity/info/{blobEntityId}": { + "get": { "tags": [ - "calculated-field-controller" + "blob-entity-controller" ], - "summary": "Test Script expression", - "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testCalculatedFieldScript", - "requestBody": { - "description": "Test calculated field TBEL expression.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Get Blob Entity With Customer Info (getBlobEntityInfoById)", + "description": "Fetch the BlobEntityWithCustomerInfo object based on the provided Blob entity Id. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getBlobEntityInfoById", + "parameters": [ + { + "name": "blobEntityId", + "in": "path", + "description": "A string value representing the blob entity 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/JsonNode" + "$ref": "#/components/schemas/BlobEntityWithCustomerInfo" } } } @@ -22049,7 +22542,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -22169,176 +22662,19 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}": { - "get": { - "tags": [ - "calculated-field-controller" - ], - "summary": "Get Calculated Field (getCalculatedFieldById)", - "description": "Fetch the Calculated Field object based on the provided Calculated Field Id.", - "operationId": "getCalculatedFieldById", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CalculatedField" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, + "/api/blobEntity/{blobEntityId}": { "delete": { "tags": [ - "calculated-field-controller" + "blob-entity-controller" ], - "summary": "Delete Calculated Field (deleteCalculatedField)", - "description": "Deletes the calculated field. Referencing non-existing Calculated Field Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteCalculatedField", + "summary": "Delete Blob Entity (deleteBlobEntity)", + "description": "Delete Blob entity based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteBlobEntity", "parameters": [ { - "name": "calculatedFieldId", + "name": "blobEntityId", "in": "path", + "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -22480,18 +22816,19 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}/debug": { + "/api/blobEntity/{blobEntityId}/download": { "get": { "tags": [ - "calculated-field-controller" + "blob-entity-controller" ], - "summary": "Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent)", - "description": "Gets latest calculated field debug event for specified calculated field id. Referencing non-existing calculated field id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLatestCalculatedFieldDebugEvent", + "summary": "Download Blob Entity By Id (downloadBlobEntity)", + "description": "Download report file based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "downloadBlobEntity", "parameters": [ { - "name": "calculatedFieldId", + "name": "blobEntityId", "in": "path", + "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -22504,7 +22841,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string", + "format": "binary" } } } @@ -22640,49 +22978,32 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}/reprocess": { - "get": { + "/api/calculatedField": { + "post": { "tags": [ "calculated-field-controller" ], - "summary": "Reprocess Calculated Field (reprocessCalculatedField)", - "description": "Reprocesses the calculated field.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "reprocessCalculatedField", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "startTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" + "summary": "Create Or Update Calculated Field (saveCalculatedField)", + "description": "Creates or Updates the Calculated Field. When creating calculated field, platform generates Calculated Field Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Calculated Field Id will be present in the response. Specify existing Calculated Field Id to update the calculated field. Referencing non-existing Calculated Field Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Calculated Field entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveCalculatedField", + "requestBody": { + "description": "A JSON value representing the calculated field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalculatedField" + } } }, - { - "name": "endTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/CalculatedField" } } } @@ -22698,7 +23019,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -22818,31 +23139,32 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}/reprocess/job": { - "get": { + "/api/calculatedField/testScript": { + "post": { "tags": [ "calculated-field-controller" ], - "summary": "getLastCalculatedFieldReprocessingJob", - "operationId": "getLastCalculatedFieldReprocessingJob", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Test Script expression", + "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testCalculatedFieldScript", + "requestBody": { + "description": "Test calculated field TBEL expression.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/JsonNode" } } } @@ -22858,7 +23180,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -22978,14 +23300,14 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}/reprocess/validate": { + "/api/calculatedField/{calculatedFieldId}": { "get": { "tags": [ "calculated-field-controller" ], - "summary": "Validate reprocessing capability of a calculated field (validateCalculatedFieldReprocessing)", - "description": "Checks whether the specified calculated field can be reprocessed. Returns a validation result indicating if reprocessing is allowed and, if not, provides a reason. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "validateCalculatedFieldReprocessing", + "summary": "Get Calculated Field (getCalculatedFieldById)", + "description": "Fetch the Calculated Field object based on the provided Calculated Field Id.", + "operationId": "getCalculatedFieldById", "parameters": [ { "name": "calculatedFieldId", @@ -23002,7 +23324,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CfReprocessingValidationResult" + "$ref": "#/components/schemas/CalculatedField" } } } @@ -23136,16 +23458,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/calculatedField/{calculatedFieldId}/reprocessAndWait": { - "get": { + }, + "delete": { "tags": [ "calculated-field-controller" ], - "summary": "Reprocess Calculated Field and wait for completion (reprocessCalculatedFieldAndWait)", - "description": "Reprocesses the calculated field and waits until the job completes or fails.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "reprocessCalculatedFieldAndWait", + "summary": "Delete Calculated Field (deleteCalculatedField)", + "description": "Deletes the calculated field. Referencing non-existing Calculated Field Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteCalculatedField", "parameters": [ { "name": "calculatedFieldId", @@ -23154,24 +23474,6 @@ "schema": { "type": "string" } - }, - { - "name": "startTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -23309,96 +23611,22 @@ ] } }, - "/api/calculatedField/{entityType}/{entityId}": { + "/api/calculatedField/{calculatedFieldId}/debug": { "get": { "tags": [ "calculated-field-controller" ], - "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", - "description": "Fetch the Calculated Fields based on the provided Entity Id.", - "operationId": "getCalculatedFieldsByEntityId", + "summary": "Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent)", + "description": "Gets latest calculated field debug event for specified calculated field id. Referencing non-existing calculated field id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestCalculatedFieldDebugEvent", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "calculatedFieldId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Calculated field type. If not specified, all types will be returned.", - "required": false, - "schema": { - "$ref": "#/components/schemas/CalculatedFieldType" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field 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" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -23407,7 +23635,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCalculatedField" + "$ref": "#/components/schemas/JsonNode" } } } @@ -23543,115 +23771,39 @@ ] } }, - "/api/calculatedFields": { + "/api/calculatedField/{calculatedFieldId}/reprocess": { "get": { "tags": [ "calculated-field-controller" ], - "summary": "Get calculated fields (getCalculatedFields)", - "description": "Fetch tenant calculated fields based on the filter.", - "operationId": "getCalculatedFields", + "summary": "Reprocess Calculated Field (reprocessCalculatedField)", + "description": "Reprocesses the calculated field.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "reprocessCalculatedField", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "calculatedFieldId", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "page", + "name": "startTs", "in": "query", - "description": "Sequence number of page starting from 0", "required": true, "schema": { "type": "integer", - "format": "int32" - } - }, - { - "name": "types", - "in": "query", - "description": "Calculated field types filter.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalculatedFieldType" - }, - "uniqueItems": true - } - }, - { - "name": "entityType", - "in": "query", - "description": "Entity type filter. If not specified, calculated fields for all supported entity types will be returned.", - "required": false, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "entities", - "in": "query", - "description": "Entities filter. If not specified, calculated fields for entity type filter will be returned.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "uniqueItems": true - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field 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" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "int64" } }, { - "name": "name", + "name": "endTs", "in": "query", - "description": "Repeatable name query parameter", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "integer", + "format": "int64" } } ], @@ -23661,7 +23813,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCalculatedFieldInfo" + "$ref": "#/components/schemas/Job" } } } @@ -23797,64 +23949,21 @@ ] } }, - "/api/calculatedFields/names": { + "/api/calculatedField/{calculatedFieldId}/reprocess/job": { "get": { "tags": [ "calculated-field-controller" ], - "summary": "Get calculated field names (getCalculatedFieldNames)", - "description": "Fetch the list of calculated field names for specified type.", - "operationId": "getCalculatedFieldNames", + "summary": "getLastCalculatedFieldReprocessingJob", + "operationId": "getLastCalculatedFieldReprocessingJob", "parameters": [ { - "name": "type", - "in": "query", - "description": "Calculated field type filter.", - "required": true, - "schema": { - "$ref": "#/components/schemas/CalculatedFieldType" - } - }, - { - "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": "calculatedFieldId", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -23864,7 +23973,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataString" + "$ref": "#/components/schemas/Job" } } } @@ -24000,20 +24109,31 @@ ] } }, - "/api/cloudEndpoint/permission/domain/read": { + "/api/calculatedField/{calculatedFieldId}/reprocess/validate": { "get": { "tags": [ - "cloud-endpoint-controller" + "calculated-field-controller" + ], + "summary": "Validate reprocessing capability of a calculated field (validateCalculatedFieldReprocessing)", + "description": "Checks whether the specified calculated field can be reprocessed. Returns a validation result indicating if reprocessing is allowed and, if not, provides a reason. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "validateCalculatedFieldReprocessing", + "parameters": [ + { + "name": "calculatedFieldId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "hasDomainReadPermission", - "operationId": "hasDomainReadPermission", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/CfReprocessingValidationResult" } } } @@ -24149,23 +24269,45 @@ ] } }, - "/api/cloudEndpoint/permission/domain/write": { + "/api/calculatedField/{calculatedFieldId}/reprocessAndWait": { "get": { "tags": [ - "cloud-endpoint-controller" + "calculated-field-controller" + ], + "summary": "Reprocess Calculated Field and wait for completion (reprocessCalculatedFieldAndWait)", + "description": "Reprocesses the calculated field and waits until the job completes or fails.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "reprocessCalculatedFieldAndWait", + "parameters": [ + { + "name": "calculatedFieldId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "startTs", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTs", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } ], - "summary": "hasDomainWritePermission", - "operationId": "hasDomainWritePermission", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -24298,169 +24440,105 @@ ] } }, - "/api/cloudEndpoint/tenant/permission/whiteLabel/read": { + "/api/calculatedField/{entityType}/{entityId}": { "get": { "tags": [ - "cloud-endpoint-controller" + "calculated-field-controller" ], - "summary": "tenantHasWhiteLabelRead", - "operationId": "tenantHasWhiteLabelRead", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "boolean" - } - } + "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", + "description": "Fetch the Calculated Fields based on the provided Entity Id.", + "operationId": "getCalculatedFieldsByEntityId", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "type", + "in": "query", + "description": "Calculated field type. If not specified, all types will be returned.", + "required": false, + "schema": { + "$ref": "#/components/schemas/CalculatedFieldType" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the calculated field name.", + "required": false, + "schema": { + "type": "string" } - } - }, - "security": [ + }, { - "HttpLoginForm": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name" + ] + } }, { - "ApiKeyForm": [] + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } - ] - } - }, - "/api/cloudEndpoint/tenant/permission/whiteLabel/write": { - "get": { - "tags": [ - "cloud-endpoint-controller" ], - "summary": "tenantHasWhiteLabelWrite", - "operationId": "tenantHasWhiteLabelWrite", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/PageDataCalculatedField" } } } @@ -24596,16 +24674,128 @@ ] } }, - "/api/cloudEndpoint/tenant/permission/whiteLabelingAllowed": { + "/api/calculatedFields": { "get": { "tags": [ - "cloud-endpoint-controller" + "calculated-field-controller" + ], + "summary": "Get calculated fields (getCalculatedFields)", + "description": "Fetch tenant calculated fields based on the filter.", + "operationId": "getCalculatedFields", + "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": "types", + "in": "query", + "description": "Calculated field types filter.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalculatedFieldType" + }, + "uniqueItems": true + } + }, + { + "name": "entityType", + "in": "query", + "description": "Entity type filter. If not specified, calculated fields for all supported entity types will be returned.", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "entities", + "in": "query", + "description": "Entities filter. If not specified, calculated fields for entity type filter will be returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the calculated field 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" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "name", + "in": "query", + "description": "Repeatable name query parameter", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } ], - "summary": "checkTenantWhiteLabelingAllowed", - "operationId": "checkTenantWhiteLabelingAllowed", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCalculatedFieldInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -24738,23 +24928,65 @@ ] } }, - "/api/component/{componentDescriptorClazz}": { + "/api/calculatedFields/names": { "get": { "tags": [ - "component-descriptor-controller" + "calculated-field-controller" ], - "summary": "Get Component Descriptor (getComponentDescriptorByClazz)", - "description": "Gets the Component Descriptor object using class name from the path parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getComponentDescriptorByClazz", + "summary": "Get calculated field names (getCalculatedFieldNames)", + "description": "Fetch the list of calculated field names for specified type.", + "operationId": "getCalculatedFieldNames", "parameters": [ { - "name": "componentDescriptorClazz", - "in": "path", - "description": "Component Descriptor class name", + "name": "type", + "in": "query", + "description": "Calculated field type filter.", + "required": true, + "schema": { + "$ref": "#/components/schemas/CalculatedFieldType" + } + }, + { + "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 calculated field name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -24763,7 +24995,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ComponentDescriptor" + "$ref": "#/components/schemas/PageDataString" } } } @@ -24899,51 +25131,20 @@ ] } }, - "/api/components": { + "/api/cloudEndpoint/permission/domain/read": { "get": { "tags": [ - "component-descriptor-controller" - ], - "summary": "Get Component Descriptors (getComponentDescriptorsByTypes)", - "description": "Gets the Component Descriptors using coma separated list of rule node types and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getComponentDescriptorsByTypes", - "parameters": [ - { - "name": "componentTypes", - "in": "query", - "description": "List of types of the Rule Nodes, (ENRICHMENT, FILTER, TRANSFORMATION, ACTION or EXTERNAL)", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "ruleChainType", - "in": "query", - "description": "Type of the Rule Chain", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] - } - } + "cloud-endpoint-controller" ], + "summary": "hasDomainReadPermission", + "operationId": "hasDomainReadPermission", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentDescriptor" - } + "type": "boolean" } } } @@ -25079,55 +25280,20 @@ ] } }, - "/api/components/{componentType}": { + "/api/cloudEndpoint/permission/domain/write": { "get": { "tags": [ - "component-descriptor-controller" - ], - "summary": "Get Component Descriptors (getComponentDescriptorsByType)", - "description": "Gets the Component Descriptors using rule node type and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getComponentDescriptorsByType", - "parameters": [ - { - "name": "componentType", - "in": "path", - "description": "Type of the Rule Node", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ENRICHMENT", - "FILTER", - "TRANSFORMATION", - "ACTION", - "EXTERNAL" - ] - } - }, - { - "name": "ruleChainType", - "in": "query", - "description": "Type of the Rule Chain", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] - } - } + "cloud-endpoint-controller" ], + "summary": "hasDomainWritePermission", + "operationId": "hasDomainWritePermission", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentDescriptor" - } + "type": "boolean" } } } @@ -25263,32 +25429,20 @@ ] } }, - "/api/converter": { - "post": { + "/api/cloudEndpoint/tenant/permission/whiteLabel/read": { + "get": { "tags": [ - "converter-controller" + "cloud-endpoint-controller" ], - "summary": "Create Or Update Converter (saveConverter)", - "description": "Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. \n\n# Converter Configuration\n\nConverter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. \n\n## Uplink Converter Configuration\n\n***Default converter may be different, depending on integration type***.\n\n```json\n{\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n contentAwareAttributeKeys: ['manufacturer'],\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName'],\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\",\n \"encoder\":null\n}\n```\n\nDecoder field in the more readable form:\n\n```text\n// Decode an uplink message from a buffer\n// payload - array of bytes\n// metadata - key/value object\n\n/** Decoder **/\n\n// decode payload to string\nvar payloadStr = decodeToString(payload);\n\n// decode payload to JSON\n// var data = decodeToJson(payload);\n\nvar deviceName = 'Device A';\nvar deviceType = 'thermostat';\nvar customerName = 'customer';\nvar groupName = 'thermostat devices';\nvar manufacturer = 'Example corporation';\n// use assetName and assetType instead of deviceName and deviceType\n// to automatically create assets instead of devices.\n// var assetName = 'Asset A';\n// var assetType = 'building';\n\n// Result object with device/asset attributes/telemetry data\nvar result = {\n// Use deviceName and deviceType or assetName and assetType, but not both.\n deviceName: deviceName,\n deviceType: deviceType,\n// assetName: assetName,\n// assetType: assetType,\n customerName: customerName,\n groupName: groupName,\n attributes: {\n model: 'Model A',\n serialNumber: 'SN111',\n integrationName: metadata['integrationName']\n manufacturer: manufacturer,\n },\n telemetry: {\n temperature: 42,\n humidity: 80,\n rawData: payloadStr\n }\n};\n\n/** Helper functions **/\n\nfunction decodeToString(payload) {\n return String.fromCharCode.apply(String, payload);\n}\n\nfunction decodeToJson(payload) {\n // covert payload to string.\n var str = decodeToString(payload);\n\n // parse string to JSON\n var data = JSON.parse(str);\n return data;\n}\n\nreturn result;\n```\n\n## Downlink Converter Configuration\n\n```json\n{\n \"decoder\":null,\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\nEncoder field in the more readable form:\n\n```text\n// Encode downlink data from incoming Rule Engine message\n\n// msg - JSON message payload downlink message json\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\n// metadata - list of key-value pairs with additional data about the message\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\n\n/** Encoder **/\n\nvar data = {};\n\n// Process data from incoming message and metadata\n\ndata.tempFreq = msg.temperatureUploadFrequency;\ndata.humFreq = msg.humidityUploadFrequency;\n\ndata.devSerialNumber = metadata['ss_serialNumber'];\n\n// Result object with encoded downlink payload\nvar result = {\n\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\n contentType: \"JSON\",\n\n // downlink data\n data: JSON.stringify(data),\n\n // Optional metadata object presented in key/value format\n metadata: {\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\n }\n\n};\n\nreturn result;\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new converter entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveConverter", - "requestBody": { - "description": "A JSON value representing the converter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Converter" - } - } - }, - "required": true - }, + "summary": "tenantHasWhiteLabelRead", + "operationId": "tenantHasWhiteLabelRead", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Converter" + "type": "boolean" } } } @@ -25304,7 +25458,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -25424,43 +25578,20 @@ ] } }, - "/api/converter/testDownLink": { - "post": { + "/api/cloudEndpoint/tenant/permission/whiteLabel/write": { + "get": { "tags": [ - "converter-controller" - ], - "summary": "Test converter function (testDownLinkConverter)", - "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n \"data\":\"40\"\n },\n \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"integrationMetadata\":{\n \"integrationName\":\"Integration\"\n },\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - message metadata pushed from the rule engine; \n * 'msg' - message data pushed from the rule engine; \n * 'msgType' - type of the message pushed from the rule engine; \n * 'integrationMetadata' - integration metadata object; \n * 'encoder' - string representation of the encoder configuration.\n\n## Response Body Example\n\n```json\n{\n \"contentType\":\"JSON\",\n \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\",\n \"metadata\":{\n \"topic\":\"sensor/Temp Sensor/upload\"\n }\n}\n```\n\n * 'contentType' - downlink data content type; \n * 'data' - downlink data; \n * 'metadata' - optional metadata object. \n", - "operationId": "testDownLinkConverter", - "parameters": [ - { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, - "schema": { - "$ref": "#/components/schemas/ScriptLanguage" - } - } + "cloud-endpoint-controller" ], - "requestBody": { - "description": "A JSON value representing the input to the converter function.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "tenantHasWhiteLabelWrite", + "operationId": "tenantHasWhiteLabelWrite", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "boolean" } } } @@ -25476,7 +25607,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -25596,46 +25727,16 @@ ] } }, - "/api/converter/testUpLink": { - "post": { + "/api/cloudEndpoint/tenant/permission/whiteLabelingAllowed": { + "get": { "tags": [ - "converter-controller" - ], - "summary": "Test converter function (testUpLinkConverter)", - "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - integration metadata; \n * 'payload' - base64 string representation of the data; \n * 'decoder' - string representation of the decoder configuration; \n * 'converter' - JSON object representing converter.\n\n## Response Body Example\n\n```json\n{\n \"output\":\"{\\\"deviceName\\\":\\\"Device A\\\",\\\"deviceType\\\":\\\"thermostat\\\",\\\"customerName\\\":\\\"customer\\\",\\\"groupName\\\":\\\"thermostat devices\\\",\\\"attributes\\\":{\\\"model\\\":\\\"Model A\\\",\\\"serialNumber\\\":\\\"SN111\\\"},\\\"telemetry\\\":{\\\"temperature\\\":42,\\\"humidity\\\":80,\\\"rawData\\\":\\\"{\\\\n \\\\\\\"data\\\\\\\": \\\\\\\"data\\\\\\\"\\\\n}\\\"}}\",\n \"error\":\"\"\n}\n```\n\n * 'output' - string representation of the output message; \n * 'error' - string representation of the error message. \n", - "operationId": "testUpLinkConverter", - "parameters": [ - { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, - "schema": { - "$ref": "#/components/schemas/ScriptLanguage" - } - } + "cloud-endpoint-controller" ], - "requestBody": { - "description": "A JSON value representing the input to the converter function.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "checkTenantWhiteLabelingAllowed", + "operationId": "checkTenantWhiteLabelingAllowed", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -25648,7 +25749,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -25768,43 +25869,32 @@ ] } }, - "/api/converter/unwrap/{integrationType}": { - "post": { + "/api/component/{componentDescriptorClazz}": { + "get": { "tags": [ - "converter-controller" + "component-descriptor-controller" ], - "summary": "Transform input raw payload to the dedicated converter data (unwrapRawPayload)", - "description": "Returns a JSON object representing the result of the unwrapped incoming raw message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n}\n``` * 'metadata' - integration metadata; \n * 'payload' - JSON object representing the input raw message.\n\n## Response Body Example\n\n * 'metadata' - integration metadata enriched with the data from the input message; \n * 'payload' - base64 string representation of the payload from the unwrapped input message; \n * 'contentType' - string representation payload contentType.", - "operationId": "unwrapRawPayload", + "summary": "Get Component Descriptor (getComponentDescriptorByClazz)", + "description": "Gets the Component Descriptor object using class name from the path parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getComponentDescriptorByClazz", "parameters": [ { - "name": "integrationType", + "name": "componentDescriptorClazz", "in": "path", - "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", + "description": "Component Descriptor class name", "required": true, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "type": "string" } } ], - "requestBody": { - "description": "A JSON value representing the input message.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/ComponentDescriptor" } } } @@ -25820,7 +25910,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -25940,22 +26030,38 @@ ] } }, - "/api/converter/{converterId}": { + "/api/components": { "get": { "tags": [ - "converter-controller" + "component-descriptor-controller" ], - "summary": "Get Converter (getConverterById)", - "description": "Fetch the Converter object based on the provided Converter Id. The server checks that the converter is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getConverterById", + "summary": "Get Component Descriptors (getComponentDescriptorsByTypes)", + "description": "Gets the Component Descriptors using coma separated list of rule node types and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getComponentDescriptorsByTypes", "parameters": [ { - "name": "converterId", - "in": "path", - "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "componentTypes", + "in": "query", + "description": "List of types of the Rule Nodes, (ENRICHMENT, FILTER, TRANSFORMATION, ACTION or EXTERNAL)", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "ruleChainType", + "in": "query", + "description": "Type of the Rule Chain", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] } } ], @@ -25965,7 +26071,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Converter" + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentDescriptor" + } } } } @@ -26099,28 +26208,60 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/components/{componentType}": { + "get": { "tags": [ - "converter-controller" + "component-descriptor-controller" ], - "summary": "Delete converter (deleteConverter)", - "description": "Deletes the converter and all the relations (from and to the converter). Referencing non-existing converter Id will cause an error. If the converter is associated with the integration, it will not be allowed for deletion.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteConverter", + "summary": "Get Component Descriptors (getComponentDescriptorsByType)", + "description": "Gets the Component Descriptors using rule node type and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getComponentDescriptorsByType", "parameters": [ { - "name": "converterId", + "name": "componentType", "in": "path", - "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Type of the Rule Node", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ENRICHMENT", + "FILTER", + "TRANSFORMATION", + "ACTION", + "EXTERNAL" + ] + } + }, + { + "name": "ruleChainType", + "in": "query", + "description": "Type of the Rule Chain", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentDescriptor" + } + } + } + } }, "400": { "description": "Bad Request", @@ -26253,69 +26394,32 @@ ] } }, - "/api/converter/{converterId}/debugIn": { - "get": { + "/api/converter": { + "post": { "tags": [ "converter-controller" ], - "summary": "Get latest debug input event (getLatestConverterDebugInput)", - "description": "Returns a JSON object of the latest debug event representing the input message the converter processed. \n\n## Uplink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":40}\",\n \"inMetadata\":\"{\\\"Header:sec-ch-ua\\\":\\\"\\\\\\\"Chromium\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\"Google Chrome\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\";Not A Brand\\\\\\\";v=\\\\\\\"99\\\\\\\"\\\",\\\"Header:user-agent\\\":\\\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36\\\",\\\"integrationName\\\":\\\"Integration\\\",\\\"Header:cookie\\\":\\\"GUID=zYSs8hymSwZKv8kHALKY; redirect_to=%2F; JSESSIONID=B0A7C8E481409CE7924E738DB04F62F9\\\",\\\"Header:sec-ch-ua-platform\\\":\\\"\\\\\\\"Linux\\\\\\\"\\\",\\\"Header:accept\\\":\\\"*/*\\\",\\\"Header:origin\\\":\\\"http://localhost:8080\\\",\\\"Header:sec-fetch-site\\\":\\\"same-origin\\\",\\\"Header:connection\\\":\\\"keep-alive\\\",\\\"Header:accept-encoding\\\":\\\"gzip, deflate, br\\\",\\\"Header:content-type\\\":\\\"application/json\\\",\\\"Header:content-length\\\":\\\"16\\\",\\\"Header:sec-fetch-mode\\\":\\\"cors\\\",\\\"Header:sec-ch-ua-mobile\\\":\\\"?0\\\",\\\"Header:sec-fetch-dest\\\":\\\"empty\\\",\\\"Header:host\\\":\\\"localhost:8080\\\",\\\"Header:referer\\\":\\\"http://localhost:8080/swagger-ui.html\\\",\\\"Header:accept-language\\\":\\\"en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7,uk;q=0.6,und;q=0.5\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - message data received; \n * 'inMetadata' - integration metadata (e.g. headers).\n\n## Downlink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":42,\\\"humidity\\\":77}\",\n \"inMsgType\":\"POST_TELEMETRY_REQUEST\",\n \"inMetadata\":\"{\\\"data\\\":\\\"40\\\"}\",\n \"inIntegrationMetadata\":\"{\\\"integrationName\\\":\\\"Integration\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - content of the message pushed from the rule engine; \n * 'inMsgType' - type of the message pushed from the rule engine; \n * 'inMetadata' - content of the message metadata pushed from the rule engine; \n * 'inIntegrationMetadata' - integration metadata. \n\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getLatestConverterDebugInput", - "parameters": [ - { - "name": "converterId", - "in": "path", - "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "converterType", - "in": "query", - "description": "A string value representing the converter type. One of the following:\nUPLINK, DOWNLINK", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "integrationType", - "in": "query", - "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "integrationName", - "in": "query", - "description": "A string value representing the integration name. For example, 'My New Integration'", - "required": false, - "schema": { - "type": "string" + "summary": "Create Or Update Converter (saveConverter)", + "description": "Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. \n\n# Converter Configuration\n\nConverter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. \n\n## Uplink Converter Configuration\n\n***Default converter may be different, depending on integration type***.\n\n```json\n{\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n contentAwareAttributeKeys: ['manufacturer'],\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName'],\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\",\n \"encoder\":null\n}\n```\n\nDecoder field in the more readable form:\n\n```text\n// Decode an uplink message from a buffer\n// payload - array of bytes\n// metadata - key/value object\n\n/** Decoder **/\n\n// decode payload to string\nvar payloadStr = decodeToString(payload);\n\n// decode payload to JSON\n// var data = decodeToJson(payload);\n\nvar deviceName = 'Device A';\nvar deviceType = 'thermostat';\nvar customerName = 'customer';\nvar groupName = 'thermostat devices';\nvar manufacturer = 'Example corporation';\n// use assetName and assetType instead of deviceName and deviceType\n// to automatically create assets instead of devices.\n// var assetName = 'Asset A';\n// var assetType = 'building';\n\n// Result object with device/asset attributes/telemetry data\nvar result = {\n// Use deviceName and deviceType or assetName and assetType, but not both.\n deviceName: deviceName,\n deviceType: deviceType,\n// assetName: assetName,\n// assetType: assetType,\n customerName: customerName,\n groupName: groupName,\n attributes: {\n model: 'Model A',\n serialNumber: 'SN111',\n integrationName: metadata['integrationName']\n manufacturer: manufacturer,\n },\n telemetry: {\n temperature: 42,\n humidity: 80,\n rawData: payloadStr\n }\n};\n\n/** Helper functions **/\n\nfunction decodeToString(payload) {\n return String.fromCharCode.apply(String, payload);\n}\n\nfunction decodeToJson(payload) {\n // covert payload to string.\n var str = decodeToString(payload);\n\n // parse string to JSON\n var data = JSON.parse(str);\n return data;\n}\n\nreturn result;\n```\n\n## Downlink Converter Configuration\n\n```json\n{\n \"decoder\":null,\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\nEncoder field in the more readable form:\n\n```text\n// Encode downlink data from incoming Rule Engine message\n\n// msg - JSON message payload downlink message json\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\n// metadata - list of key-value pairs with additional data about the message\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\n\n/** Encoder **/\n\nvar data = {};\n\n// Process data from incoming message and metadata\n\ndata.tempFreq = msg.temperatureUploadFrequency;\ndata.humFreq = msg.humidityUploadFrequency;\n\ndata.devSerialNumber = metadata['ss_serialNumber'];\n\n// Result object with encoded downlink payload\nvar result = {\n\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\n contentType: \"JSON\",\n\n // downlink data\n data: JSON.stringify(data),\n\n // Optional metadata object presented in key/value format\n metadata: {\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\n }\n\n};\n\nreturn result;\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new converter entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveConverter", + "requestBody": { + "description": "A JSON value representing the converter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Converter" + } } }, - { - "name": "converterVersion", - "in": "query", - "description": "Converter version.", - "required": false, - "schema": { - "type": "integer", - "format": "int32" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/Converter" } } } @@ -26331,7 +26435,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -26451,99 +26555,43 @@ ] } }, - "/api/converters": { - "get": { + "/api/converter/testDownLink": { + "post": { "tags": [ "converter-controller" ], - "summary": "Get Converters (getConverters)", - "description": "Returns a page of converters 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": "getConverters", + "summary": "Test converter function (testDownLinkConverter)", + "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n \"data\":\"40\"\n },\n \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"integrationMetadata\":{\n \"integrationName\":\"Integration\"\n },\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - message metadata pushed from the rule engine; \n * 'msg' - message data pushed from the rule engine; \n * 'msgType' - type of the message pushed from the rule engine; \n * 'integrationMetadata' - integration metadata object; \n * 'encoder' - string representation of the encoder configuration.\n\n## Response Body Example\n\n```json\n{\n \"contentType\":\"JSON\",\n \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\",\n \"metadata\":{\n \"topic\":\"sensor/Temp Sensor/upload\"\n }\n}\n```\n\n * 'contentType' - downlink data content type; \n * 'data' - downlink data; \n * 'metadata' - optional metadata object. \n", + "operationId": "testDownLinkConverter", "parameters": [ { - "name": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template converters", - "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 converter 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" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "integrationType", + "name": "scriptLang", "in": "query", - "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", + "description": "Script language: JS or TBEL", "required": false, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "$ref": "#/components/schemas/ScriptLanguage" } } ], + "requestBody": { + "description": "A JSON value representing the input to the converter function.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataConverter" + "$ref": "#/components/schemas/JsonNode" } } } @@ -26559,7 +26607,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -26679,38 +26727,43 @@ ] } }, - "/api/converters/list": { - "get": { + "/api/converter/testUpLink": { + "post": { "tags": [ "converter-controller" ], - "summary": "Get Converters By Ids (getConvertersByIds)", - "description": "Requested converters must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getConvertersByIds", + "summary": "Test converter function (testUpLinkConverter)", + "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - integration metadata; \n * 'payload' - base64 string representation of the data; \n * 'decoder' - string representation of the decoder configuration; \n * 'converter' - JSON object representing converter.\n\n## Response Body Example\n\n```json\n{\n \"output\":\"{\\\"deviceName\\\":\\\"Device A\\\",\\\"deviceType\\\":\\\"thermostat\\\",\\\"customerName\\\":\\\"customer\\\",\\\"groupName\\\":\\\"thermostat devices\\\",\\\"attributes\\\":{\\\"model\\\":\\\"Model A\\\",\\\"serialNumber\\\":\\\"SN111\\\"},\\\"telemetry\\\":{\\\"temperature\\\":42,\\\"humidity\\\":80,\\\"rawData\\\":\\\"{\\\\n \\\\\\\"data\\\\\\\": \\\\\\\"data\\\\\\\"\\\\n}\\\"}}\",\n \"error\":\"\"\n}\n```\n\n * 'output' - string representation of the output message; \n * 'error' - string representation of the error message. \n", + "operationId": "testUpLinkConverter", "parameters": [ { - "name": "converterIds", + "name": "scriptLang", "in": "query", - "description": "A list of converter ids, separated by comma ','", - "required": true, + "description": "Script language: JS or TBEL", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/ScriptLanguage" } } ], + "requestBody": { + "description": "A JSON value representing the input to the converter function.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Converter" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -26726,7 +26779,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -26846,71 +26899,43 @@ ] } }, - "/api/converter/library/{integrationType}/vendors": { - "get": { + "/api/converter/unwrap/{integrationType}": { + "post": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get vendors (getVendors)", - "description": "Returns a list of vendors for the integration type", - "operationId": "getVendors", + "summary": "Transform input raw payload to the dedicated converter data (unwrapRawPayload)", + "description": "Returns a JSON object representing the result of the unwrapped incoming raw message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n}\n``` * 'metadata' - integration metadata; \n * 'payload' - JSON object representing the input raw message.\n\n## Response Body Example\n\n * 'metadata' - integration metadata enriched with the data from the input message; \n * 'payload' - base64 string representation of the payload from the unwrapped input message; \n * 'contentType' - string representation payload contentType.", + "operationId": "unwrapRawPayload", "parameters": [ { "name": "integrationType", "in": "path", + "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", "required": true, "schema": { "$ref": "#/components/schemas/IntegrationType" } - }, - { - "name": "converterType", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 2147483647 - } - }, - { - "name": "loadImages", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true - } } ], + "requestBody": { + "description": "A JSON value representing the input message.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Vendor" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -26926,7 +26951,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -27046,67 +27071,23 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/models": { + "/api/converter/{converterId}": { "get": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get vendor models (getVendorModels)", - "description": "Returns a list of models for the vendor, integration type and converter type", - "operationId": "getVendorModels", + "summary": "Get Converter (getConverterById)", + "description": "Fetch the Converter object based on the provided Converter Id. The server checks that the converter is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getConverterById", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", + "name": "converterId", "in": "path", + "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "converterType", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 0 - } - }, - { - "name": "pageSize", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "format": "int32", - "default": 2147483647 - } - }, - { - "name": "loadImages", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true - } } ], "responses": { @@ -27115,10 +27096,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model" - } + "$ref": "#/components/schemas/Converter" } } } @@ -27252,36 +27230,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink": { - "get": { + }, + "delete": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get downlink converter (getDownlinkConverter)", - "description": "Returns downlink converter body for the vendor, integration type and model", - "operationId": "getDownlinkConverter", + "summary": "Delete converter (deleteConverter)", + "description": "Deletes the converter and all the relations (from and to the converter). Referencing non-existing converter Id will cause an error. If the converter is associated with the integration, it will not be allowed for deletion.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteConverter", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "model", + "name": "converterId", "in": "path", + "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -27290,14 +27251,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -27430,47 +27384,69 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/metadata": { + "/api/converter/{converterId}/debugIn": { "get": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get downlink converter metadata (getDownlinkConverterMetadata)", - "description": "Returns downlink converter metadata for the vendor, integration type and model", - "operationId": "getDownlinkConverterMetadata", + "summary": "Get latest debug input event (getLatestConverterDebugInput)", + "description": "Returns a JSON object of the latest debug event representing the input message the converter processed. \n\n## Uplink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":40}\",\n \"inMetadata\":\"{\\\"Header:sec-ch-ua\\\":\\\"\\\\\\\"Chromium\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\"Google Chrome\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\";Not A Brand\\\\\\\";v=\\\\\\\"99\\\\\\\"\\\",\\\"Header:user-agent\\\":\\\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36\\\",\\\"integrationName\\\":\\\"Integration\\\",\\\"Header:cookie\\\":\\\"GUID=zYSs8hymSwZKv8kHALKY; redirect_to=%2F; JSESSIONID=B0A7C8E481409CE7924E738DB04F62F9\\\",\\\"Header:sec-ch-ua-platform\\\":\\\"\\\\\\\"Linux\\\\\\\"\\\",\\\"Header:accept\\\":\\\"*/*\\\",\\\"Header:origin\\\":\\\"http://localhost:8080\\\",\\\"Header:sec-fetch-site\\\":\\\"same-origin\\\",\\\"Header:connection\\\":\\\"keep-alive\\\",\\\"Header:accept-encoding\\\":\\\"gzip, deflate, br\\\",\\\"Header:content-type\\\":\\\"application/json\\\",\\\"Header:content-length\\\":\\\"16\\\",\\\"Header:sec-fetch-mode\\\":\\\"cors\\\",\\\"Header:sec-ch-ua-mobile\\\":\\\"?0\\\",\\\"Header:sec-fetch-dest\\\":\\\"empty\\\",\\\"Header:host\\\":\\\"localhost:8080\\\",\\\"Header:referer\\\":\\\"http://localhost:8080/swagger-ui.html\\\",\\\"Header:accept-language\\\":\\\"en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7,uk;q=0.6,und;q=0.5\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - message data received; \n * 'inMetadata' - integration metadata (e.g. headers).\n\n## Downlink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":42,\\\"humidity\\\":77}\",\n \"inMsgType\":\"POST_TELEMETRY_REQUEST\",\n \"inMetadata\":\"{\\\"data\\\":\\\"40\\\"}\",\n \"inIntegrationMetadata\":\"{\\\"integrationName\\\":\\\"Integration\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - content of the message pushed from the rule engine; \n * 'inMsgType' - type of the message pushed from the rule engine; \n * 'inMetadata' - content of the message metadata pushed from the rule engine; \n * 'inIntegrationMetadata' - integration metadata. \n\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getLatestConverterDebugInput", "parameters": [ { - "name": "integrationType", + "name": "converterId", "in": "path", + "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "type": "string" } }, { - "name": "vendorName", - "in": "path", - "required": true, + "name": "converterType", + "in": "query", + "description": "A string value representing the converter type. One of the following:\nUPLINK, DOWNLINK", + "required": false, "schema": { "type": "string" } }, { - "name": "model", - "in": "path", - "required": true, + "name": "integrationType", + "in": "query", + "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "integrationName", + "in": "query", + "description": "A string value representing the integration name. For example, 'My New Integration'", + "required": false, "schema": { "type": "string" } + }, + { + "name": "converterVersion", + "in": "query", + "description": "Converter version.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } } ], "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/JsonNode" } } } @@ -27606,47 +27582,99 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/payload": { + "/api/converters": { "get": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get downlink payload (getDownlinkPayload)", - "description": "Returns payload example for the downlink converter for the vendor, integration type and model", - "operationId": "getDownlinkPayload", + "summary": "Get Converters (getConverters)", + "description": "Returns a page of converters 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": "getConverters", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template converters", + "required": false, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "type": "boolean", + "default": false } }, { - "name": "vendorName", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "model", - "in": "path", + "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 converter 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" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "integrationType", + "in": "query", + "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", + "required": false, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } } ], "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataConverter" } } } @@ -27782,37 +27810,25 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink": { + "/api/converters/list": { "get": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get uplink converter (getUplinkConverter)", - "description": "Returns uplink converter body for the vendor, integration type and model", - "operationId": "getUplinkConverter", + "summary": "Get Converters By Ids (getConvertersByIds)", + "description": "Requested converters must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getConvertersByIds", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "model", - "in": "path", + "name": "converterIds", + "in": "query", + "description": "A list of converter ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -27820,9 +27836,12 @@ "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/Converter" + } } } } @@ -27958,14 +27977,14 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/metadata": { + "/api/converter/library/{integrationType}/vendors": { "get": { "tags": [ "converter-library-controller" ], - "summary": "Get uplink converter metadata (getUplinkConverterMetadata)", - "description": "Returns uplink converter metadata for the vendor, integration type and model", - "operationId": "getUplinkConverterMetadata", + "summary": "Get vendors (getVendors)", + "description": "Returns a list of vendors for the integration type", + "operationId": "getVendors", "parameters": [ { "name": "integrationType", @@ -27976,19 +27995,40 @@ } }, { - "name": "vendorName", - "in": "path", - "required": true, + "name": "converterType", + "in": "query", + "required": false, "schema": { "type": "string" } }, { - "name": "model", - "in": "path", - "required": true, + "name": "page", + "in": "query", + "required": false, "schema": { - "type": "string" + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "loadImages", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true } } ], @@ -27996,9 +28036,12 @@ "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/Vendor" + } } } } @@ -28134,14 +28177,14 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/payload": { + "/api/converter/library/{integrationType}/{vendorName}/models": { "get": { "tags": [ "converter-library-controller" ], - "summary": "Get uplink payload (getUplinkPayload)", - "description": "Returns payload example for the uplink converter for the vendor, integration type and model", - "operationId": "getUplinkPayload", + "summary": "Get vendor models (getVendorModels)", + "description": "Returns a list of models for the vendor, integration type and converter type", + "operationId": "getVendorModels", "parameters": [ { "name": "integrationType", @@ -28160,21 +28203,53 @@ } }, { - "name": "model", - "in": "path", - "required": true, + "name": "converterType", + "in": "query", + "required": false, "schema": { "type": "string" } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "loadImages", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } } ], "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/Model" + } } } } @@ -28310,19 +28385,35 @@ ] } }, - "/api/customMenu": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink": { "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Get end-user Custom Menu configuration (getCustomMenu)", - "description": "Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration.", - "operationId": "getCustomMenu", + "summary": "Get downlink converter (getDownlinkConverter)", + "description": "Returns downlink converter body for the vendor, integration type and model", + "operationId": "getDownlinkConverter", "parameters": [ { - "name": "If-None-Match", - "in": "header", - "required": false, + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -28330,7 +28421,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -28461,54 +28559,49 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/metadata": { + "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Create Custom Menu (createCustomMenu)", - "description": "The api is designed to create Custom Menu without configuration. Is not applicable for update.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "createCustomMenu", + "summary": "Get downlink converter metadata (getDownlinkConverterMetadata)", + "description": "Returns downlink converter metadata for the vendor, integration type and model", + "operationId": "getDownlinkConverterMetadata", "parameters": [ { - "name": "assignToList", - "in": "query", - "description": "A list of entity ids, separated by comma ','", - "required": false, + "name": "integrationType", + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/IntegrationType" } }, { - "name": "force", - "in": "query", - "description": "Use force if you want to create default menu that conflicts with the existing one (old one will be update NO_ASSIGN assignee type)", - "required": false, + "name": "vendorName", + "in": "path", + "required": true, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomMenuInfo" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/CustomMenu" + "type": "string" } } } @@ -28524,7 +28617,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -28644,86 +28737,37 @@ ] } }, - "/api/customMenu/infos": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/payload": { "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Get all custom menus configured at user level (getCustomMenuInfos)", - "description": "Returns a page of custom menu info objects owned by the tenant or the customer of a current user, scope and assigneeType request parameters can be used to filter the result.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getCustomMenuInfos", + "summary": "Get downlink payload (getDownlinkPayload)", + "description": "Returns payload example for the downlink converter for the vendor, integration type and model", + "operationId": "getDownlinkPayload", "parameters": [ { - "name": "scope", - "in": "query", - "description": "Custom menu scope.", - "required": false, - "schema": { - "$ref": "#/components/schemas/CMScope" - } - }, - { - "name": "assigneeType", - "in": "query", - "description": "Custom menu assignee type.", - "required": false, - "schema": { - "$ref": "#/components/schemas/CMAssigneeType" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "integrationType", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/IntegrationType" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "vendorName", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the custom menu name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "model", + "in": "path", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -28731,9 +28775,9 @@ "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/PageDataCustomMenuInfo" + "type": "string" } } } @@ -28869,32 +28913,37 @@ ] } }, - "/api/customMenu/{customMenuId}": { - "delete": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink": { + "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Delete custom menu (deleteCustomMenu)", - "description": "Deletes the custom menu based on the provided Custom Menu Id. Referencing non-existing custom menu Id will cause an error. If the custom menu is assigned to the list of users or customers bad request is returned.To delete a custom menu that has assignee list set 'force' request param to true ", - "operationId": "deleteCustomMenu", + "summary": "Get uplink converter (getUplinkConverter)", + "description": "Returns uplink converter body for the vendor, integration type and model", + "operationId": "getUplinkConverter", "parameters": [ { - "name": "customMenuId", + "name": "integrationType", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/IntegrationType" } }, { - "name": "force", - "in": "query", - "description": "Force set to true will unassign menu before deletion", - "required": false, + "name": "vendorName", + "in": "path", + "required": true, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], @@ -28902,9 +28951,9 @@ "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/CustomMenuDeleteResult" + "type": "string" } } } @@ -29040,23 +29089,37 @@ ] } }, - "/api/customMenu/{customMenuId}/assigneeList": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/metadata": { "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Get Custom Menu assignee list (getCustomMenuAssigneeList)", - "description": "Fetch the list of Entity Info objects that represents users or customers, or empty list if custom menu is not assigned or has NO_ASSIGN/ALL assignee type.\n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", - "operationId": "getCustomMenuAssigneeList", + "summary": "Get uplink converter metadata (getUplinkConverterMetadata)", + "description": "Returns uplink converter metadata for the vendor, integration type and model", + "operationId": "getUplinkConverterMetadata", "parameters": [ { - "name": "customMenuId", + "name": "integrationType", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], @@ -29064,12 +29127,9 @@ "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "type": "string" } } } @@ -29205,23 +29265,37 @@ ] } }, - "/api/customMenu/{customMenuId}/config": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/payload": { "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Get Custom Menu configuration by id (getCustomMenuConfig)", - "description": "Fetch the Custom Menu configuration based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", - "operationId": "getCustomMenuConfig", + "summary": "Get uplink payload (getUplinkPayload)", + "description": "Returns payload example for the uplink converter for the vendor, integration type and model", + "operationId": "getUplinkPayload", "parameters": [ { - "name": "customMenuId", + "name": "integrationType", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], @@ -29229,9 +29303,9 @@ "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/CustomMenuConfig" + "type": "string" } } } @@ -29365,43 +29439,33 @@ "ApiKeyForm": [] } ] - }, - "put": { + } + }, + "/api/customMenu": { + "get": { "tags": [ "custom-menu-controller" ], - "summary": "Update Custom Menu configuration based on the provided Custom Menu Id (updateCustomMenuConfig)", - "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "updateCustomMenuConfig", + "summary": "Get end-user Custom Menu configuration (getCustomMenu)", + "description": "Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration.", + "operationId": "getCustomMenu", "parameters": [ { - "name": "customMenuId", - "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomMenuConfig" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenu" + "$ref": "#/components/schemas/CustomMenuConfig" } } } @@ -29535,35 +29599,54 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customMenu/{customMenuId}/info": { - "get": { + }, + "post": { "tags": [ "custom-menu-controller" ], - "summary": "Get Custom Menu Info (getCustomMenuInfoById)", - "description": "Fetch the Custom Menu Info object based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", - "operationId": "getCustomMenuInfoById", + "summary": "Create Custom Menu (createCustomMenu)", + "description": "The api is designed to create Custom Menu without configuration. Is not applicable for update.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "createCustomMenu", "parameters": [ { - "name": "customMenuId", - "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "assignToList", + "in": "query", + "description": "A list of entity ids, separated by comma ','", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "force", + "in": "query", + "description": "Use force if you want to create default menu that conflicts with the existing one (old one will be update NO_ASSIGN assignee type)", + "required": false, + "schema": { + "type": "boolean" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuInfo" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenuInfo" + "$ref": "#/components/schemas/CustomMenu" } } } @@ -29579,7 +29662,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -29699,40 +29782,99 @@ ] } }, - "/api/customMenu/{customMenuId}/name": { - "put": { + "/api/customMenu/infos": { + "get": { "tags": [ "custom-menu-controller" ], - "summary": "Update Custom Menu name based on the provided Custom Menu Id (updateCustomMenuName)", - "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "updateCustomMenuName", + "summary": "Get all custom menus configured at user level (getCustomMenuInfos)", + "description": "Returns a page of custom menu info objects owned by the tenant or the customer of a current user, scope and assigneeType request parameters can be used to filter the result.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCustomMenuInfos", "parameters": [ { - "name": "customMenuId", - "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "scope", + "in": "query", + "description": "Custom menu scope.", + "required": false, + "schema": { + "$ref": "#/components/schemas/CMScope" + } + }, + { + "name": "assigneeType", + "in": "query", + "description": "Custom menu assignee type.", + "required": false, + "schema": { + "$ref": "#/components/schemas/CMAssigneeType" + } + }, + { + "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 custom menu name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New name of the custom menu" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomMenuInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -29865,57 +30007,45 @@ ] } }, - "/api/customMenu/{id}/assign/{assigneeType}": { - "put": { + "/api/customMenu/{customMenuId}": { + "delete": { "tags": [ "custom-menu-controller" ], - "summary": "Update custom menu assignee list (updateCustomMenuAssigneeList)", - "description": "The api designed to update the list of assignees or assignee type based on the provided Custom Menu Id. To change assignee type, put new assignee type in path parameter.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "updateCustomMenuAssigneeList", + "summary": "Delete custom menu (deleteCustomMenu)", + "description": "Deletes the custom menu based on the provided Custom Menu Id. Referencing non-existing custom menu Id will cause an error. If the custom menu is assigned to the list of users or customers bad request is returned.To delete a custom menu that has assignee list set 'force' request param to true ", + "operationId": "deleteCustomMenu", "parameters": [ { - "name": "id", + "name": "customMenuId", "in": "path", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", "format": "uuid" } }, - { - "name": "assigneeType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/CMAssigneeType" - } - }, { "name": "force", "in": "query", - "description": "Use force if you want to override default menu", + "description": "Force set to true will unassign menu before deletion", "required": false, "schema": { "type": "boolean" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuDeleteResult" } } } - } - }, - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -30048,22 +30178,23 @@ ] } }, - "/api/translation/custom/merged/{localeCode}": { + "/api/customMenu/{customMenuId}/assigneeList": { "get": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Get end-user Custom Translation configuration (getMergedCustomTranslation)", - "description": "Fetch end-user Custom Translation for specified locale. The custom translation is configured in the white labeling parameters. If custom translation translation is defined on the tenant level, it overrides the custom translation of the system level. Similar, if the custom translation is defined on the customer level, it overrides the translation configuration of the tenant level.", - "operationId": "getMergedCustomTranslation", + "summary": "Get Custom Menu assignee list (getCustomMenuAssigneeList)", + "description": "Fetch the list of Entity Info objects that represents users or customers, or empty list if custom menu is not assigned or has NO_ASSIGN/ALL assignee type.\n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", + "operationId": "getCustomMenuAssigneeList", "parameters": [ { - "name": "localeCode", + "name": "customMenuId", "in": "path", - "description": "Locale code (e.g. 'en_US').", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -30073,7 +30204,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -30209,22 +30343,23 @@ ] } }, - "/api/translation/custom/{localeCode}": { + "/api/customMenu/{customMenuId}/config": { "get": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Get Custom Translation configuration (getCustomTranslation)", - "description": "Fetch the Custom Translation for specified locale that corresponds to the authority of the user. The API call is designed to load the custom translation items for edition. So, the result is NOT merged with the parent level configuration. Let's assume there is a custom translation configured on a system level. And there is no custom translation items configured on a tenant level. In such a case, the API call will return empty object for the tenant administrator. \n\n Response example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getCustomTranslation", + "summary": "Get Custom Menu configuration by id (getCustomMenuConfig)", + "description": "Fetch the Custom Menu configuration based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", + "operationId": "getCustomMenuConfig", "parameters": [ { - "name": "localeCode", + "name": "customMenuId", "in": "path", - "description": "Locale code (e.g. 'en_US').", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -30234,7 +30369,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/CustomMenuConfig" } } } @@ -30369,21 +30504,22 @@ } ] }, - "post": { + "put": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Create Or Update Custom Translation (saveCustomTranslation)", - "description": "Creates or Updates the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "saveCustomTranslation", + "summary": "Update Custom Menu configuration based on the provided Custom Menu Id (updateCustomMenuConfig)", + "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "updateCustomMenuConfig", "parameters": [ { - "name": "localeCode", + "name": "customMenuId", "in": "path", - "description": "Locale code (e.g. 'en_US').", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -30391,7 +30527,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/CustomMenuConfig" } } }, @@ -30399,159 +30535,14 @@ }, "responses": { "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "$ref": "#/components/schemas/CustomMenu" } } } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { - "tags": [ - "custom-translation-controller" - ], - "summary": "Delete Custom Translation for specified locale (deleteCustomTranslation)", - "description": "Delete entire custom translation settings for end-user\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "deleteCustomTranslation", - "parameters": [ - { - "name": "localeCode", - "in": "path", - "description": "Locale code (e.g. 'en_US').", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -30682,38 +30673,38 @@ "ApiKeyForm": [] } ] - }, - "patch": { + } + }, + "/api/customMenu/{customMenuId}/info": { + "get": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Update Custom Translation for specified translation keys only (patchCustomTranslation)", - "description": "The API call is designed to update the custom translation for specified key only. \n\n Request example: \n\n```json\n{\"notification.active\":\"active\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "patchCustomTranslation", + "summary": "Get Custom Menu Info (getCustomMenuInfoById)", + "description": "Fetch the Custom Menu Info object based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", + "operationId": "getCustomMenuInfoById", "parameters": [ { - "name": "localeCode", + "name": "customMenuId", "in": "path", - "description": "Locale code (e.g. 'en_US').", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -30846,42 +30837,36 @@ ] } }, - "/api/translation/custom/{localeCode}/upload": { - "post": { + "/api/customMenu/{customMenuId}/name": { + "put": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Upload Custom Translation (uploadCustomTranslation)", - "description": "Upload the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "uploadCustomTranslation", + "summary": "Update Custom Menu name based on the provided Custom Menu Id (updateCustomMenuName)", + "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "updateCustomMenuName", "parameters": [ { - "name": "localeCode", + "name": "customMenuId", "in": "path", - "description": "Locale code (e.g. 'en_US').", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "requestBody": { "content": { - "multipart/form-data": { + "application/json": { "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] + "type": "string", + "description": "New name of the custom menu" } } - } + }, + "required": true }, "responses": { "200": { @@ -30898,7 +30883,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -31018,34 +31003,54 @@ ] } }, - "/api/translation/custom/{localeCode}/{keyPath}": { - "delete": { + "/api/customMenu/{id}/assign/{assigneeType}": { + "put": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Delete specified key of Custom Translation (deleteCustomTranslationKey) ", - "description": "The API call is designed to delete specified key of the custom translation and return as a result parent translation.(e.g. if tenant translation for key is 'value1' and customer translation is 'value2' then by deletinf key onn customer level you will get 'value1' in response) \n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "deleteCustomTranslationKey", + "summary": "Update custom menu assignee list (updateCustomMenuAssigneeList)", + "description": "The api designed to update the list of assignees or assignee type based on the provided Custom Menu Id. To change assignee type, put new assignee type in path parameter.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "updateCustomMenuAssigneeList", "parameters": [ { - "name": "localeCode", + "name": "id", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { - "name": "keyPath", + "name": "assigneeType", "in": "path", - "description": "A string value representing key of the custom translation (e.g. 'notification.active').", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/CMAssigneeType" + } + }, + { + "name": "force", + "in": "query", + "description": "Use force if you want to override default menu", + "required": false, + "schema": { + "type": "boolean" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, "responses": { "200": { "description": "OK" @@ -31181,85 +31186,32 @@ ] } }, - "/api/customer": { - "post": { + "/api/translation/custom/merged/{localeCode}": { + "get": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Create or update Customer (saveCustomer)", - "description": "Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveCustomer", + "summary": "Get end-user Custom Translation configuration (getMergedCustomTranslation)", + "description": "Fetch end-user Custom Translation for specified locale. The custom translation is configured in the white labeling parameters. If custom translation translation is defined on the tenant level, it overrides the custom translation of the system level. Similar, if the custom translation is defined on the customer level, it overrides the translation configuration of the tenant level.", + "operationId": "getMergedCustomTranslation", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", - "required": false, + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } } ], - "requestBody": { - "description": "A JSON value representing the customer.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/JsonNode" } } } @@ -31275,7 +31227,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -31395,19 +31347,19 @@ ] } }, - "/api/customer/info/{customerId}": { + "/api/translation/custom/{localeCode}": { "get": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Customer info (getCustomerInfoById)", - "description": "Get the Customer info object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerInfoById", + "summary": "Get Custom Translation configuration (getCustomTranslation)", + "description": "Fetch the Custom Translation for specified locale that corresponds to the authority of the user. The API call is designed to load the custom translation items for edition. So, the result is NOT merged with the parent level configuration. Let's assume there is a custom translation configured on a system level. And there is no custom translation items configured on a tenant level. In such a case, the API call will return empty object for the tenant administrator. \n\n Response example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCustomTranslation", "parameters": [ { - "name": "customerId", + "name": "localeCode", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" @@ -31420,7 +31372,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -31554,38 +31506,39 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customer/{customerId}": { - "get": { + }, + "post": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Customer (getCustomerById)", - "description": "Get the Customer object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerById", + "summary": "Create Or Update Custom Translation (saveCustomTranslation)", + "description": "Creates or Updates the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveCustomTranslation", "parameters": [ { - "name": "customerId", + "name": "localeCode", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -31597,7 +31550,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -31718,16 +31671,16 @@ }, "delete": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Delete Customer (deleteCustomer)", - "description": "Deletes the Customer and all customer Users. All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. Referencing non-existing Customer Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteCustomer", + "summary": "Delete Custom Translation for specified locale (deleteCustomTranslation)", + "description": "Delete entire custom translation settings for end-user\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "deleteCustomTranslation", "parameters": [ { - "name": "customerId", + "name": "localeCode", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" @@ -31867,105 +31820,39 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customer/{customerId}/customerInfos": { - "get": { + }, + "patch": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Customer sub-customers Infos (getCustomerCustomerInfos)", - "description": "Returns a page of customer info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerCustomerInfos", + "summary": "Update Custom Translation for specified translation keys only (patchCustomTranslation)", + "description": "The API call is designed to update the custom translation for specified key only. \n\n Request example: \n\n```json\n{\"notification.active\":\"active\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "patchCustomTranslation", "parameters": [ { - "name": "customerId", + "name": "localeCode", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "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/PageDataCustomerInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -32097,35 +31984,46 @@ ] } }, - "/api/customer/{customerId}/shortInfo": { - "get": { + "/api/translation/custom/{localeCode}/upload": { + "post": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get short Customer info (getShortCustomerInfoById)", - "description": "Get the short customer object that contains only the title and 'isPublic' flag. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getShortCustomerInfoById", + "summary": "Upload Custom Translation (uploadCustomTranslation)", + "description": "Upload the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "uploadCustomTranslation", "parameters": [ { - "name": "customerId", + "name": "localeCode", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -32138,7 +32036,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -32258,19 +32156,28 @@ ] } }, - "/api/customer/{customerId}/title": { - "get": { + "/api/translation/custom/{localeCode}/{keyPath}": { + "delete": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Customer Title (getCustomerTitleById)", - "description": "Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerTitleById", + "summary": "Delete specified key of Custom Translation (deleteCustomTranslationKey) ", + "description": "The API call is designed to delete specified key of the custom translation and return as a result parent translation.(e.g. if tenant translation for key is 'value1' and customer translation is 'value2' then by deletinf key onn customer level you will get 'value1' in response) \n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "deleteCustomTranslationKey", "parameters": [ { - "name": "customerId", + "name": "localeCode", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "keyPath", + "in": "path", + "description": "A string value representing key of the custom translation (e.g. 'notification.active').", "required": true, "schema": { "type": "string" @@ -32279,14 +32186,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/text": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -32419,90 +32319,85 @@ ] } }, - "/api/customerInfos/all": { - "get": { + "/api/customer": { + "post": { "tags": [ "customer-controller" ], - "summary": "Get All Customer Infos for current user (getAllCustomerInfos)", - "description": "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. \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": "getAllCustomerInfos", + "summary": "Create or update Customer (saveCustomer)", + "description": "Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveCustomer", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "entityGroupId", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "includeCustomers", + "name": "entityGroupIds", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", "required": false, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } }, { - "name": "textSearch", + "name": "nameConflictPolicy", "in": "query", - "description": "The case insensitive 'substring' filter based on the customer title.", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "sortProperty", + "name": "uniquifySeparator", "in": "query", - "description": "Property of entity to sort by", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "title", - "email", - "country", - "city" - ] + "default": "_" } }, { - "name": "sortOrder", + "name": "uniquifyStrategy", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "description": "A JSON value representing the customer.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCustomerInfo" + "$ref": "#/components/schemas/Customer" } } } @@ -32518,7 +32413,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -32638,72 +32533,23 @@ ] } }, - "/api/customers": { + "/api/customer/info/{customerId}": { "get": { "tags": [ "customer-controller" ], - "summary": "Get Tenant Customers (getCustomers)", - "description": "Returns a page of customers owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomers", + "summary": "Get Customer info (getCustomerInfoById)", + "description": "Get the Customer info object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerInfoById", "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": "customerId", + "in": "path", + "description": "A string value representing the customer 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 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -32712,7 +32558,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCustomer" + "$ref": "#/components/schemas/CustomerInfo" } } } @@ -32848,25 +32694,22 @@ ] } }, - "/api/customers/list": { + "/api/customer/{customerId}": { "get": { "tags": [ "customer-controller" ], - "summary": "Get customers by Customer Ids (getCustomersByIds)", - "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomersByIds", + "summary": "Get Customer (getCustomerById)", + "description": "Get the Customer object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerById", "parameters": [ { - "name": "customerIds", - "in": "query", - "description": "A list of customer ids, separated by comma ','", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -32876,10 +32719,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Customer" - } + "$ref": "#/components/schemas/Customer" } } } @@ -33013,95 +32853,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/customers": { - "get": { + }, + "delete": { "tags": [ "customer-controller" ], - "summary": "Get customers by Entity Group Id (getCustomersByEntityGroupId)", - "description": "Returns a page of Customer objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getCustomersByEntityGroupId", + "summary": "Delete Customer (deleteCustomer)", + "description": "Deletes the Customer and all customer Users. All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. Referencing non-existing Customer Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteCustomer", "parameters": [ { - "name": "entityGroupId", + "name": "customerId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "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/PageDataCustomer" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -33234,23 +33007,90 @@ ] } }, - "/api/tenant/customers": { + "/api/customer/{customerId}/customerInfos": { "get": { "tags": [ "customer-controller" ], - "summary": "Get Tenant Customer by Customer title (getTenantCustomer)", - "description": "Get the Customer using Customer Title. \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": "getTenantCustomer", + "summary": "Get Customer sub-customers Infos (getCustomerCustomerInfos)", + "description": "Returns a page of customer info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerCustomerInfos", "parameters": [ { - "name": "customerTitle", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", "in": "query", - "description": "A string value representing the Customer title.", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the 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", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -33259,7 +33099,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/PageDataCustomerInfo" } } } @@ -33395,72 +33235,23 @@ ] } }, - "/api/user/customers": { + "/api/customer/{customerId}/shortInfo": { "get": { "tags": [ "customer-controller" ], - "summary": "Get Customers (getUserCustomers)", - "description": "Returns a page of customers available for the user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserCustomers", + "summary": "Get short Customer info (getShortCustomerInfoById)", + "description": "Get the short customer object that contains only the title and 'isPublic' flag. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getShortCustomerInfoById", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -33469,7 +33260,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCustomer" + "$ref": "#/components/schemas/JsonNode" } } } @@ -33605,21 +33396,32 @@ ] } }, - "/api/customer/dashboard/home/info": { + "/api/customer/{customerId}/title": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" + ], + "summary": "Get Customer Title (getCustomerTitleById)", + "description": "Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerTitleById", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo)", - "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getCustomerHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/text": { "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" + "type": "string" } } } @@ -33753,27 +33555,95 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/customerInfos/all": { + "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Update Customer Home Dashboard Info (setCustomerHomeDashboardInfo)", - "description": "Update the home dashboard assignment for the current customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "setCustomerHomeDashboardInfo", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" - } + "summary": "Get All Customer Infos for current user (getAllCustomerInfos)", + "description": "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. \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": "getAllCustomerInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the 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", + "title", + "email", + "country", + "city" + ] + } + }, + { + "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/PageDataCustomerInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -33786,7 +33656,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -33906,24 +33776,15 @@ ] } }, - "/api/customer/{customerId}/dashboards": { + "/api/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Customer Dashboards (getCustomerDashboards)", - "description": "Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDashboards", + "summary": "Get Tenant Customers (getCustomers)", + "description": "Returns a page of customers owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomers", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -33944,19 +33805,10 @@ "format": "int32" } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", + "description": "The case insensitive 'substring' filter based on the customer title.", "required": false, "schema": { "type": "string" @@ -33971,7 +33823,10 @@ "type": "string", "enum": [ "createdTime", - "title" + "title", + "email", + "country", + "city" ] } }, @@ -33995,7 +33850,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "$ref": "#/components/schemas/PageDataCustomer" } } } @@ -34131,62 +33986,38 @@ ] } }, - "/api/dashboard": { - "post": { + "/api/customers/list": { + "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Create Or Update Dashboard (saveDashboard)", - "description": "Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDashboard", + "summary": "Get customers by Customer Ids (getCustomersByIds)", + "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomersByIds", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupIds", + "name": "customerIds", "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, + "description": "A list of customer ids, separated by comma ','", + "required": true, "schema": { "type": "array", "items": { "type": "string" } } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], - "requestBody": { - "description": "A JSON value representing the dashboard.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dashboard" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dashboard" + "type": "array", + "items": { + "$ref": "#/components/schemas/Customer" + } } } } @@ -34202,7 +34033,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -34322,27 +34153,93 @@ ] } }, - "/api/dashboard/home": { + "/api/entityGroup/{entityGroupId}/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Home Dashboard (getHomeDashboard)", - "description": "Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getHomeDashboard", + "summary": "Get customers by Entity Group Id (getCustomersByEntityGroupId)", + "description": "Returns a page of Customer objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getCustomersByEntityGroupId", "parameters": [ { - "name": "Accept-Encoding", - "in": "header", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the 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", + "title", + "email", + "country", + "city" + ] + } + }, + { + "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/PageDataCustomer" + } + } + } }, "400": { "description": "Bad Request", @@ -34475,21 +34372,32 @@ ] } }, - "/api/dashboard/home/info": { + "/api/tenant/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" + ], + "summary": "Get Tenant Customer by Customer title (getTenantCustomer)", + "description": "Get the Customer using Customer Title. \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": "getTenantCustomer", + "parameters": [ + { + "name": "customerTitle", + "in": "query", + "description": "A string value representing the Customer title.", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Home Dashboard Info (getHomeDashboardInfo)", - "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" + "$ref": "#/components/schemas/Customer" } } } @@ -34625,23 +34533,72 @@ ] } }, - "/api/dashboard/info/{dashboardId}": { + "/api/user/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Dashboard Info (getDashboardInfoById)", - "description": "Get the information about the dashboard based on 'dashboardId' parameter. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.", - "operationId": "getDashboardInfoById", + "summary": "Get Customers (getUserCustomers)", + "description": "Returns a page of customers available for the user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserCustomers", "parameters": [ { - "name": "dashboardId", - "in": "path", - "description": "A string value representing the dashboard 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": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the 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", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -34650,7 +34607,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DashboardInfo" + "$ref": "#/components/schemas/PageDataCustomer" } } } @@ -34786,23 +34743,21 @@ ] } }, - "/api/dashboard/maxDatapointsLimit": { + "/api/customer/dashboard/home/info": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get max data points limit (getMaxDatapointsLimit)", - "description": "Get the maximum number of data points that dashboard may request from the server per in a single subscription command. This value impacts the time window behavior. It impacts 'Max values' parameter in case user selects 'None' as 'Data aggregation function'. It also impacts the 'Grouping interval' in case of any other 'Data aggregation function' is selected. The actual value of the limit is configurable in the system configuration file.", - "operationId": "getMaxDatapointsLimit", + "summary": "Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo)", + "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCustomerHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64", - "example": 5000 + "$ref": "#/components/schemas/HomeDashboardInfo" } } } @@ -34936,29 +34891,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/dashboard/serverTime": { - "get": { + }, + "post": { "tags": [ "dashboard-controller" ], - "summary": "Get server time (getServerTime)", - "description": "Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust view of the dashboards according to the difference between browser and server time.", - "operationId": "getServerTime", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int64", - "example": 1636023857137 - } + "summary": "Update Customer Home Dashboard Info (setCustomerHomeDashboardInfo)", + "description": "Update the home dashboard assignment for the current customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "setCustomerHomeDashboardInfo", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDashboardInfo" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -34970,7 +34924,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -35090,45 +35044,99 @@ ] } }, - "/api/dashboard/{dashboardId}": { + "/api/customer/{customerId}/dashboards": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get Dashboard (getDashboardById)", - "description": "Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDashboardById", + "summary": "Get Customer Dashboards (getCustomerDashboards)", + "description": "Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDashboards", "parameters": [ { - "name": "dashboardId", + "name": "customerId", "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "includeResources", + "name": "pageSize", "in": "query", - "description": "Export used resources and replace resource links with resource metadata", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", "required": false, "schema": { "type": "boolean" } }, { - "name": "Accept-Encoding", - "in": "header", + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the dashboard title.", "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "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/PageDataDashboardInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -35259,28 +35267,67 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/dashboard": { + "post": { "tags": [ "dashboard-controller" ], - "summary": "Delete the Dashboard (deleteDashboard)", - "description": "Delete the Dashboard. Only users with 'TENANT_ADMIN') authority may delete the dashboards.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDashboard", + "summary": "Create Or Update Dashboard (saveDashboard)", + "description": "Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDashboard", "parameters": [ { - "name": "dashboardId", - "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, "schema": { "type": "string" } } ], + "requestBody": { + "description": "A JSON value representing the dashboard.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + } }, "400": { "description": "Bad Request", @@ -35293,7 +35340,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -35413,25 +35460,21 @@ ] } }, - "/api/dashboards": { + "/api/dashboard/home": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get dashboards by Dashboard Ids (getDashboardsByIds)", - "description": "Returns a list of DashboardInfo 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": "getDashboardsByIds", + "summary": "Get Home Dashboard (getHomeDashboard)", + "description": "Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getHomeDashboard", "parameters": [ { - "name": "dashboardIds", - "in": "query", - "description": "A list of dashboard ids, separated by comma ','", - "required": true, + "name": "Accept-Encoding", + "in": "header", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -35441,10 +35484,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DashboardInfo" - } + "$ref": "#/components/schemas/HomeDashboard" } } } @@ -35580,87 +35620,21 @@ ] } }, - "/api/dashboards/all": { + "/api/dashboard/home/info": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get All Dashboards for current user (getAllDashboards)", - "description": "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. \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": "getAllDashboards", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Home Dashboard Info (getHomeDashboardInfo)", + "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "$ref": "#/components/schemas/HomeDashboardInfo" } } } @@ -35796,78 +35770,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/dashboards": { + "/api/dashboard/info/{dashboardId}": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get dashboards by Entity Group Id (getDashboardsByEntityGroupId)", - "description": "Returns a page of Dashboard objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getDashboardsByEntityGroupId", + "summary": "Get Dashboard Info (getDashboardInfoById)", + "description": "Get the information about the dashboard based on 'dashboardId' parameter. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.", + "operationId": "getDashboardInfoById", "parameters": [ { - "name": "entityGroupId", + "name": "dashboardId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -35876,7 +35795,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "$ref": "#/components/schemas/DashboardInfo" } } } @@ -36012,53 +35931,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/dashboards/export": { + "/api/dashboard/maxDatapointsLimit": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Export Dashboards (exportGroupDashboards)", - "description": "Export the dashboards that belong to specified group id.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "exportGroupDashboards", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "description": "Limit of the entities to export", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } - } - ], + "summary": "Get max data points limit (getMaxDatapointsLimit)", + "description": "Get the maximum number of data points that dashboard may request from the server per in a single subscription command. This value impacts the time window behavior. It impacts 'Max values' parameter in case user selects 'None' as 'Data aggregation function'. It also impacts the 'Grouping interval' in case of any other 'Data aggregation function' is selected. The actual value of the limit is configurable in the system configuration file.", + "operationId": "getMaxDatapointsLimit", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Dashboard" - } + "type": "integer", + "format": "int64", + "example": 5000 } } } @@ -36194,53 +36083,27 @@ ] } }, - "/api/entityGroup/{entityGroupId}/dashboards/import": { - "post": { + "/api/dashboard/serverTime": { + "get": { "tags": [ "dashboard-controller" ], - "summary": "Import Dashboards (importGroupDashboards)", - "description": "Import the dashboards to specified group.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "importGroupDashboards", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "overwrite", - "in": "query", - "description": "Overwrite dashboards with the same name", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "JSON array with the dashboard objects", - "items": { - "$ref": "#/components/schemas/Dashboard" + "summary": "Get server time (getServerTime)", + "description": "Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust view of the dashboards according to the difference between browser and server time.", + "operationId": "getServerTime", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64", + "example": 1636023857137 } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -36252,7 +36115,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -36372,21 +36235,49 @@ ] } }, - "/api/tenant/dashboard/home/info": { + "/api/dashboard/{dashboardId}": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", - "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. \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": "getTenantHomeDashboardInfo", + "summary": "Get Dashboard (getDashboardById)", + "description": "Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDashboardById", + "parameters": [ + { + "name": "dashboardId", + "in": "path", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "includeResources", + "in": "query", + "description": "Export used resources and replace resource links with resource metadata", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" + "$ref": "#/components/schemas/Dashboard" } } } @@ -36521,23 +36412,24 @@ } ] }, - "post": { + "delete": { "tags": [ "dashboard-controller" ], - "summary": "Update Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", - "description": "Update the home dashboard assignment for the current tenant. \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": "setTenantHomeDashboardInfo", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" - } + "summary": "Delete the Dashboard (deleteDashboard)", + "description": "Delete the Dashboard. Only users with 'TENANT_ADMIN') authority may delete the dashboards.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDashboard", + "parameters": [ + { + "name": "dashboardId", + "in": "path", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK" @@ -36553,7 +36445,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -36673,77 +36565,25 @@ ] } }, - "/api/tenant/dashboards": { + "/api/dashboards": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards (getTenantDashboards)", - "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDashboards", + "summary": "Get dashboards by Dashboard Ids (getDashboardsByIds)", + "description": "Returns a list of DashboardInfo 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": "getDashboardsByIds", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "dashboardIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of dashboard ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "mobile", - "in": "query", - "description": "Exclude dashboards that are hidden for mobile", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "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" + } } } ], @@ -36753,7 +36593,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/DashboardInfo" + } } } } @@ -36889,24 +36732,15 @@ ] } }, - "/api/tenant/{tenantId}/dashboards": { + "/api/dashboards/all": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", - "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDashboardsByTenantId", + "summary": "Get All Dashboards for current user (getAllDashboards)", + "description": "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. \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": "getAllDashboards", "parameters": [ - { - "name": "tenantId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -36927,6 +36761,15 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "textSearch", "in": "query", @@ -37105,15 +36948,24 @@ ] } }, - "/api/user/dashboards": { + "/api/entityGroup/{entityGroupId}/dashboards": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get Dashboards (getUserDashboards)", - "description": "Returns a page of Dashboard Info objects available for specified or 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. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.\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": "getUserDashboards", + "summary": "Get dashboards by Entity Group Id (getDashboardsByEntityGroupId)", + "description": "Returns a page of Dashboard objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getDashboardsByEntityGroupId", "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -37134,15 +36986,6 @@ "format": "int32" } }, - { - "name": "mobile", - "in": "query", - "description": "Exclude dashboards that are hidden for mobile", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "textSearch", "in": "query", @@ -37177,20 +37020,181 @@ "DESC" ] } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDashboardInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "operation", - "in": "query", - "description": "Filter by allowed operations for the current user", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/dashboards/export": { + "get": { + "tags": [ + "dashboard-controller" + ], + "summary": "Export Dashboards (exportGroupDashboards)", + "description": "Export the dashboards that belong to specified group id.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "exportGroupDashboards", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } }, { - "name": "userId", + "name": "limit", "in": "query", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Limit of the entities to export", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "Accept-Encoding", + "in": "header", "required": false, "schema": { "type": "string" @@ -37203,7 +37207,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/Dashboard" + } } } } @@ -37339,31 +37346,44 @@ ] } }, - "/api/report/test": { + "/api/entityGroup/{entityGroupId}/dashboards/import": { "post": { "tags": [ - "dashboard-report-controller" + "dashboard-controller" ], - "summary": "Download test report (downloadTestReport)", - "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "downloadTestReport", + "summary": "Import Dashboards (importGroupDashboards)", + "description": "Import the dashboards to specified group.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "importGroupDashboards", "parameters": [ { - "name": "reportsServerEndpointUrl", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "overwrite", "in": "query", - "description": "A string value representing the report server endpoint.", + "description": "Overwrite dashboards with the same name", "required": false, "schema": { - "type": "string" - }, - "example": "http://localhost:8383" + "type": "boolean", + "default": false + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DashboardReportConfig" + "type": "array", + "description": "JSON array with the dashboard objects", + "items": { + "$ref": "#/components/schemas/Dashboard" + } } } }, @@ -37371,27 +37391,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -37524,55 +37524,21 @@ ] } }, - "/api/report/{dashboardId}/download": { - "post": { + "/api/tenant/dashboard/home/info": { + "get": { "tags": [ - "dashboard-report-controller" - ], - "summary": "Download dashboard report (downloadDashboardReport)", - "description": "Generate and download a report from the specified dashboard. The request payload is a JSON object with params of report. For example:\n\n```json\n{\n \"type\": \"pdf\",\n \"timezone\": \"Europe/Kiev\",\n \"timewindow\": {\n \"displayValue\": \"\",\n \"hideInterval\": false,\n \"hideLastInterval\": false,\n \"hideQuickInterval\": false,\n \"hideAggregation\": false,\n \"hideAggInterval\": false,\n \"hideTimezone\": false,\n \"selectedTab\": 0,\n \"realtime\": {\n \"realtimeType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"history\": {\n \"historyType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"fixedTimewindow\": {\n \"startTimeMs\": 1703687976592,\n \"endTimeMs\": 1703774376592\n },\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"aggregation\": {\n \"type\": \"AVG\",\n \"limit\": 25000\n }\n },\n \"state\": null\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "downloadDashboardReport", - "parameters": [ - { - "name": "dashboardId", - "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "dashboard-controller" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", + "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. \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": "getTenantHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/HomeDashboardInfo" } } } @@ -37588,7 +37554,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -37706,38 +37672,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { - "get": { + }, + "post": { "tags": [ - "device-connectivity-controller" + "dashboard-controller" ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Update Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", + "description": "Update the home dashboard assignment for the current tenant. \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": "setTenantHomeDashboardInfo", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDashboardInfo" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -37750,7 +37705,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -37870,23 +37825,78 @@ ] } }, - "/api/device-connectivity/{deviceId}": { + "/api/tenant/dashboards": { "get": { "tags": [ - "device-connectivity-controller" + "dashboard-controller" ], - "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", - "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicePublishTelemetryCommands", + "summary": "Get Tenant Dashboards (getTenantDashboards)", + "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDashboards", "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": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mobile", + "in": "query", + "description": "Exclude dashboards that are hidden for mobile", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the dashboard title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -37895,21 +37905,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" - }, - "examples": { - "http": { - "description": "http", - "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" - }, - "mqtt": { - "description": "mqtt", - "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" - }, - "coap": { - "description": "coap", - "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" - } + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -38045,33 +38041,87 @@ ] } }, - "/api/device-connectivity/{protocol}/certificate/download": { + "/api/tenant/{tenantId}/dashboards": { "get": { "tags": [ - "device-connectivity-controller" + "dashboard-controller" ], - "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", - "description": "Download server certificate.", - "operationId": "downloadServerCertificate", + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", + "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantDashboardsByTenantId", "parameters": [ { - "name": "protocol", + "name": "tenantId", "in": "path", - "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the dashboard title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "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/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -38207,49 +38257,105 @@ ] } }, - "/api/customer/device/{deviceName}/claim": { - "post": { + "/api/user/dashboards": { + "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Claim device (claimDevice)", - "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "claimDevice", + "summary": "Get Dashboards (getUserDashboards)", + "description": "Returns a page of Dashboard Info objects available for specified or 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. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.\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": "getUserDashboards", "parameters": [ { - "name": "deviceName", - "in": "path", - "description": "Unique name of the device which is going to be claimed", + "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": "mobile", + "in": "query", + "description": "Exclude dashboards that are hidden for mobile", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the dashboard title.", + "required": false, "schema": { "type": "string" } }, { - "name": "subCustomerId", + "name": "sortProperty", "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "operation", + "in": "query", + "description": "Filter by allowed operations for the current user", "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClaimRequest" - } + }, + { + "name": "userId", + "in": "query", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -38265,7 +38371,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -38383,32 +38489,58 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/report/test": { + "post": { "tags": [ - "device-controller" + "dashboard-report-controller" ], - "summary": "Reclaim device (reClaimDevice)", - "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "reClaimDevice", + "summary": "Download test report (downloadTestReport)", + "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "downloadTestReport", "parameters": [ { - "name": "deviceName", - "in": "path", - "description": "Unique name of the device which is going to be reclaimed", - "required": true, + "name": "reportsServerEndpointUrl", + "in": "query", + "description": "A string value representing the report server endpoint.", + "required": false, "schema": { "type": "string" - } + }, + "example": "http://localhost:8383" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DashboardReportConfig" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/pdf": { "schema": { - "type": "string" + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } @@ -38424,7 +38556,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -38544,117 +38676,55 @@ ] } }, - "/api/customer/{customerId}/deviceInfos": { - "get": { + "/api/report/{dashboardId}/download": { + "post": { "tags": [ - "device-controller" + "dashboard-report-controller" ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDeviceInfos", + "summary": "Download dashboard report (downloadDashboardReport)", + "description": "Generate and download a report from the specified dashboard. The request payload is a JSON object with params of report. For example:\n\n```json\n{\n \"type\": \"pdf\",\n \"timezone\": \"Europe/Kiev\",\n \"timewindow\": {\n \"displayValue\": \"\",\n \"hideInterval\": false,\n \"hideLastInterval\": false,\n \"hideQuickInterval\": false,\n \"hideAggregation\": false,\n \"hideAggInterval\": false,\n \"hideTimezone\": false,\n \"selectedTab\": 0,\n \"realtime\": {\n \"realtimeType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"history\": {\n \"historyType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"fixedTimewindow\": {\n \"startTimeMs\": 1703687976592,\n \"endTimeMs\": 1703774376592\n },\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"aggregation\": {\n \"type\": \"AVG\",\n \"limit\": 25000\n }\n },\n \"state\": null\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "downloadDashboardReport", "parameters": [ { - "name": "customerId", + "name": "dashboardId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, "schema": { "type": "string" } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/pdf": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } @@ -38670,7 +38740,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -38790,99 +38860,33 @@ ] } }, - "/api/customer/{customerId}/devices": { + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Get Customer Devices (getCustomerDevices)", - "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDevices", + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", "parameters": [ { - "name": "customerId", + "name": "deviceId", "in": "path", - "description": "A string value representing the customer 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" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "string", + "format": "binary" } } } @@ -39018,93 +39022,46 @@ ] } }, - "/api/device": { - "post": { + "/api/device-connectivity/{deviceId}": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Create Or Update Device (saveDevice)", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDevice", + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", "parameters": [ { - "name": "accessToken", - "in": "query", - "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } } ], - "requestBody": { - "description": "A JSON value representing the device.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/JsonNode" + }, + "examples": { + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" + } } } } @@ -39120,7 +39077,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -39240,83 +39197,33 @@ ] } }, - "/api/device-with-credentials": { - "post": { + "/api/device-connectivity/{protocol}/certificate/download": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDeviceWithCredentials", + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, + "name": "protocol", + "in": "path", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "required": true, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", - "required": false, - "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "string", + "format": "binary" } } } @@ -39332,7 +39239,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -39452,23 +39359,41 @@ ] } }, - "/api/device/bulk_import": { + "/api/customer/device/{deviceName}/claim": { "post": { "tags": [ "device-controller" ], - "summary": "Import the bulk of devices (processDevicesBulkImport)", - "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processDevicesBulkImport", + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "claimDevice", + "parameters": [ + { + "name": "deviceName", + "in": "path", + "description": "Unique name of the device which is going to be claimed", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "subCustomerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportRequest" + "$ref": "#/components/schemas/ClaimRequest" } } - }, - "required": true + } }, "responses": { "200": { @@ -39476,7 +39401,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultDevice" + "type": "string" } } } @@ -39610,33 +39535,32 @@ "ApiKeyForm": [] } ] - } - }, - "/api/device/credentials": { - "post": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "updateDeviceCredentials", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } + "summary": "Reclaim device (reClaimDevice)", + "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "reClaimDevice", + "parameters": [ + { + "name": "deviceName", + "in": "path", + "description": "Unique name of the device which is going to be reclaimed", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "type": "string" } } } @@ -39652,7 +39576,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -39772,23 +39696,108 @@ ] } }, - "/api/device/info/{deviceId}": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ "device-controller" ], - "summary": "Get Device (getDeviceInfoById)", - "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceInfoById", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDeviceInfos", "parameters": [ { - "name": "deviceId", + "name": "customerId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { "type": "string" } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -39797,7 +39806,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceInfo" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -39933,24 +39942,99 @@ ] } }, - "/api/device/types": { + "/api/customer/{customerId}/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get Device Types (getDeviceTypes)", - "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceTypes", + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDevices", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -40076,7 +40160,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -40087,25 +40170,86 @@ ] } }, - "/api/device/{deviceId}": { - "get": { + "/api/device": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Device (getDeviceById)", - "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceById", + "summary": "Create Or Update Device (saveDevice)", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDevice", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "accessToken", + "in": "query", + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", + "in": "query", + "required": false, "schema": { "type": "string" } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } } ], + "requestBody": { + "description": "A JSON value representing the device.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -40128,7 +40272,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40246,28 +40390,88 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/device-with-credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Delete device (deleteDevice)", - "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteDevice", + "summary": "Create Device (saveDevice) with credentials ", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDeviceWithCredentials", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, "schema": { "type": "string" } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } }, "400": { "description": "Bad Request", @@ -40280,7 +40484,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40400,32 +40604,31 @@ ] } }, - "/api/device/{deviceId}/credentials": { - "get": { + "/api/device/bulk_import": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", - "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", - "operationId": "getDeviceCredentialsByDeviceId", - "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": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -40441,7 +40644,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40561,108 +40764,31 @@ ] } }, - "/api/deviceInfos/all": { - "get": { + "/api/device/credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Get All Device Infos for current user (getAllDeviceInfos)", - "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllDeviceInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -40678,7 +40804,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -40798,25 +40924,22 @@ ] } }, - "/api/devices": { + "/api/device/info/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Get Devices By Ids (getDevicesByIds)", - "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDevicesByIds", + "summary": "Get Device (getDeviceInfoById)", + "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceInfoById", "parameters": [ { - "name": "deviceIds", - "in": "query", - "description": "A list of devices ids, separated by comma ','", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -40826,10 +40949,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "$ref": "#/components/schemas/DeviceInfo" } } } @@ -40963,24 +41083,16 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/device/types": { + "get": { "tags": [ "device-controller" ], - "summary": "Find related devices (findDevicesByQuery)", - "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findDevicesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" - } - } - }, - "required": true - }, + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", @@ -40989,7 +41101,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/EntitySubtype" } } } @@ -41006,7 +41118,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -41116,6 +41228,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -41126,32 +41239,19 @@ ] } }, - "/api/devices/count/{otaPackageType}/{deviceProfileId}": { + "/api/device/{deviceId}": { "get": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceProfileAndEmptyOtaPackage", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceById", "parameters": [ { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "deviceProfileId", + "name": "deviceId", "in": "path", - "description": "Device Profile Id. I.g. '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" @@ -41164,8 +41264,7 @@ "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/Device" } } } @@ -41299,41 +41398,173 @@ "ApiKeyForm": [] } ] - } - }, - "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { - "get": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceGroupAndEmptyOtaPackage", + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteDevice", "parameters": [ { - "name": "otaPackageType", + "name": "deviceId", "in": "path", - "description": "OTA package type", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] + "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" }, - { - "name": "otaPackageId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "entityGroupId", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/device/{deviceId}/credentials": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", + "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", + "operationId": "getDeviceCredentialsByDeviceId", + "parameters": [ + { + "name": "deviceId", "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -41346,8 +41577,7 @@ "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -41483,32 +41713,23 @@ ] } }, - "/api/entityGroup/{entityGroupId}/devices": { + "/api/deviceInfos/all": { "get": { "tags": [ "device-controller" ], - "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", - "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getDevicesByEntityGroupId", + "summary": "Get All Device Infos for current user (getAllDeviceInfos)", + "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllDeviceInfos", "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -41517,8 +41738,35 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" } }, { @@ -41566,7 +41814,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -41702,22 +41950,25 @@ ] } }, - "/api/tenant/device": { + "/api/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device (getTenantDevice)", - "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDeviceByName", + "summary": "Get Devices By Ids (getDevicesByIds)", + "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDevicesByIds", "parameters": [ { - "name": "deviceName", + "name": "deviceIds", "in": "query", - "description": "A string value representing the Device name.", + "description": "A list of devices ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -41727,7 +41978,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -41861,82 +42115,198 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/devices": { - "get": { + }, + "post": { "tags": [ "device-controller" ], - "summary": "Get Tenant Devices (getTenantDevices)", - "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDevices", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "summary": "Find related devices (findDevicesByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findDevicesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceSearchQuery" + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } } }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, - "schema": { - "type": "string" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceProfileAndEmptyOtaPackage", + "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, "schema": { "type": "string", "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" + "FIRMWARE", + "SOFTWARE" ] } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "deviceProfileId", + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -41946,7 +42316,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "type": "integer", + "format": "int64" } } } @@ -42082,28 +42453,39 @@ ] } }, - "/api/tenant/{tenantId}/device/{deviceId}": { - "post": { + "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { + "get": { "tags": [ "device-controller" ], - "summary": "Assign device to tenant (assignDeviceToTenant)", - "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", - "operationId": "assignDeviceToTenant", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceGroupAndEmptyOtaPackage", "parameters": [ { - "name": "tenantId", + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "otaPackageId", "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "deviceId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -42116,7 +42498,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "integer", + "format": "int64" } } } @@ -42132,7 +42515,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -42252,15 +42635,24 @@ ] } }, - "/api/user/devices": { + "/api/entityGroup/{entityGroupId}/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get Devices (getUserDevices)", - "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserDevices", + "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", + "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getDevicesByEntityGroupId", "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -42281,15 +42673,6 @@ "minimum": 0 } }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", @@ -42471,30 +42854,32 @@ ] } }, - "/api/deviceGroupOtaPackage": { - "post": { + "/api/tenant/device": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "saveDeviceGroupOtaPackage", - "operationId": "saveDeviceGroupOtaPackage", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" - } + "summary": "Get Tenant Device (getTenantDevice)", + "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDeviceByName", + "parameters": [ + { + "name": "deviceName", + "in": "query", + "description": "A string value representing the Device name.", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/Device" } } } @@ -42510,7 +42895,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -42630,29 +43015,81 @@ ] } }, - "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { + "/api/tenant/devices": { "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "getFirmwareById", - "operationId": "getFirmwareById", + "summary": "Get Tenant Devices (getTenantDevices)", + "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDevices", "parameters": [ { - "name": "groupId", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "firmwareType", - "in": "path", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -42661,7 +43098,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -42797,17 +43234,28 @@ ] } }, - "/api/deviceGroupOtaPackage/{id}": { - "delete": { + "/api/tenant/{tenantId}/device/{deviceId}": { + "post": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "deleteDeviceGroupOtaPackage", - "operationId": "deleteDeviceGroupOtaPackage", + "summary": "Assign device to tenant (assignDeviceToTenant)", + "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", + "operationId": "assignDeviceToTenant", "parameters": [ { - "name": "id", + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -42816,7 +43264,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } }, "400": { "description": "Bad Request", @@ -42829,7 +43284,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -42949,31 +43404,90 @@ ] } }, - "/api/deviceProfile": { - "post": { + "/api/user/devices": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Create Or Update Device Profile (saveDeviceProfile)", - "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"alarms\":[\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"alarms\":[\n {\n \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\",\n \"alarmType\":\"Temperature Alarm\",\n \"clearRule\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"propagate\":false,\n \"createRules\":{\n \"MAJOR\":{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"COMPLEX\",\n \"operation\":\"OR\",\n \"predicates\":[\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"LESS_OR_EQUAL\"\n },\n {\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":30.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n }\n ]\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"WARNING\":{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n },\n \"condition\":{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":null\n }\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"tempConstant\",\n \"type\":\"CONSTANT\"\n },\n \"value\":30,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":0.0,\n \"dynamicValue\":{\n \"inherit\":false,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempThreshold\"\n }\n },\n \"operation\":\"EQUAL\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n },\n \"CRITICAL\":{\n \"schedule\":null,\n \"condition\":{\n \"spec\":{\n \"type\":\"SIMPLE\"\n },\n \"condition\":[\n {\n \"key\":{\n \"key\":\"temperature\",\n \"type\":\"TIME_SERIES\"\n },\n \"value\":null,\n \"predicate\":{\n \"type\":\"NUMERIC\",\n \"value\":{\n \"userValue\":null,\n \"defaultValue\":50.0,\n \"dynamicValue\":null\n },\n \"operation\":\"GREATER\"\n },\n \"valueType\":\"NUMERIC\"\n }\n ]\n },\n \"dashboardId\":null,\n \"alarmDetails\":null\n }\n },\n \"propagateRelationTypes\":null\n }\n ],\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:\n\n# Alarm Schedule\n\nAlarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, \n\n```json\n\"schedule\": null\n```\n\nmeans alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week:\n\n## Specific Time Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"SPECIFIC_TIME\",\n \"endsOn\":64800000,\n \"startsOn\":43200000,\n \"timezone\":\"Europe/Kiev\",\n \"daysOfWeek\":[\n 1,\n 3,\n 5\n ]\n }\n}\n```\n\n## Custom Schedule\n\n```json\n{\n \"schedule\":{\n \"type\":\"CUSTOM\",\n \"items\":[\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":1\n },\n {\n \"endsOn\":64800000,\n \"enabled\":true,\n \"startsOn\":43200000,\n \"dayOfWeek\":2\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":3\n },\n {\n \"endsOn\":57600000,\n \"enabled\":true,\n \"startsOn\":36000000,\n \"dayOfWeek\":4\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":5\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":6\n },\n {\n \"endsOn\":0,\n \"enabled\":false,\n \"startsOn\":0,\n \"dayOfWeek\":7\n }\n ],\n \"timezone\":\"Europe/Kiev\"\n }\n}\n```\n\n# Alarm condition type (**'spec'**)\n\nAlarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes.\n\nNote, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent).\n\n**'sourceType'** of the **'sourceAttribute'** can be: \n * 'CURRENT_DEVICE';\n * 'CURRENT_CUSTOMER';\n * 'CURRENT_TENANT'.\n\n**'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER).\n\n## Repeating alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"REPEATING\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":5,\n \"dynamicValue\":{\n \"inherit\":true,\n \"sourceType\":\"CURRENT_DEVICE\",\n \"sourceAttribute\":\"tempAttr\"\n }\n }\n }\n}\n```\n\n## Duration alarm condition\n\n```json\n{\n \"spec\":{\n \"type\":\"DURATION\",\n \"unit\":\"MINUTES\",\n \"predicate\":{\n \"userValue\":null,\n \"defaultValue\":30,\n \"dynamicValue\":null\n }\n }\n}\n```\n\n**'unit'** can be: \n * 'SECONDS';\n * 'MINUTES';\n * 'HOURS';\n * 'DAYS'.\n\n# Key Filters\n\nKey filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object:\n\n## Alarm Filter Key\n\nFilter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported:\n * 'ATTRIBUTE' - used for attributes values;\n * 'TIME_SERIES' - used for time series values;\n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type;\n * 'CONSTANT' - constant value specified.\n\nLet's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\nYou may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below:\n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"userValue\": null,\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"inherit\": false,\n \"sourceType\": \"CURRENT_TENANT\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nNote that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true.\n\n# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveDeviceProfile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } + "summary": "Get Devices (getUserDevices)", + "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserDevices", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "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/DeviceProfile" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -42989,7 +43503,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -43109,35 +43623,30 @@ ] } }, - "/api/deviceProfile/devices/keys/attributes": { - "get": { + "/api/deviceGroupOtaPackage": { + "post": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get attribute keys (getAttributesKeys)", - "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAttributesKeys", - "parameters": [ - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" + "summary": "saveDeviceGroupOtaPackage", + "operationId": "saveDeviceGroupOtaPackage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -43153,7 +43662,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -43273,20 +43782,26 @@ ] } }, - "/api/deviceProfile/devices/keys/timeseries": { + "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { "get": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", - "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileTimeseriesKeys", + "summary": "getFirmwareById", + "operationId": "getFirmwareById", "parameters": [ { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "name": "groupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "firmwareType", + "in": "path", + "required": true, "schema": { "type": "string" } @@ -43298,10 +43813,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -43437,39 +43949,26 @@ ] } }, - "/api/deviceProfile/names": { - "get": { + "/api/deviceGroupOtaPackage/{id}": { + "delete": { "tags": [ - "device-profile-controller" + "device-group-ota-package-controller" ], - "summary": "Get Device Profile names (getDeviceProfileNames)", - "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileNames", + "summary": "deleteDeviceGroupOtaPackage", + "operationId": "deleteDeviceGroupOtaPackage", "parameters": [ { - "name": "activeOnly", - "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -43602,34 +44101,24 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}": { - "get": { + "/api/deviceProfile": { + "post": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile (getDeviceProfileById)", - "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileById", - "parameters": [ - { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Device Profile (saveDeviceProfile)", + "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveDeviceProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -43652,7 +44141,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -43770,20 +44259,22 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/deviceProfile/devices/keys/attributes": { + "get": { "tags": [ "device-profile-controller" ], - "summary": "Delete device profile (deleteDeviceProfile)", - "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDeviceProfile", + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAttributesKeys", "parameters": [ { "name": "deviceProfileId", - "in": "path", + "in": "query", "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "required": false, "schema": { "type": "string" } @@ -43791,7 +44282,17 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } }, "400": { "description": "Bad Request", @@ -43924,20 +44425,20 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}/default": { - "post": { + "/api/deviceProfile/devices/keys/timeseries": { + "get": { "tags": [ "device-profile-controller" ], - "summary": "Make Device Profile Default (setDefaultDeviceProfile)", - "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultDeviceProfile", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", + "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { "name": "deviceProfileId", - "in": "path", + "in": "query", "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "required": false, "schema": { "type": "string" } @@ -43949,7 +44450,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "type": "array", + "items": { + "type": "string" + } } } } @@ -43965,7 +44469,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -44085,21 +44589,36 @@ ] } }, - "/api/deviceProfileInfo/default": { + "/api/deviceProfile/names": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", - "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultDeviceProfileInfo", + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", + "parameters": [ + { + "name": "activeOnly", + "in": "query", + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -44235,14 +44754,14 @@ ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { + "/api/deviceProfile/{deviceProfileId}": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Info (getDeviceProfileInfoById)", - "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfoById", + "summary": "Get Device Profile (getDeviceProfileById)", + "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileById", "parameters": [ { "name": "deviceProfileId", @@ -44252,6 +44771,15 @@ "schema": { "type": "string" } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -44260,7 +44788,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -44394,103 +44922,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/deviceProfileInfos": { - "get": { + }, + "delete": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", - "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfos", + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "transportType", - "in": "query", - "description": "Type of the transport", - "required": false, - "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -44623,25 +45076,22 @@ ] } }, - "/api/deviceProfileInfos/list": { - "get": { + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", - "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceProfileInfosByIds", + "summary": "Make Device Profile Default (setDefaultDeviceProfile)", + "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultDeviceProfile", "parameters": [ { - "name": "deviceProfileIds", - "in": "query", - "description": "A list of device profile ids, separated by comma ','", + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -44651,10 +45101,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" - } + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -44670,7 +45117,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -44790,82 +45237,21 @@ ] } }, - "/api/deviceProfiles": { + "/api/deviceProfileInfo/default": { "get": { "tags": [ "device-profile-controller" ], - "summary": "Get Device Profiles (getDeviceProfiles)", - "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfiles", - "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 device profile name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "transportType", - "description", - "isDefault" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", + "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -45001,45 +45387,32 @@ ] } }, - "/api/domain": { - "post": { + "/api/deviceProfileInfo/{deviceProfileId}": { + "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Save or Update Domain (saveDomain)", - "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDomain", + "summary": "Get Device Profile Info (getDeviceProfileInfoById)", + "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfoById", "parameters": [ { - "name": "oauth2ClientIds", - "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", - "required": false, + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Domain" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -45055,7 +45428,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -45175,22 +45548,88 @@ ] } }, - "/api/domain/cloud/info/{id}": { + "/api/deviceProfileInfos": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getCloudDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCloudDomainInfoById", + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", "parameters": [ { - "name": "id", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] } } ], @@ -45200,7 +45639,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" } } } @@ -45336,22 +45775,25 @@ ] } }, - "/api/domain/info/{id}": { + "/api/deviceProfileInfos/list": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfoById", + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", + "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceProfileInfosByIds", "parameters": [ { - "name": "id", - "in": "path", + "name": "deviceProfileIds", + "in": "query", + "description": "A list of device profile ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -45361,7 +45803,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } } } } @@ -45497,14 +45942,14 @@ ] } }, - "/api/domain/infos": { + "/api/deviceProfiles": { "get": { "tags": [ - "domain-controller" + "device-profile-controller" ], - "summary": "Get Domain infos (getDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfos", + "summary": "Get Device Profiles (getDeviceProfiles)", + "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfiles", "parameters": [ { "name": "pageSize", @@ -45529,7 +45974,7 @@ { "name": "textSearch", "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", + "description": "The case insensitive 'substring' filter based on the device profile name.", "required": false, "schema": { "type": "string" @@ -45541,7 +45986,15 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] } }, { @@ -45550,7 +46003,11 @@ "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -45560,7 +46017,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } @@ -45696,28 +46153,48 @@ ] } }, - "/api/domain/{id}": { - "delete": { + "/api/domain": { + "post": { "tags": [ "domain-controller" ], - "summary": "Delete Domain by ID (deleteDomain)", - "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDomain", + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDomain", "parameters": [ { - "name": "id", - "in": "path", - "required": true, + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } }, "400": { "description": "Bad Request", @@ -45730,7 +46207,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -45850,14 +46327,14 @@ ] } }, - "/api/domain/{id}/oauth2Clients": { - "put": { + "/api/domain/cloud/info/{id}": { + "get": { "tags": [ "domain-controller" ], - "summary": "Update oauth2 clients (updateOauth2Clients)", - "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "updateOauth2Clients", + "summary": "Get Domain info by Id (getCloudDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCloudDomainInfoById", "parameters": [ { "name": "id", @@ -45869,24 +46346,17 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CloudDomainInfo" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -46018,98 +46488,22 @@ ] } }, - "/api/customer/{customerId}/edgeInfos": { + "/api/domain/info/{id}": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEdgeInfos", + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfoById", "parameters": [ { - "name": "customerId", + "name": "id", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -46119,7 +46513,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -46255,24 +46649,15 @@ ] } }, - "/api/customer/{customerId}/edges": { + "/api/domain/infos": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Customer Edges (getCustomerEdges)", - "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdges", + "summary": "Get Domain infos (getDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfos", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -46293,19 +46678,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", + "description": "Case-insensitive 'substring' filter based on domain's name", "required": false, "schema": { "type": "string" @@ -46317,14 +46693,7 @@ "description": "Property of entity to sort by", "required": false, "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "type": "string" } }, { @@ -46333,11 +46702,7 @@ "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -46347,7 +46712,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -46483,56 +46848,28 @@ ] } }, - "/api/edge": { - "post": { + "/api/domain/{id}": { + "delete": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Create Or Update Edge (saveEdge)", - "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", - "operationId": "saveEdge", + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDomain", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, + "name": "id", + "in": "path", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "format": "uuid" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -46545,7 +46882,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -46665,19 +47002,34 @@ ] } }, - "/api/edge/bulk_import": { - "post": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-controller" + ], + "summary": "Update oauth2 clients (updateDomainOauth2Clients)", + "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "updateDomainOauth2Clients", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Import the bulk of edges (processEdgesBulkImport)", - "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "processEdgesBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportRequest" + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } } } }, @@ -46685,14 +47037,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportResultEdge" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -46705,7 +47050,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -46825,23 +47170,99 @@ ] } }, - "/api/edge/info/{edgeId}": { + "/api/customer/{customerId}/edgeInfos": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Info (getEdgeInfoById)", - "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInfoById", + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEdgeInfos", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -46850,7 +47271,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -46986,35 +47407,88 @@ ] } }, - "/api/edge/instructions/install/{edgeId}/{method}": { + "/api/customer/{customerId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInstallInstructions", + "summary": "Get Customer Edges (getCustomerEdges)", + "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdges", "parameters": [ { - "name": "edgeId", + "name": "customerId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "method", - "in": "path", - "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", "enum": [ - "docker", - "ubuntu", - "centos" + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" ] } } @@ -47025,7 +47499,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -47161,46 +47635,53 @@ ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { - "get": { + "/api/edge": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeUpgradeInstructions", + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", + "operationId": "saveEdge", "parameters": [ { - "name": "edgeVersion", - "in": "path", - "description": "Edge version", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, "schema": { "type": "string" } }, { - "name": "method", - "in": "path", - "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", - "required": true, + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, "schema": { - "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/Edge" } } } @@ -47216,7 +47697,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47336,32 +47817,31 @@ ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { - "get": { + "/api/edge/bulk_import": { + "post": { "tags": [ "edge-controller" ], - "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", - "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findMissingToRelatedRuleChains", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -47377,7 +47857,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47497,14 +47977,14 @@ ] } }, - "/api/edge/sync/{edgeId}": { - "post": { + "/api/edge/info/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Sync edge (syncEdge)", - "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "syncEdge", + "summary": "Get Edge Info (getEdgeInfoById)", + "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInfoById", "parameters": [ { "name": "edgeId", @@ -47522,7 +48002,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -47538,7 +48018,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -47658,28 +48138,225 @@ ] } }, - "/api/edge/types": { + "/api/edge/instructions/install/{edgeId}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge Types (getEdgeTypes)", - "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeTypes", + "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInstallInstructions", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" + "$ref": "#/components/schemas/EdgeInstructions" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } } } } } }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeUpgradeInstructions", + "parameters": [ + { + "name": "edgeVersion", + "in": "path", + "description": "Edge version", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "method", + "in": "path", + "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeInstructions" + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -47811,14 +48488,14 @@ ] } }, - "/api/edge/{edgeId}": { + "/api/edge/missingToRelatedRuleChains/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edge (getEdgeById)", - "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeById", + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", "parameters": [ { "name": "edgeId", @@ -47836,7 +48513,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "type": "string" } } } @@ -47970,14 +48647,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/sync/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Delete edge (deleteEdge)", - "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEdge", + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", "parameters": [ { "name": "edgeId", @@ -47991,7 +48670,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -48004,7 +48690,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -48124,32 +48810,24 @@ ] } }, - "/api/edge/{edgeId}/upgrade/available": { + "/api/edge/types": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "summary": "Get Edge Types (getEdgeTypes)", + "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -48285,14 +48963,14 @@ ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { - "post": { + "/api/edge/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", - "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeRootRuleChain", + "summary": "Get Edge (getEdgeById)", + "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeById", "parameters": [ { "name": "edgeId", @@ -48302,15 +48980,6 @@ "schema": { "type": "string" } - }, - { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -48335,7 +49004,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -48453,91 +49122,176 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edgeInfos/all": { - "get": { + }, + "delete": { "tags": [ "edge-controller" ], - "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", - "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeInfos", + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } + } + }, + "security": [ + { + "HttpLoginForm": [] }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "ApiKeyForm": [] + } + ] + } + }, + "/api/edge/{edgeId}/upgrade/available": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -48547,7 +49301,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" + "type": "boolean" } } } @@ -48683,72 +49437,32 @@ ] } }, - "/api/edges": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdges", + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "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": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -48757,7 +49471,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/Edge" } } } @@ -48773,7 +49487,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -48891,34 +49605,101 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/edgeInfos/all": { + "get": { "tags": [ "edge-controller" ], - "summary": "Find related edges (findEdgesByQuery)", - "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEdgesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeSearchQuery" - } + "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", + "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -48934,7 +49715,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49054,21 +49835,81 @@ ] } }, - "/api/edges/enabled": { + "/api/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -49202,30 +50043,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edges/list": { - "get": { + }, + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edges By Ids (getEdgeList)", - "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeList", - "parameters": [ - { - "name": "edgeIds", - "in": "query", - "description": "A list of edges ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Find related edges (findEdgesByQuery)", + "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEdgesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeSearchQuery" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -49251,7 +50086,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49371,90 +50206,21 @@ ] } }, - "/api/entityGroup/{entityGroupId}/edges": { + "/api/edges/enabled": { "get": { "tags": [ "edge-controller" ], - "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", - "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEdgesByEntityGroupId", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "boolean" } } } @@ -49590,29 +50356,25 @@ ] } }, - "/api/license/activateInstance": { - "post": { + "/api/edges/list": { + "get": { "tags": [ "edge-controller" ], - "summary": "Activate edge instance (activateInstance)", - "description": "Activates edge license on license portal.", - "operationId": "activateInstance", + "summary": "Get Edges By Ids (getEdgeList)", + "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeList", "parameters": [ { - "name": "licenseSecret", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "releaseDate", + "name": "edgeIds", "in": "query", + "description": "A list of edges ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -49622,7 +50384,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -49638,7 +50403,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49758,31 +50523,90 @@ ] } }, - "/api/license/checkInstance": { - "post": { + "/api/entityGroup/{entityGroupId}/edges": { + "get": { "tags": [ "edge-controller" ], - "summary": "Check edge license (checkInstance)", - "description": "Checks license request from edge service by forwarding request to license portal.", - "operationId": "checkInstance", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", + "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEdgesByEntityGroupId", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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": 1 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -49798,7 +50622,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -49918,19 +50742,26 @@ ] } }, - "/api/tenant/edge": { - "get": { + "/api/license/activateInstance": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge by name (getTenantEdgeByName)", - "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeByName", + "summary": "Activate edge instance (activateInstance)", + "description": "Activates edge license on license portal.", + "operationId": "activateInstance", "parameters": [ { - "name": "edgeName", + "name": "licenseSecret", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "releaseDate", "in": "query", - "description": "Unique name of the edge", "required": true, "schema": { "type": "string" @@ -49943,7 +50774,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/JsonNode" } } } @@ -49959,7 +50790,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -50079,90 +50910,31 @@ ] } }, - "/api/tenant/edges": { - "get": { + "/api/license/checkInstance": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getTenantEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdges", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "summary": "Check edge license (checkInstance)", + "description": "Checks license request from edge service by forwarding request to license portal.", + "operationId": "checkInstance", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, - { - "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/PageDataEdge" + "$ref": "#/components/schemas/JsonNode" } } } @@ -50178,7 +50950,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -50298,81 +51070,23 @@ ] } }, - "/api/user/edges": { + "/api/tenant/edge": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Edges (getUserEdges)", - "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEdges", + "summary": "Get Tenant Edge by name (getTenantEdgeByName)", + "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeByName", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "edgeName", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Unique name of the edge", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -50381,7 +51095,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "$ref": "#/components/schemas/Edge" } } } @@ -50517,24 +51231,15 @@ ] } }, - "/api/edge/{edgeId}/events": { + "/api/tenant/edges": { "get": { "tags": [ - "edge-event-controller" + "edge-controller" ], - "summary": "Get Edge Events (getEdgeEvents)", - "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEdgeEvents", + "summary": "Get Tenant Edges (getTenantEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdges", "parameters": [ - { - "name": "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", @@ -50555,10 +51260,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge event type name.", + "description": "The case insensitive 'substring' filter based on the edge name.", "required": false, "schema": { "type": "string" @@ -50592,26 +51306,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Edge events with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Edge events with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -50620,7 +51314,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -50756,24 +51450,90 @@ ] } }, - "/api/entities/vc/branches": { + "/api/user/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" + ], + "summary": "Get Edges (getUserEdges)", + "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "List branches (listBranches)", - "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", - "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -50909,42 +51669,101 @@ ] } }, - "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { + "/api/edge/{edgeId}/events": { "get": { "tags": [ - "entities-version-control-controller" + "edge-event-controller" ], - "summary": "Compare entity data to version (compareEntityDataToVersion)", - "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "compareEntityDataToVersion", + "summary": "Get Edge Events (getEdgeEvents)", + "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEdgeEvents", "parameters": [ { - "name": "entityType", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string" } }, { - "name": "internalEntityUuid", - "in": "path", - "description": "A string value representing the entity 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", - "format": "uuid" + "type": "integer", + "format": "int32" } }, { - "name": "versionId", + "name": "page", "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge event type name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Edge events with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Edge events with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -50953,7 +51772,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -51089,32 +51908,24 @@ ] } }, - "/api/entities/vc/entity": { - "post": { + "/api/entities/vc/branches": { + "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Load entities version (loadEntitiesVersion)", - "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "loadEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionLoadRequest" - } - } - }, - "required": true - }, + "summary": "List branches (listBranches)", + "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", + "operationId": "listBranches", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "$ref": "#/components/schemas/BranchInfo" + } } } } @@ -51130,7 +51941,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -51250,14 +52061,14 @@ ] } }, - "/api/entities/vc/entity/{entityType}/{versionId}": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entities at version (listEntitiesAtVersion)", - "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntitiesAtVersion", + "summary": "Compare entity data to version (compareEntityDataToVersion)", + "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "compareEntityDataToVersion", "parameters": [ { "name": "entityType", @@ -51269,8 +52080,18 @@ } }, { - "name": "versionId", + "name": "internalEntityUuid", "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "versionId", + "in": "query", "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { @@ -51284,10 +52105,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "$ref": "#/components/schemas/EntityDataDiff" } } } @@ -51423,33 +52241,32 @@ ] } }, - "/api/entities/vc/entity/{requestId}/status": { - "get": { + "/api/entities/vc/entity": { + "post": { "tags": [ "entities-version-control-controller" ], - "summary": "Get version load request status (getVersionLoadRequestStatus)", - "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionLoadRequestStatus", - "parameters": [ - { - "name": "requestId", - "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" + "summary": "Load entities version (loadEntitiesVersion)", + "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "loadEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "type": "string", + "format": "uuid" } } } @@ -51465,7 +52282,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -51585,15 +52402,24 @@ ] } }, - "/api/entities/vc/entity/{versionId}": { + "/api/entities/vc/entity/{entityType}/{versionId}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List all entities at version (listAllEntitiesAtVersion)", - "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listAllEntitiesAtVersion", + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, { "name": "versionId", "in": "path", @@ -51749,52 +52575,24 @@ ] } }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/entity/{requestId}/status": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Get entity data info (getEntityDataInfo)", - "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEntityDataInfo", + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionLoadRequestStatus", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", + "name": "requestId", "in": "path", - "description": "A string value representing external entity id", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", "format": "uuid" } - }, - { - "name": "internalEntityId", - "in": "query", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } } ], "responses": { @@ -51803,7 +52601,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "$ref": "#/components/schemas/VersionLoadResult" } } } @@ -51939,77 +52737,23 @@ ] } }, - "/api/entities/vc/version": { + "/api/entities/vc/entity/{versionId}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List all versions (listVersions)", - "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listVersions", + "summary": "List all entities at version (listAllEntitiesAtVersion)", + "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listAllEntitiesAtVersion", "parameters": [ { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -52018,7 +52762,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -52152,32 +52899,63 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { + "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Save entities version (saveEntitiesVersion)", - "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionCreateRequest" - } + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "internalEntityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -52193,7 +52971,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -52313,24 +53091,15 @@ ] } }, - "/api/entities/vc/version/{entityType}": { + "/api/entities/vc/version": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity type versions (listEntityTypeVersions)", - "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityTypeVersions", + "summary": "List all versions (listVersions)", + "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listVersions", "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, { "name": "branch", "in": "query", @@ -52535,16 +53304,175 @@ "ApiKeyForm": [] } ] + }, + "post": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "Save entities version (saveEntitiesVersion)", + "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "uuid" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/entities/vc/version/{entityType}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityVersions", + "summary": "List entity type versions (listEntityTypeVersions)", + "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityTypeVersions", "parameters": [ { "name": "entityType", @@ -52555,16 +53483,6 @@ "$ref": "#/components/schemas/EntityType" } }, - { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, { "name": "branch", "in": "query", @@ -52574,15 +53492,6 @@ "type": "string" } }, - { - "name": "internalEntityId", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, { "name": "pageSize", "in": "query", @@ -52780,24 +53689,105 @@ ] } }, - "/api/entities/vc/version/{requestId}/status": { + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { "get": { "tags": [ "entities-version-control-controller" ], - "summary": "Get version create request status (getVersionCreateRequestStatus)", - "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionCreateRequestStatus", + "summary": "List entity versions (listEntityVersions)", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", "parameters": [ { - "name": "requestId", + "name": "entityType", "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", "required": true, "schema": { "type": "string", "format": "uuid" } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "internalEntityId", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -52806,7 +53796,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -52942,38 +53932,23 @@ ] } }, - "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "/api/entities/vc/version/{requestId}/status": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeEntityGroups", + "summary": "Get version create request status (getVersionCreateRequestStatus)", + "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionCreateRequestStatus", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", + "name": "requestId", "in": "path", - "description": "EntityGroup type", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "format": "uuid" } } ], @@ -52983,10 +53958,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/VersionCreationResult" } } } @@ -53122,14 +54094,14 @@ ] } }, - "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { - "post": { + "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Assign entity group to edge (assignEntityGroupToEdge)", - "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignEntityGroupToEdge", + "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeEntityGroups", "parameters": [ { "name": "edgeId", @@ -53155,15 +54127,6 @@ "DASHBOARD" ] } - }, - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } } ], "responses": { @@ -53172,7 +54135,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -53188,7 +54154,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53306,14 +54272,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", - "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignEntityGroupFromEdge", + "summary": "Assign entity group to edge (assignEntityGroupToEdge)", + "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignEntityGroupToEdge", "parameters": [ { "name": "edgeId", @@ -53372,7 +54340,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53490,33 +54458,57 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup": { - "post": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Create Or Update Entity Group (saveEntityGroup)", - "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "saveEntityGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroup" - } + "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", + "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignEntityGroupFromEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -53532,7 +54524,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53652,57 +54644,24 @@ ] } }, - "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", - "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupAllByOwnerAndType", - "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "summary": "Create Or Update Entity Group (saveEntityGroup)", + "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "saveEntityGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } } }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -53725,7 +54684,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -53845,22 +54804,54 @@ ] } }, - "/api/entityGroup/{entityGroupId}": { + "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Info (getEntityGroupById)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupById", + "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", + "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupAllByOwnerAndType", "parameters": [ { - "name": "entityGroupId", + "name": "ownerType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", "required": true, "schema": { "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } } ], @@ -54004,14 +54995,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entityGroup/{entityGroupId}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Delete Entity Group (deleteEntityGroup)", - "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", - "operationId": "deleteEntityGroup", + "summary": "Get Entity Group Info (getEntityGroupById)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupById", "parameters": [ { "name": "entityGroupId", @@ -54025,7 +55018,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -54156,16 +55156,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/addEntities": { - "post": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Add entities to the group (addEntitiesToEntityGroup)", - "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", - "operationId": "addEntitiesToEntityGroup", + "summary": "Delete Entity Group (deleteEntityGroup)", + "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", + "operationId": "deleteEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -54177,20 +55175,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -54206,7 +55190,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -54326,14 +55310,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/deleteEntities": { + "/api/entityGroup/{entityGroupId}/addEntities": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", - "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", - "operationId": "removeEntitiesFromEntityGroup", + "summary": "Add entities to the group (addEntitiesToEntityGroup)", + "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", + "operationId": "addEntitiesToEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -54494,14 +55478,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/entities": { - "get": { + "/api/entityGroup/{entityGroupId}/deleteEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entities (getEntities)", - "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntities", + "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", + "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", + "operationId": "removeEntitiesFromEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -54511,70 +55495,26 @@ "schema": { "type": "string" } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataShortEntityView" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -54586,7 +55526,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -54706,14 +55646,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/makePrivate": { - "post": { + "/api/entityGroup/{entityGroupId}/entities": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Make Entity Group Private (makeEntityGroupPrivate)", - "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPrivate", + "summary": "Get Group Entities (getEntities)", + "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntities", "parameters": [ { "name": "entityGroupId", @@ -54723,11 +55663,69 @@ "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataShortEntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -54740,7 +55738,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -54860,14 +55858,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/makePublic": { + "/api/entityGroup/{entityGroupId}/makePrivate": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", - "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPublic", + "summary": "Make Entity Group Private (makeEntityGroupPrivate)", + "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPrivate", "parameters": [ { "name": "entityGroupId", @@ -55014,14 +56012,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/share": { + "/api/entityGroup/{entityGroupId}/makePublic": { "post": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group (shareEntityGroup)", - "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroup", + "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", + "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPublic", "parameters": [ { "name": "entityGroupId", @@ -55033,16 +56031,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareGroupRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -55178,14 +56166,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{entityId}": { - "get": { + "/api/entityGroup/{entityGroupId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Group Entity (getGroupEntity)", - "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getGroupEntity", + "summary": "Share the Entity Group (shareEntityGroup)", + "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroup", "parameters": [ { "name": "entityGroupId", @@ -55195,28 +56183,22 @@ "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": { - "$ref": "#/components/schemas/ShortEntityView" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareGroupRequest" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -55228,7 +56210,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -55348,37 +56330,28 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { - "post": { + "/api/entityGroup/{entityGroupId}/{entityId}": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroupToChildOwnerUserGroup", + "summary": "Get Group Entity (getGroupEntity)", + "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getGroupEntity", "parameters": [ { "name": "entityGroupId", "in": "path", - "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "userGroupId", - "in": "path", - "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "roleId", + "name": "entityId", "in": "path", - "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -55387,7 +56360,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShortEntityView" + } + } + } }, "400": { "description": "Bad Request", @@ -55400,7 +56380,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -55520,60 +56500,37 @@ ] } }, - "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { - "get": { + "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupByOwnerAndNameAndType", + "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", + "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroupToChildOwnerUserGroup", "parameters": [ { - "name": "ownerType", + "name": "entityGroupId", "in": "path", - "description": "Tenant or Customer", + "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "type": "string" } }, { - "name": "ownerId", + "name": "userGroupId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] } }, { - "name": "groupName", + "name": "roleId", "in": "path", - "description": "Entity Group name", + "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -55582,14 +56539,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -55602,7 +56552,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -55722,19 +56672,60 @@ ] } }, - "/api/entityGroupInfo/{entityGroupId}": { + "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", - "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfoById", + "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupByOwnerAndNameAndType", "parameters": [ { - "name": "entityGroupId", + "name": "ownerType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "groupName", + "in": "path", + "description": "Entity Group name", "required": true, "schema": { "type": "string" @@ -55747,7 +56738,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -55883,25 +56874,22 @@ ] } }, - "/api/entityGroupInfos": { + "/api/entityGroupInfo/{entityGroupId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", - "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByIds", + "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", + "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfoById", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -55911,10 +56899,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/EntityInfo" } } } @@ -56050,91 +57035,25 @@ ] } }, - "/api/entityGroupInfos/{groupType}": { + "/api/entityGroupInfos": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", + "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByIds", "parameters": [ { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "entityGroupIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of group ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -56144,7 +57063,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -56280,14 +57202,14 @@ ] } }, - "/api/entityGroupInfos/{groupType}/shared": { + "/api/entityGroupInfos/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -56307,6 +57229,15 @@ ] } }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "pageSize", "in": "query", @@ -56501,38 +57432,15 @@ ] } }, - "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfos/{groupType}/shared": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -56745,14 +57653,14 @@ ] } }, - "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -56989,37 +57897,53 @@ ] } }, - "/api/entityGroups/edge/{edgeId}/{groupType}": { + "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeEntityGroups", + "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", "parameters": [ { - "name": "edgeId", + "name": "ownerType", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Tenant or Customer", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, { "name": "groupType", "in": "path", - "description": "EntityGroup type", + "description": "Entity Group type", "required": true, "schema": { "type": "string", "enum": [ + "CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", - "DASHBOARD" + "DASHBOARD", + "EDGE" ] } }, @@ -57081,7 +58005,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -57217,25 +58141,89 @@ ] } }, - "/api/entityGroups/list": { + "/api/entityGroups/edge/{edgeId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", - "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByIds", + "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeEntityGroups", "parameters": [ { - "name": "entityGroupIds", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, + { + "name": "pageSize", "in": "query", - "description": "A list of group ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -57245,10 +58233,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -57384,40 +58369,25 @@ ] } }, - "/api/entityGroups/{entityType}/{entityId}": { + "/api/entityGroups/list": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", - "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupsForEntity", + "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", + "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByIds", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "entityId", - "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "entityGroupIds", + "in": "query", + "description": "A list of group ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -57429,7 +58399,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityGroupId" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -57566,17 +58536,17 @@ ] } }, - "/api/entityGroups/{groupType}": { + "/api/entityGroups/{entityType}/{entityId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByTypeAndPageLink", + "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", + "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupsForEntity", "parameters": [ { - "name": "groupType", + "name": "entityType", "in": "path", "description": "Entity Group type", "required": true, @@ -57594,64 +58564,13 @@ } }, { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -57660,7 +58579,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupId" + } } } } @@ -57796,14 +58718,14 @@ ] } }, - "/api/entityGroups/{groupType}/all": { + "/api/entityGroups/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByType", + "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByTypeAndPageLink", "parameters": [ { "name": "groupType", @@ -57831,179 +58753,6 @@ "schema": { "type": "boolean" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/entityGroups/{groupType}/shared": { - "get": { - "tags": [ - "entity-group-controller" - ], - "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupsByTypeAndPageLink", - "parameters": [ - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } }, { "name": "pageSize", @@ -58199,14 +58948,14 @@ ] } }, - "/api/entityGroups/{groupType}/shared/all": { + "/api/entityGroups/{groupType}/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", - "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllSharedEntityGroups", + "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByType", "parameters": [ { "name": "groupType", @@ -58225,6 +58974,15 @@ "EDGE" ] } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -58372,38 +59130,15 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroups/{groupType}/shared": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupsByTypeAndPageLink", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -58616,38 +59351,15 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "/api/entityGroups/{groupType}/shared/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByOwnerAndType", + "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", + "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllSharedEntityGroups", "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, { "name": "groupType", "in": "path", @@ -58812,14 +59524,14 @@ ] } }, - "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", "parameters": [ { "name": "ownerType", @@ -59056,14 +59768,14 @@ ] } }, - "/api/ownerInfo/{ownerType}/{ownerId}": { + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Info (getOwnerInfo)", - "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getOwnerInfo", + "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByOwnerAndType", "parameters": [ { "name": "ownerType", @@ -59087,6 +59799,24 @@ "type": "string" }, "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } } ], "responses": { @@ -59095,7 +59825,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -59231,15 +59964,56 @@ ] } }, - "/api/ownerInfos": { + "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Infos (getOwnerInfos)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwnerInfos", + "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, { "name": "pageSize", "in": "query", @@ -59298,7 +60072,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/PageDataEntityGroupInfo" } } } @@ -59434,14 +60208,189 @@ ] } }, - "/api/owners": { + "/api/ownerInfo/{ownerType}/{ownerId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owners (getOwners)", + "summary": "Get Owner Info (getOwnerInfo)", + "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getOwnerInfo", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/ownerInfos": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Owner Infos (getOwnerInfos)", "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwners", + "operationId": "getOwnerInfos", "parameters": [ { "name": "pageSize", @@ -59501,7 +60450,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataContactBasedObject" + "$ref": "#/components/schemas/PageDataEntityInfo" } } } @@ -59637,39 +60586,77 @@ ] } }, - "/api/v2/entityGroup/{entityGroupId}/share": { - "post": { + "/api/owners": { + "get": { "tags": [ "entity-group-controller" ], - "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroupV2)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroupToChildOwnerUserGroupV2", + "summary": "Get Owners (getOwners)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwners", "parameters": [ { - "name": "entityGroupId", - "in": "path", - "description": "A uuid value representing the Entity Group Id that you would like to share. 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", - "format": "uuid" + "minimum": 1 } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareGroupRequest" - } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 } }, - "required": true - }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataContactBasedObject" + } + } + } }, "400": { "description": "Bad Request", @@ -59682,7 +60669,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -74635,9 +75622,9 @@ "tags": [ "mail-config-template-controller" ], - "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "summary": "Get the list of all OAuth2 client registration templates (getMailConfigTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", - "operationId": "getClientRegistrationTemplates", + "operationId": "getMailConfigTemplates", "responses": { "200": { "description": "OK", @@ -85596,9 +86583,9 @@ "tags": [ "ota-package-controller" ], - "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType)", + "summary": "Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileAndType)", "description": "Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getOtaPackagesByDeviceProfileIdAndType", + "operationId": "getOtaPackagesByDeviceProfileAndType", "parameters": [ { "name": "deviceProfileId", @@ -86012,59 +86999,209 @@ ] } }, - "/api/owner/TENANT/{ownerId}/{entityType}/{entityId}": { - "post": { + "/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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/mobile/qr/deepLink": { + "get": { "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" - } - } + "qr-code-settings-controller" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "An optional list of additional entity group ids", - "items": { + "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" } } } - } - }, - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -86077,7 +87214,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -86197,21 +87334,21 @@ ] } }, - "/api/mobile/qr/deepLink": { + "/api/mobile/qr/merged": { "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", + "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": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/QrCodeSettings" } } } @@ -86347,14 +87484,14 @@ ] } }, - "/api/mobile/qr/merged": { + "/api/mobile/qr/settings": { "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", + "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", @@ -86495,16 +87632,24 @@ "ApiKeyForm": [] } ] - } - }, - "/api/mobile/qr/settings": { - "get": { + }, + "post": { "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", + "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", @@ -86527,7 +87672,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -86645,31 +87790,185 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/noauth/qr": { + "get": { "tags": [ "qr-code-settings-controller" ], - "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" + "summary": "getApplicationRedirect", + "operationId": "getApplicationRedirect", + "parameters": [ + { + "name": "User-Agent", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object" + } } } }, - "required": true - }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + } + } + }, + "/api/noauth/qr/{secret}": { + "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" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QrCodeSettings" + "$ref": "#/components/schemas/JwtPair" } } } @@ -86685,7 +87984,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -86794,32 +88093,88 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/qr": { + "/api/queues": { "get": { "tags": [ - "qr-code-settings-controller" + "queue-controller" ], - "summary": "getApplicationRedirect", - "operationId": "getApplicationRedirect", + "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": "User-Agent", - "in": "header", + "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" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "topic" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -86828,7 +88183,7 @@ "content": { "application/json": { "schema": { - "type": "object" + "$ref": "#/components/schemas/PageDataQueue" } } } @@ -86953,35 +88308,57 @@ } } } - } - } - }, - "/api/noauth/qr/{secret}": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "post": { "tags": [ - "qr-code-settings-controller" + "queue-controller" ], - "summary": "Get User Token (getUserTokenByMobileSecret)", - "description": "Returns the token of the User based on the provided secret key.", - "operationId": "getUserTokenByMobileSecret", + "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": "secret", - "in": "path", - "description": "A string value representing short-lived secret key", + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", "required": true, "schema": { - "type": "string" + "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/JwtPair" + "$ref": "#/components/schemas/Queue" } } } @@ -86997,7 +88374,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -87106,88 +88483,34 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/queues": { + "/api/queues/name/{queueName}": { "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", + "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": "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", + "name": "queueName", + "in": "path", + "description": "A string value representing the queue id. For example, 'Main'", "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" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "topic" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -87196,7 +88519,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataQueue" + "$ref": "#/components/schemas/Queue" } } } @@ -87330,41 +88653,27 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/queues/{queueId}": { + "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", + "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": "serviceType", - "in": "query", - "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "name": "queueId", + "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TB-RULE-ENGINE", - "TB-CORE", - "TB-TRANSPORT", - "JS-EXECUTOR" - ] + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Queue" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", @@ -87387,7 +88696,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -87505,21 +88814,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/queues/name/{queueName}": { - "get": { + }, + "delete": { "tags": [ "queue-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", + "summary": "Delete Queue (deleteQueue)", + "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteQueue", "parameters": [ { - "name": "queueName", + "name": "queueId", "in": "path", - "description": "A string value representing the queue id. For example, 'Main'", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -87528,14 +88835,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Queue" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -87668,23 +88968,68 @@ ] } }, - "/api/queues/{queueId}": { + "/api/queueStats": { "get": { "tags": [ - "queue-controller" + "queue-stats-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": "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": "queueId", - "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on 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": { @@ -87693,7 +89038,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Queue" + "$ref": "#/components/schemas/PageDataQueueStats" } } } @@ -87827,28 +89172,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/queueStats/list": { + "get": { "tags": [ - "queue-controller" + "queue-stats-controller" ], - "summary": "Delete Queue (deleteQueue)", - "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "deleteQueue", + "summary": "Get QueueStats By Ids (getQueueStatsByIds)", + "description": "Fetch the Queue stats objects based on the provided ids. ", + "operationId": "getQueueStatsByIds", "parameters": [ { - "name": "queueId", - "in": "path", - "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "queueStatsIds", + "in": "query", + "description": "A list of queue stats ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueStats" + } + } + } + } }, "400": { "description": "Bad Request", @@ -87981,68 +89341,23 @@ ] } }, - "/api/queueStats": { + "/api/queueStats/{queueStatsId}": { "get": { "tags": [ "queue-stats-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 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": "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": "queueStatsId", + "in": "path", + "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", "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": { @@ -88051,7 +89366,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataQueueStats" + "$ref": "#/components/schemas/QueueStats" } } } @@ -88187,38 +89502,42 @@ ] } }, - "/api/queueStats/list": { - "get": { + "/api/v2/report": { + "post": { "tags": [ - "queue-stats-controller" + "report-controller" ], - "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" + "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", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/QueueStats" - } + "$ref": "#/components/schemas/Report" } } } @@ -88234,7 +89553,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -88354,32 +89673,30 @@ ] } }, - "/api/queueStats/{queueStatsId}": { - "get": { + "/api/v2/report/request": { + "post": { "tags": [ - "queue-stats-controller" + "report-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", - "parameters": [ - { - "name": "queueStatsId", - "in": "path", - "description": "A string value representing the queue stats id. For example, '687f294c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "requestReport", + "operationId": "requestReport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/QueueStats" + "$ref": "#/components/schemas/Job" } } } @@ -88395,7 +89712,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -88515,34 +89832,23 @@ ] } }, - "/api/v2/report": { + "/api/v2/report/test": { "post": { "tags": [ "report-controller" ], - "summary": "createReport", - "operationId": "createReport", + "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": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - }, - "info": { - "type": "string" - } - }, - "required": [ - "file", - "info" - ] + "$ref": "#/components/schemas/ReportRequest" } } - } + }, + "required": true }, "responses": { "200": { @@ -88550,7 +89856,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" + "type": "string", + "format": "binary" } } } @@ -88686,30 +89993,32 @@ ] } }, - "/api/v2/report/request": { - "post": { + "/api/v2/report/{reportId}": { + "get": { "tags": [ "report-controller" ], - "summary": "requestReport", - "operationId": "requestReport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportRequest" - } + "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", + "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" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/Report" } } } @@ -88725,7 +90034,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -88843,37 +90152,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/v2/report/test": { - "post": { + }, + "delete": { "tags": [ "report-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": "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" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "binary" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -88886,7 +90186,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -89006,22 +90306,21 @@ ] } }, - "/api/v2/report/{reportId}": { + "/api/v2/report/{reportId}/download": { "get": { "tags": [ "report-controller" ], - "summary": "Get Report (getReportById)", - "description": "Fetch the Report object based on the provided report Id. The platform uses Report to store generated reports information.Referencing non-existing Report Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getReportById", + "summary": "downloadReport", + "operationId": "downloadReport", "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" + "type": "string", + "format": "uuid" } } ], @@ -89031,7 +90330,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Report" + "type": "string", + "format": "binary" } } } @@ -89165,28 +90465,42 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/v2/reportInfos": { + "get": { "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", + "summary": "getReportInfosByIds", + "operationId": "getReportInfosByIds", "parameters": [ { - "name": "reportId", - "in": "path", - "description": "A string value representing the report 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" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -89319,22 +90633,89 @@ ] } }, - "/api/v2/report/{reportId}/download": { + "/api/v2/reportInfos/all": { "get": { "tags": [ "report-controller" ], - "summary": "downloadReport", - "operationId": "downloadReport", + "summary": "getReportInfos", + "operationId": "getReportInfos", "parameters": [ { - "name": "reportId", - "in": "path", - "required": true, + "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", + "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" + } } ], "responses": { @@ -89343,8 +90724,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataReportInfo" } } } @@ -89480,24 +90860,59 @@ ] } }, - "/api/v2/reportInfos": { + "/api/v2/reports": { "get": { "tags": [ "report-controller" ], - "summary": "getReportInfosByIds", - "operationId": "getReportInfosByIds", + "summary": "getReports", + "operationId": "getReports", "parameters": [ { - "name": "strReportIds", + "name": "pageSize", "in": "query", - "description": "A list of report ids, separated by comma ','", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "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" } } ], @@ -89507,10 +90922,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportInfo" - } + "$ref": "#/components/schemas/PageDataReport" } } } @@ -89646,98 +91058,31 @@ ] } }, - "/api/v2/reportInfos/all": { - "get": { + "/api/reportTemplate": { + "post": { "tags": [ - "report-controller" + "report-template-controller" ], - "summary": "getReportInfos", - "operationId": "getReportInfos", - "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", - "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" + "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" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReportInfo" + "$ref": "#/components/schemas/ReportTemplate" } } } @@ -89753,7 +91098,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -89873,57 +91218,20 @@ ] } }, - "/api/v2/reports": { + "/api/reportTemplate/info/{reportTemplateId}": { "get": { "tags": [ - "report-controller" + "report-template-controller" ], - "summary": "getReports", - "operationId": "getReports", + "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": "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": "reportTemplateId", + "in": "path", + "description": "A string value representing the report template 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" } @@ -89935,7 +91243,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataReport" + "$ref": "#/components/schemas/ReportTemplateInfo" } } } @@ -90071,24 +91379,25 @@ ] } }, - "/api/reportTemplate": { - "post": { + "/api/reportTemplate/{reportTemplateId}": { + "get": { "tags": [ "report-template-controller" ], - "summary": "Save Report Template (saveReportTemplate)", - "description": "Creates or Updates report template. Report Template extends Report Template Info object and adds 'configuration' - a JSON structure of report template configuration. See the 'Model' tab of the Response Class for more details. When creating report template, platform generates report template Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created report template id will be present in the response. Specify existing report template id to update the report template. Referencing non-existing report template Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Report Template entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveReportTemplate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportTemplate" - } + "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", @@ -90111,7 +91420,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -90229,16 +91538,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/reportTemplate/info/{reportTemplateId}": { - "get": { + }, + "delete": { "tags": [ "report-template-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": "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": "reportTemplateId", @@ -90252,14 +91559,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ReportTemplateInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -90392,23 +91692,111 @@ ] } }, - "/api/reportTemplate/{reportTemplateId}": { + "/api/reportTemplateInfos/all": { "get": { "tags": [ "report-template-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": "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": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template 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", + "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": { @@ -90417,7 +91805,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ReportTemplate" + "$ref": "#/components/schemas/PageDataReportTemplateInfo" } } } @@ -90551,28 +91939,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/reportTemplates": { + "get": { "tags": [ "report-template-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": "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", "parameters": [ { - "name": "reportTemplateId", - "in": "path", - "description": "A string value representing the report template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "reportTemplateIds", + "in": "query", + "description": "A list of report template ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReportTemplateInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -90705,120 +92108,31 @@ ] } }, - "/api/reportTemplateInfos/all": { - "get": { + "/api/role": { + "post": { "tags": [ - "report-template-controller" + "role-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": "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" } } }, - { - "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/Role" } } } @@ -90834,7 +92148,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -90954,25 +92268,22 @@ ] } }, - "/api/reportTemplates": { + "/api/role/{roleId}": { "get": { "tags": [ - "report-template-controller" + "role-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 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": "reportTemplateIds", - "in": "query", - "description": "A list of report template ids, separated by comma ','", + "name": "roleId", + "in": "path", + "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -90982,10 +92293,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReportTemplateInfo" - } + "$ref": "#/components/schemas/Role" } } } @@ -91119,36 +92427,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/role": { - "post": { + }, + "delete": { "tags": [ "role-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": "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": "roleId", + "in": "path", + "description": "A string value representing the role 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" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -91161,7 +92461,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -91281,23 +92581,84 @@ ] } }, - "/api/role/{roleId}": { + "/api/roles": { "get": { "tags": [ "role-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": "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": "roleId", - "in": "path", - "description": "A string value representing the role 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" } + }, + { + "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" + ] + } } ], "responses": { @@ -91306,7 +92667,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Role" + "$ref": "#/components/schemas/PageDataRole" } } } @@ -91440,28 +92801,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/roles/list": { + "get": { "tags": [ "role-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 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": "roleId", - "in": "path", - "description": "A string value representing the role id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "roleIds", + "in": "query", + "description": "A list of role ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } }, "400": { "description": "Bad Request", @@ -91594,93 +92970,43 @@ ] } }, - "/api/roles": { - "get": { + "/api/plugins/rpc/oneway/{deviceId}": { + "post": { "tags": [ - "role-controller" + "rpc-v-1-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": "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": "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": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "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" - ] - } } ], + "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/PageDataRole" + "type": "string" } } } @@ -91696,7 +93022,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -91816,38 +93142,43 @@ ] } }, - "/api/roles/list": { - "get": { + "/api/plugins/rpc/twoway/{deviceId}": { + "post": { "tags": [ - "role-controller" + "rpc-v-1-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", + "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": "roleIds", - "in": "query", - "description": "A list of role ids, separated by comma ','", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "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": "array", - "items": { - "$ref": "#/components/schemas/Role" - } + "type": "string" } } } @@ -91863,7 +93194,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -91983,14 +93314,14 @@ ] } }, - "/api/plugins/rpc/oneway/{deviceId}": { + "/api/rpc/oneway/{deviceId}": { "post": { "tags": [ - "rpc-v-1-controller" + "rpc-v-2-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": "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", @@ -92003,11 +93334,11 @@ } ], "requestBody": { + "description": "A JSON object representing the RPC request.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." + "type": "string" } } }, @@ -92015,7 +93346,7 @@ }, "responses": { "200": { - "description": "OK", + "description": "Persistent RPC request was saved to the database or lightweight RPC request was sent to the device.", "content": { "application/json": { "schema": { @@ -92025,49 +93356,41 @@ } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" } } } }, "401": { - "description": "Unauthorized", + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -92155,14 +93478,14 @@ ] } }, - "/api/plugins/rpc/twoway/{deviceId}": { - "post": { + "/api/rpc/persistent/device/{deviceId}": { + "get": { "tags": [ - "rpc-v-1-controller" + "rpc-v-2-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": "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": "deviceId", @@ -92172,19 +93495,83 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } + }, + { + "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": "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": { "200": { "description": "OK", @@ -92207,7 +93594,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -92327,83 +93714,80 @@ ] } }, - "/api/rpc/oneway/{deviceId}": { - "post": { + "/api/rpc/persistent/{rpcId}": { + "get": { "tags": [ "rpc-v-2-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 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": "deviceId", + "name": "rpcId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } - } - }, - "required": true - }, "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/Rpc" } } } }, "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "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": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } @@ -92489,112 +93873,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/rpc/persistent/device/{deviceId}": { - "get": { + }, + "delete": { "tags": [ "rpc-v-2-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": "Delete persistent RPC", + "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRpc", "parameters": [ { - "name": "deviceId", + "name": "rpcId", "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", - "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": "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": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -92727,80 +94027,83 @@ ] } }, - "/api/rpc/persistent/{rpcId}": { - "get": { + "/api/rpc/twoway/{deviceId}": { + "post": { "tags": [ "rpc-v-2-controller" ], - "summary": "Get persistent RPC request", - "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getPersistedRpc", + "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": "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": "Persistent RPC request was saved to the database or lightweight RPC response received.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Rpc" + "type": "string" } } } }, "400": { - "description": "Bad Request", + "description": "Invalid structure of the request.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid UUID string: 123", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" } } } }, "401": { - "description": "Unauthorized", + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": { + "type": "string" } } } @@ -92886,19 +94189,28 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { + "post": { "tags": [ - "rpc-v-2-controller" + "rule-chain-controller" ], - "summary": "Delete persistent RPC", - "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteRpc", + "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": "rpcId", + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleChainId", "in": "path", - "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -92907,7 +94219,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } + } }, "400": { "description": "Bad Request", @@ -92920,7 +94239,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -93038,85 +94357,87 @@ "ApiKeyForm": [] } ] - } - }, - "/api/rpc/twoway/{deviceId}": { - "post": { + }, + "delete": { "tags": [ - "rpc-v-2-controller" + "rule-chain-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": "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": "deviceId", + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleChainId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the RPC request." - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Persistent RPC request was saved to the database or lightweight RPC response received.", + "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/RuleChain" } } } }, "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "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": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } @@ -93204,30 +94525,79 @@ ] } }, - "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { - "post": { + "/api/edge/{edgeId}/ruleChains": { + "get": { "tags": [ "rule-chain-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 Edge Rule Chains (getEdgeRuleChains)", + "description": "Returns a page of Rule Chains assigned to the specified edge. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeRuleChains", "parameters": [ { "name": "edgeId", "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "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": "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": { @@ -93236,7 +94606,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -93252,7 +94622,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -93370,32 +94740,26 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain": { + "post": { "tags": [ "rule-chain-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", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "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": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } } }, - { - "name": "ruleChainId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", @@ -93418,7 +94782,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -93538,88 +94902,24 @@ ] } }, - "/api/edge/{edgeId}/ruleChains": { + "/api/ruleChain/autoAssignToEdgeRuleChains": { "get": { "tags": [ "rule-chain-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", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive '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" - ] - } - } - ], + "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/PageDataRuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } } } } @@ -93755,19 +95055,19 @@ ] } }, - "/api/ruleChain": { + "/api/ruleChain/device/default": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Create Or Update Rule Chain (saveRuleChain)", - "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChain", + "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/RuleChain" + "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" } } }, @@ -93915,24 +95215,43 @@ ] } }, - "/api/ruleChain/autoAssignToEdgeRuleChains": { - "get": { + "/api/ruleChain/metadata": { + "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": "Update Rule Chain Metadata", + "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChainMetaData", + "parameters": [ + { + "name": "updateRelated", + "in": "query", + "description": "Update related rule nodes.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -93948,7 +95267,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -94068,31 +95387,21 @@ ] } }, - "/api/ruleChain/device/default": { - "post": { + "/api/ruleChain/tbelEnabled": { + "get": { "tags": [ "rule-chain-controller" ], - "summary": "Create Default Rule Chain (setDeviceDefaultRuleChain)", - "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDeviceDefaultRuleChain", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" - } - } - }, - "required": true - }, + "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" } } } @@ -94108,7 +95417,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -94228,31 +95537,31 @@ ] } }, - "/api/ruleChain/metadata": { + "/api/ruleChain/testScript": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Update Rule Chain Metadata", - "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveRuleChainMetaData", + "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": "updateRelated", + "name": "scriptLang", "in": "query", - "description": "Update related rule nodes.", + "description": "Script language: JS or TBEL", "required": false, "schema": { - "type": "boolean", - "default": true + "$ref": "#/components/schemas/ScriptLanguage" } } ], "requestBody": { + "description": "Test JS request. See API call description above.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/JsonNode" } } }, @@ -94264,7 +95573,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/JsonNode" } } } @@ -94400,25 +95709,188 @@ ] } }, - "/api/ruleChain/tbelEnabled": { + "/api/ruleChain/{ruleChainId}": { "get": { "tags": [ "rule-chain-controller" ], - "summary": "Is TBEL script executor enabled", - "description": "Returns 'True' if the TBEL script execution is enabled\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "isTbelEnabled", + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainById", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/RuleChain" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { + "tags": [ + "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", + "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" + }, "400": { "description": "Bad Request", "content": { @@ -94550,43 +96022,32 @@ ] } }, - "/api/ruleChain/testScript": { + "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { "post": { "tags": [ "rule-chain-controller" ], - "summary": "Test Script function", - "description": "Execute the Script function and return the result. The format of request: \n\n```json\n{\n \"script\": \"Your Function as String\",\n \"scriptType\": \"One of: update, generate, filter, switch, json, string\",\n \"argNames\": [\"msg\", \"metadata\", \"type\"],\n \"msg\": \"{\\\"temperature\\\": 42}\", \n \"metadata\": {\n \"deviceName\": \"Device A\",\n \"deviceType\": \"Thermometer\"\n },\n \"msgType\": \"POST_TELEMETRY_REQUEST\"\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testRuleChainScript", + "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": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "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": { - "$ref": "#/components/schemas/ScriptLanguage" + "type": "string" } } ], - "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/JsonNode" + "$ref": "#/components/schemas/RuleChain" } } } @@ -94720,16 +96181,14 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ruleChain/{ruleChainId}": { - "get": { + }, + "delete": { "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", + "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", @@ -94881,14 +96340,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { + "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": "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": "ruleChainId", @@ -94902,7 +96363,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } + } }, "400": { "description": "Bad Request", @@ -94915,7 +96383,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95035,14 +96503,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { - "post": { + "/api/ruleChain/{ruleChainId}/metadata": { + "get": { "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", + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainMetaData", "parameters": [ { "name": "ruleChainId", @@ -95060,7 +96528,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "$ref": "#/components/schemas/RuleChainMetaData" } } } @@ -95076,7 +96544,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95194,14 +96662,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ruleChain/{ruleChainId}/output/labels": { + "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", + "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": "ruleChainId", @@ -95219,7 +96689,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true } } } @@ -95355,14 +96829,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { - "post": { + "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "get": { "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": "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": "ruleChainId", @@ -95380,7 +96854,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" + } } } } @@ -95396,7 +96873,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95516,14 +96993,14 @@ ] } }, - "/api/ruleChain/{ruleChainId}/metadata": { - "get": { + "/api/ruleChain/{ruleChainId}/root": { + "post": { "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", + "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": "ruleChainId", @@ -95541,7 +97018,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainMetaData" + "$ref": "#/components/schemas/RuleChain" } } } @@ -95557,7 +97034,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -95677,23 +97154,83 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels": { + "/api/ruleChains": { "get": { "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": "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": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "Rule chain type (CORE or EDGE)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the rule chain name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "root" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -95702,11 +97239,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "$ref": "#/components/schemas/PageDataRuleChain" } } } @@ -95842,22 +97375,23 @@ ] } }, - "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "/api/ruleChains/export": { "get": { "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": "Export Rule Chains", + "description": "Exports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "exportRuleChains", "parameters": [ { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain 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" } } ], @@ -95867,10 +97401,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" - } + "$ref": "#/components/schemas/RuleChainData" } } } @@ -96006,32 +97537,46 @@ ] } }, - "/api/ruleChain/{ruleChainId}/root": { + "/api/ruleChains/import": { "post": { "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": "Import Rule Chains", + "description": "Imports all tenant rule chains as one JSON.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "importRuleChains", "parameters": [ { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "overwrite", + "in": "query", + "description": "Enables overwrite for existing rule chains with the same name.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainData" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainImportResult" + } } } } @@ -96167,82 +97712,25 @@ ] } }, - "/api/ruleChains": { + "/api/ruleChains/list": { "get": { "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": "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": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "ruleChainIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of rule chain ids, separated by comma ','", "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" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -96252,7 +97740,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataRuleChain" + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChain" + } } } } @@ -96388,23 +97879,22 @@ ] } }, - "/api/ruleChains/export": { + "/api/ruleNode/{ruleNodeId}/debugIn": { "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 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": "limit", - "in": "query", - "description": "A limit of rule chains to export.", + "name": "ruleNodeId", + "in": "path", + "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } } ], @@ -96414,7 +97904,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "$ref": "#/components/schemas/JsonNode" } } } @@ -96550,31 +98040,20 @@ ] } }, - "/api/ruleChains/import": { + "/api/rule-engine/": { "post": { "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", - "parameters": [ - { - "name": "overwrite", - "in": "query", - "description": "Enables overwrite for existing rule chains with the same name.", - "required": false, - "schema": { - "type": "boolean", - "default": false - } - } + "rule-engine-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": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/RuleChainData" + "type": "string" } } }, @@ -96586,10 +98065,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChainImportResult" - } + "type": "string" } } } @@ -96725,38 +98201,52 @@ ] } }, - "/api/ruleChains/list": { - "get": { + "/api/rule-engine/{entityType}/{entityId}": { + "post": { "tags": [ - "rule-chain-controller" + "rule-engine-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": "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": "ruleChainIds", - "in": "query", - "description": "A list of rule chain ids, separated by comma ','", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "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": { + "description": "A JSON object representing the message.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RuleChain" - } + "type": "string" } } } @@ -96772,7 +98262,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -96892,32 +98382,71 @@ ] } }, - "/api/ruleNode/{ruleNodeId}/debugIn": { - "get": { + "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "post": { "tags": [ - "rule-chain-controller" + "rule-engine-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": "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": "ruleNodeId", + "name": "entityType", "in": "path", - "description": "A string value representing the rule node id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "queueName", + "in": "path", + "description": "Queue name to process the request in the rule engine", "required": true, "schema": { "type": "string" } + }, + { + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } } ], + "requestBody": { + "description": "A JSON object representing the message.", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string" } } } @@ -96933,7 +98462,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97053,20 +98582,50 @@ ] } }, - "/api/rule-engine/": { + "/api/rule-engine/{entityType}/{entityId}/{timeout}": { "post": { "tags": [ "rule-engine-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", + "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": "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", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], "requestBody": { + "description": "A JSON object representing the message.", "content": { - "application/json": { + "text/plain": { "schema": { - "type": "string", - "description": "A JSON value representing the message." + "type": "string" } } }, @@ -97214,52 +98773,35 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}": { - "post": { + "/api/edge/{edgeId}/allSchedulerEvents": { + "get": { "tags": [ - "rule-engine-controller" + "scheduler-event-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": "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": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity 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" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -97275,7 +98817,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97395,71 +98937,41 @@ ] } }, - "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { "post": { "tags": [ - "rule-engine-controller" + "scheduler-event-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": "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": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "queueName", + "name": "schedulerEventId", "in": "path", - "description": "Queue name to process the request in the rule engine", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -97593,64 +99105,41 @@ "ApiKeyForm": [] } ] - } - }, - "/api/rule-engine/{entityType}/{entityId}/{timeout}": { - "post": { + }, + "delete": { "tags": [ - "rule-engine-controller" + "scheduler-event-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": "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": "entityType", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "entityId", + "name": "schedulerEventId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "timeout", - "in": "path", - "description": "Timeout to process the request in milliseconds", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "A JSON value representing the message." - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SchedulerEventInfo" } } } @@ -97666,7 +99155,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -97786,14 +99275,14 @@ ] } }, - "/api/edge/{edgeId}/allSchedulerEvents": { + "/api/edge/{edgeId}/schedulerEvents": { "get": { "tags": [ "scheduler-event-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 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": "edgeId", @@ -97803,6 +99292,57 @@ "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -97811,10 +99351,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" } } } @@ -97950,32 +99487,94 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { - "post": { + "/api/scheduledReports": { + "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Assign scheduler event to edge (assignSchedulerEventToEdge)", - "description": "Creates assignment of an existing scheduler event to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment scheduler event (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once scheduler event will be delivered to edge service, it is going to be available for usage on remote edge instance. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignSchedulerEventToEdge", + "summary": "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", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "reportTemplateId", + "in": "query", + "description": "Report template id", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "userId", + "in": "query", + "description": "The user used for report generation.", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "string", + "minimum": 1 } }, { - "name": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -97984,7 +99583,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventInfo" + "$ref": "#/components/schemas/PageDataScheduledReportInfo" } } } @@ -98000,7 +99599,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98118,41 +99717,33 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/schedulerEvent": { + "post": { "tags": [ "scheduler-event-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", - "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": "Save Scheduler Event (saveSchedulerEvent)", + "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveSchedulerEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } } }, - { - "name": "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" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -98168,7 +99759,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98288,74 +99879,23 @@ ] } }, - "/api/edge/{edgeId}/schedulerEvents": { + "/api/schedulerEvent/info/{schedulerEventId}": { "get": { "tags": [ "scheduler-event-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": "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": "edgeId", + "name": "schedulerEventId", "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": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the scheduler event name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -98364,7 +99904,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" } } } @@ -98500,94 +100040,23 @@ ] } }, - "/api/scheduledReports": { + "/api/schedulerEvent/{schedulerEventId}": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduled Report Events (getScheduledReportEvents)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getScheduledReportEvents", + "summary": "Get 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": "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": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the scheduler event name or customer title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -98596,7 +100065,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataScheduledReportInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -98730,36 +100199,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvent": { - "post": { + }, + "delete": { "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": "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": "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/SchedulerEvent" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -98772,7 +100233,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -98892,14 +100353,14 @@ ] } }, - "/api/schedulerEvent/info/{schedulerEventId}": { - "get": { + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { "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": "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", @@ -98909,6 +100370,15 @@ "schema": { "type": "string" } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -98917,7 +100387,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "$ref": "#/components/schemas/SchedulerEvent" } } } @@ -99053,23 +100523,80 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}": { + "/api/schedulerEvents": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get Scheduler Event (getSchedulerEventById)", - "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEventById", + "summary": "Get 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": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler 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 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" + } } ], "responses": { @@ -99078,7 +100605,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" } } } @@ -99212,20 +100739,22 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/schedulerEvents/all": { + "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 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": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, "schema": { "type": "string" } @@ -99233,7 +100762,17 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -99366,31 +100905,25 @@ ] } }, - "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { - "put": { + "/api/schedulerEvents/list": { + "get": { "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", + "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": "schedulerEventId", - "in": "path", - "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "enabledValue", - "in": "path", - "description": "Enabled or disabled scheduler", + "name": "schedulerEventIds", + "in": "query", + "description": "A list of scheduler event ids, separated by comma ','", "required": true, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -99400,7 +100933,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SchedulerEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } } } } @@ -99536,80 +101072,62 @@ ] } }, - "/api/schedulerEvents": { + "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { "get": { "tags": [ "scheduler-event-controller" ], - "summary": "Get scheduler events (getSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSchedulerEvents", + "summary": "Get scheduler 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": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "startTime", + "in": "path", + "description": "Start time filter in milliseconds for scheduler event run time", "required": true, "schema": { "type": "integer", - "format": "int32" + "format": "int64" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "endTime", + "in": "path", + "description": "End time filter in milliseconds for scheduler event run time", "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" + "format": "int64" } }, { - "name": "sortProperty", + "name": "type", "in": "query", - "description": "Property of entity to sort by", + "description": "A string value representing the scheduler type. For example, 'generateReport'", "required": false, "schema": { "type": "string" } }, { - "name": "sortOrder", + "name": "edgeId", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { - "name": "type", + "name": "textSearch", "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", + "description": "Case-insensitive 'substring' filter based on event's name, type, or customer's name", "required": false, "schema": { "type": "string" } - }, - { - "name": "edgeId", - "in": "query", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } } ], "responses": { @@ -99618,7 +101136,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSchedulerEventWithCustomerInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } } } } @@ -99754,20 +101275,19 @@ ] } }, - "/api/schedulerEvents/all": { + "/api/secret": { "get": { "tags": [ - "scheduler-event-controller" + "secret-controller" ], - "summary": "Get all scheduler events (getAllSchedulerEvents)", - "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Event With Customer Info extends Scheduler Event Info object and adds 'customerTitle' - a String value representing the title of the customer which user created a Scheduler Event and 'customerIsPublic' - a boolean parameter that specifies if customer is public. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllSchedulerEvents", + "summary": "Get Secret info by name (getSecretInfoByName)", + "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getSecretInfoByName", "parameters": [ { - "name": "type", + "name": "name", "in": "query", - "description": "A string value representing the scheduler type. For example, 'generateReport'", - "required": false, + "required": true, "schema": { "type": "string" } @@ -99779,10 +101299,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" - } + "$ref": "#/components/schemas/SecretInfo" } } } @@ -99916,40 +101433,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/schedulerEvents/list": { - "get": { + }, + "post": { "tags": [ - "scheduler-event-controller" + "secret-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", - "parameters": [ - { - "name": "schedulerEventIds", - "in": "query", - "description": "A list of scheduler event ids, separated by comma ','", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" + "summary": "Save or Update Secret (saveSecret)", + "description": "Create or update the Secret. When creating secret, platform generates Secret Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Secret Id will be present in the response. Specify existing Secret Id to update the secret. Secret name is not updatable, only value could be changed. Referencing non-existing Secret Id will cause 'Not Found' error.\n\nSecret name is unique in the scope of tenant.", + "operationId": "saveSecret", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Secret" } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SchedulerEventInfo" - } + "$ref": "#/components/schemas/SecretInfo" } } } @@ -99965,7 +101473,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -100085,64 +101593,14 @@ ] } }, - "/api/schedulerEvents/startTime/{startTime}/endTime/{endTime}": { + "/api/secret/names": { "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", - "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", - "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" - } - } + "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", @@ -100151,7 +101609,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + "type": "string" } } } @@ -100288,21 +101746,22 @@ ] } }, - "/api/secret": { - "get": { + "/api/secret/{id}": { + "delete": { "tags": [ "secret-controller" ], - "summary": "Get Secret info by name (getSecretInfoByName)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoByName", + "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": "name", - "in": "query", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -100312,7 +101771,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/TbSecretDeleteResult" } } } @@ -100446,23 +101905,37 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/secret/{id}/description": { + "put": { "tags": [ "secret-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", + "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": "id", + "in": "path", + "description": "Unique identifier of the Secret to update", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Secret" + "type": "string", + "description": "New description for the Secret" } } - }, - "required": true + } }, "responses": { "200": { @@ -100486,7 +101959,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -100606,24 +102079,32 @@ ] } }, - "/api/secret/names": { + "/api/secret/{id}/info": { "get": { "tags": [ "secret-controller" ], - "summary": "Get Tenant Secret names (getSecretNames)", - "description": "Returns a page of secret names owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretNames", + "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" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/SecretInfo" } } } @@ -100759,18 +102240,19 @@ ] } }, - "/api/secret/{id}": { - "delete": { + "/api/secret/{id}/value": { + "put": { "tags": [ "secret-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": "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", @@ -100778,13 +102260,24 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New value for the Secret" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbSecretDeleteResult" + "$ref": "#/components/schemas/SecretInfo" } } } @@ -100920,43 +102413,77 @@ ] } }, - "/api/secret/{id}/description": { - "put": { + "/api/secrets": { + "get": { "tags": [ "secret-controller" ], - "summary": "Update Secret Description", - "description": "Updates the description of the existing Secret by secretId. Only the description can be updated. Referencing a non-existing Secret Id will cause a 'Not Found' error.", - "operationId": "updateSecretDescription", + "summary": "Get 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": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", + "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", - "format": "uuid" + "enum": [ + "name" + ] } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the 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": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/PageDataSecretInfo" } } } @@ -101092,22 +102619,29 @@ ] } }, - "/api/secret/{id}/info": { + "/api/noauth/selfRegistration/privacyPolicy": { "get": { "tags": [ - "secret-controller" + "self-registration-controller" ], - "summary": "Get Secret info by Id (getSecretInfoById)", - "description": "\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfoById", + "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": "id", - "in": "path", - "required": true, + "name": "pkgName", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PlatformType" } } ], @@ -101117,7 +102651,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "type": "string" } } } @@ -101242,55 +102776,47 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/secret/{id}/value": { - "put": { + "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { + "get": { "tags": [ - "secret-controller" + "self-registration-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 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": "id", - "in": "path", - "description": "Unique identifier of the Secret to update", - "required": true, + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platformType", + "in": "query", + "description": "Platform type", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "ANDROID", + "IOS" + ] } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New value for the Secret" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SecretInfo" + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" } } } @@ -101415,78 +102941,32 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/secrets": { + "/api/noauth/selfRegistration/termsOfUse": { "get": { "tags": [ - "secret-controller" + "self-registration-controller" ], - "summary": "Get Tenant Secret infos (getSecretInfos)", - "description": "Returns a page of secret infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getSecretInfos", + "summary": "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": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", + "name": "pkgName", "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", + "name": "platform", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/PlatformType" } } ], @@ -101496,7 +102976,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataSecretInfo" + "type": "string" } } } @@ -101621,50 +103101,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/selfRegistration/privacyPolicy": { + "/api/selfRegistration/selfRegistrationParams": { "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" - } - } - ], + "summary": "Get Self Registration parameters (getSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getWebSelfRegistrationParams", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SelfRegistrationParams" } } } @@ -101789,47 +103243,40 @@ } } } - } - } - }, - "/api/noauth/selfRegistration/signUpSelfRegistrationParams": { - "get": { - "tags": [ - "self-registration-controller" - ], - "summary": "Get Self Registration form parameters without authentication (getSignUpSelfRegistrationParams)", - "description": "Fetch the Self Registration parameters based on the domain name from the request. Available for non-authorized users. Contains the information to customize the sign-up form.", - "operationId": "getSignUpSelfRegistrationParams", - "parameters": [ + }, + "security": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platformType", - "in": "query", - "description": "Platform type", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } + "ApiKeyForm": [] } + ] + }, + "post": { + "tags": [ + "self-registration-controller" ], + "summary": "Create Or Update Self Registration parameters (saveSelfRegistrationParams)", + "description": "Creates or Updates the Self Registration parameters. When creating, platform generates Admin Settings Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Admin Settings Id will be present in the response. Specify existing Admin Settings Id to update the Self Registration parameters. Referencing non-existing Admin Settings Id will cause 'Not Found' error.\n\nSelf Registration allows users to signup for using the platform and automatically create a Customer account for them. You may configure default dashboard and user roles that will be assigned for this Customer. This allows you to build out-of-the-box solutions for customers. Ability to white-label the login and main pages helps to brand the platform.\n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveWebSelfRegistrationParams", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebSelfRegistrationParams" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + "$ref": "#/components/schemas/WebSelfRegistrationParams" } } } @@ -101845,7 +103292,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -101954,45 +103401,25 @@ } } } - } - } - }, - "/api/noauth/selfRegistration/termsOfUse": { - "get": { - "tags": [ - "self-registration-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", - "parameters": [ + }, + "security": [ { - "name": "pkgName", - "in": "query", - "required": false, - "schema": { - "type": "string" - } + "HttpLoginForm": [] }, { - "name": "platform", - "in": "query", - "required": false, - "schema": { - "$ref": "#/components/schemas/PlatformType" - } + "ApiKeyForm": [] } + ] + }, + "delete": { + "tags": [ + "self-registration-controller" ], + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -102114,24 +103541,65 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/selfRegistration/selfRegistrationParams": { - "get": { + "/api/noauth/activateByEmailCode": { + "post": { "tags": [ - "self-registration-controller" + "sign-up-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", + "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" + ] + } + } ], - "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/JwtPair" } } } @@ -102147,7 +103615,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -102256,183 +103724,60 @@ } } } - }, - "security": [ + } + } + }, + "/api/noauth/activateEmail": { + "get": { + "tags": [ + "sign-up-controller" + ], + "summary": "Activate User using code from Email (activateEmail)", + "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", + "operationId": "activateEmail", + "parameters": [ { - "HttpLoginForm": [] + "name": "emailCode", + "in": "query", + "description": "Activation token.", + "required": true, + "schema": { + "type": "string" + } }, { - "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" - } + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSelfRegistrationParams" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } + "type": "string" } } } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - }, - "delete": { - "tags": [ - "self-registration-controller" - ], - "summary": "deleteWebSelfRegistrationParams", - "operationId": "deleteWebSelfRegistrationParams", - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -102554,30 +103899,20 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/noauth/activateByEmailCode": { + "/api/noauth/cloud/activateByEmailCode": { "post": { "tags": [ "sign-up-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": "activateCloudUserByEmailCode", + "operationId": "activateCloudUserByEmailCode", "parameters": [ { "name": "emailCode", "in": "query", - "description": "Activation token.", "required": true, "schema": { "type": "string" @@ -102740,19 +104075,17 @@ } } }, - "/api/noauth/activateEmail": { + "/api/noauth/cloud/activateEmail": { "get": { "tags": [ "sign-up-controller" ], - "summary": "Activate User using code from Email (activateEmail)", - "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", - "operationId": "activateEmail", + "summary": "activateCloudEmail", + "operationId": "activateCloudEmail", "parameters": [ { "name": "emailCode", "in": "query", - "description": "Activation token.", "required": true, "schema": { "type": "string" @@ -102915,27 +104248,20 @@ } } }, - "/api/noauth/cloud/activateByEmailCode": { - "post": { + "/api/noauth/cloud/login": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "activateCloudUserByEmailCode", - "operationId": "activateCloudUserByEmailCode", + "summary": "Cloud mobile Login redirect (cloudMobileLogin)", + "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on cloud mobile app.", + "operationId": "cloudMobileLogin", "parameters": [ - { - "name": "emailCode", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pkgName", "in": "query", - "description": "Optional package name of the mobile application.", - "required": false, + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, "schema": { "type": "string" } @@ -102960,7 +104286,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "string" } } } @@ -102976,7 +104302,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103088,16 +104414,16 @@ } } }, - "/api/noauth/cloud/activateEmail": { - "get": { + "/api/noauth/cloud/resendEmailActivation": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "activateCloudEmail", - "operationId": "activateCloudEmail", + "summary": "resendCloudEmailActivation", + "operationId": "resendCloudEmailActivation", "parameters": [ { - "name": "emailCode", + "name": "email", "in": "query", "required": true, "schema": { @@ -103107,7 +104433,6 @@ { "name": "pkgName", "in": "query", - "description": "Optional package name of the mobile application.", "required": false, "schema": { "type": "string" @@ -103129,14 +104454,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -103149,7 +104467,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103261,14 +104579,14 @@ } } }, - "/api/noauth/cloud/login": { + "/api/noauth/login": { "get": { "tags": [ "sign-up-controller" ], - "summary": "Cloud mobile Login redirect (cloudMobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on cloud mobile app.", - "operationId": "cloudMobileLogin", + "summary": "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", @@ -103283,7 +104601,7 @@ "name": "platform", "in": "query", "description": "Platform type", - "required": false, + "required": true, "schema": { "type": "string", "enum": [ @@ -103427,25 +104745,29 @@ } } }, - "/api/noauth/cloud/resendEmailActivation": { + "/api/noauth/resendEmailActivation": { "post": { "tags": [ "sign-up-controller" ], - "summary": "resendCloudEmailActivation", - "operationId": "resendCloudEmailActivation", + "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" @@ -103592,45 +104914,31 @@ } } }, - "/api/noauth/login": { - "get": { + "/api/noauth/signup": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "Mobile Login redirect (mobileLogin)", - "description": "This method generates redirect to the special link that is handled by mobile application. Useful for email verification flow on mobile app.", - "operationId": "mobileLogin", - "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" + "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" + } } }, - { - "name": "platform", - "in": "query", - "description": "Platform type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ANDROID", - "IOS" - ] - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/SignUpResult" } } } @@ -103646,7 +104954,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -103758,51 +105066,165 @@ } } }, - "/api/noauth/resendEmailActivation": { - "post": { + "/api/noauth/signup/recaptchaParams": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Resend Activation Email (resendEmailActivation)", - "description": "Request to resend the activation email for the user. Checks that user was not activated yet.", - "operationId": "resendEmailActivation", - "parameters": [ - { - "name": "email", - "in": "query", - "description": "Email of the user.", - "required": true, - "schema": { - "type": "string" - }, - "example": "john.doe@company.com" + "summary": "getRecaptchaParams", + "operationId": "getRecaptchaParams", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptchaClientParams" + } + } + } }, - { - "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "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": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } } } + } + } + }, + "/api/signup/acceptPrivacyPolicy": { + "post": { + "tags": [ + "sign-up-controller" ], + "summary": "Accept privacy policy (acceptPrivacyPolicy)", + "description": "Accept privacy policy by the current user.", + "operationId": "acceptPrivacyPolicy", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } }, "400": { "description": "Bad Request", @@ -103924,34 +105346,31 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/signup": { + "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { "post": { "tags": [ "sign-up-controller" ], - "summary": "User Sign Up (signUp)", - "description": "Process user sign up request. Creates the Customer and corresponding User based on self Registration parameters for the domain. See [Self Registration Controller](/swagger-ui.html#/self-registration-controller) for more details. The result is either 'SUCCESS' or 'INACTIVE_USER_EXISTS'. If Success, the user will receive an email with instruction to activate the account. The content of the email is customizable via the mail templates.", - "operationId": "signUp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SignUpRequest" - } - } - }, - "required": true - }, + "summary": "acceptPrivacyPolicyAndTermsOfUse", + "operationId": "acceptPrivacyPolicyAndTermsOfUse", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SignUpResult" + "$ref": "#/components/schemas/JwtPair" } } } @@ -104076,23 +105495,32 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/signup/recaptchaParams": { - "get": { + "/api/signup/acceptTermsOfUse": { + "post": { "tags": [ "sign-up-controller" ], - "summary": "getRecaptchaParams", - "operationId": "getRecaptchaParams", + "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/CaptchaClientParams" + "$ref": "#/components/schemas/JwtPair" } } } @@ -104108,7 +105536,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104217,24 +105645,31 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/signup/acceptPrivacyPolicy": { - "post": { + "/api/signup/displayWelcome": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Accept privacy policy (acceptPrivacyPolicy)", - "description": "Accept privacy policy by the current user.", - "operationId": "acceptPrivacyPolicy", + "summary": "isDisplayWelcome", + "operationId": "isDisplayWelcome", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "boolean" } } } @@ -104250,7 +105685,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -104370,23 +105805,16 @@ ] } }, - "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { + "/api/signup/notDisplayWelcome": { "post": { "tags": [ "sign-up-controller" ], - "summary": "acceptPrivacyPolicyAndTermsOfUse", - "operationId": "acceptPrivacyPolicyAndTermsOfUse", + "summary": "setNotDisplayWelcome", + "operationId": "setNotDisplayWelcome", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JwtPair" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -104519,25 +105947,176 @@ ] } }, - "/api/signup/acceptTermsOfUse": { - "post": { + "/api/signup/privacyPolicyAccepted": { + "get": { "tags": [ "sign-up-controller" ], - "summary": "Accept Terms of Use (acceptTermsOfUse)", - "description": "Accept Terms of Use by the current user.", - "operationId": "acceptTermsOfUse", + "summary": "Check privacy policy (privacyPolicyAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "privacyPolicyAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "type": "boolean" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "status": 403, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "message": "Requested item wasn't found!", + "errorCode": 32, + "status": 404, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } } } } }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "message": "Too many requests for current tenant!", + "errorCode": 33, + "status": 429, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/signup/tenantAccount": { + "post": { + "tags": [ + "sign-up-controller" + ], + "summary": "deleteTenantAccount", + "operationId": "deleteTenantAccount", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTenantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -104669,13 +106248,14 @@ ] } }, - "/api/signup/displayWelcome": { + "/api/signup/termsOfUseAccepted": { "get": { "tags": [ "sign-up-controller" ], - "summary": "isDisplayWelcome", - "operationId": "isDisplayWelcome", + "summary": "Check Terms Of User (termsOfUseAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "termsOfUseAccepted", "responses": { "200": { "description": "OK", @@ -104818,163 +106398,32 @@ ] } }, - "/api/signup/notDisplayWelcome": { - "post": { + "/api/solutions/templates/details/{solutionTemplateId}": { + "get": { "tags": [ - "sign-up-controller" + "solution-controller" ], - "summary": "setNotDisplayWelcome", - "operationId": "setNotDisplayWelcome", - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "message": "Invalid request body", - "errorCode": 31, - "status": 400, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "message": "Authentication failed", - "errorCode": 10, - "status": 401, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "status": 403, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "message": "Requested item wasn't found!", - "errorCode": 32, - "status": 404, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "message": "Too many requests for current tenant!", - "errorCode": 33, - "status": 429, - "subscriptionErrorCode": null, - "subscriptionEntry": null, - "subscriptionValue": null, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, + "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": [ { - "ApiKeyForm": [] + "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" + } } - ] - } - }, - "/api/signup/privacyPolicyAccepted": { - "get": { - "tags": [ - "sign-up-controller" ], - "summary": "Check privacy policy (privacyPolicyAccepted)", - "description": "Checks that current user accepted the privacy policy.", - "operationId": "privacyPolicyAccepted", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/TenantSolutionTemplateDetails" } } } @@ -105110,25 +106559,27 @@ ] } }, - "/api/signup/tenantAccount": { - "post": { + "/api/solutions/templates/infos": { + "get": { "tags": [ - "sign-up-controller" + "solution-controller" ], - "summary": "deleteTenantAccount", - "operationId": "deleteTenantAccount", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTenantRequest" - } - } - } - }, + "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", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSolutionTemplateInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -105141,7 +106592,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105261,21 +106712,32 @@ ] } }, - "/api/signup/termsOfUseAccepted": { + "/api/solutions/templates/instructions/{solutionTemplateId}": { "get": { "tags": [ - "sign-up-controller" + "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" + } + } ], - "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": { - "type": "boolean" + "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" } } } @@ -105411,14 +106873,14 @@ ] } }, - "/api/solutions/templates/details/{solutionTemplateId}": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/delete": { + "delete": { "tags": [ "solution-controller" ], - "summary": "Get Solution template details (getSolutionTemplateDetails)", - "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getSolutionTemplateDetails", + "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", @@ -105432,14 +106894,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateDetails" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -105572,24 +107027,32 @@ ] } }, - "/api/solutions/templates/infos": { - "get": { + "/api/solutions/templates/{solutionTemplateId}/install": { + "post": { "tags": [ "solution-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": "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" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TenantSolutionTemplateInfo" - } + "$ref": "#/components/schemas/SolutionInstallResponse" } } } @@ -105605,7 +107068,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105725,32 +107188,32 @@ ] } }, - "/api/solutions/templates/instructions/{solutionTemplateId}": { - "get": { + "/api/solution/export": { + "post": { "tags": [ - "solution-controller" + "solution-export-import-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" + "summary": "Export Solution (exportSolution)", + "description": "Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", + "operationId": "exportSolution", + "requestBody": { + "description": "Export request with entity IDs and optional settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionExportRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + "$ref": "#/components/schemas/SolutionExportResponse" } } } @@ -105766,7 +107229,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -105886,28 +107349,35 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/delete": { - "delete": { + "/api/solution/import": { + "post": { "tags": [ - "solution-controller" + "solution-export-import-controller" ], - "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", - "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "uninstallSolutionTemplate", - "parameters": [ - { - "name": "solutionTemplateId", - "in": "path", - "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Import Solution (importSolution)", + "description": "Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other).\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission.", + "operationId": "importSolution", + "requestBody": { + "description": "Solution data exported via the export endpoint.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionData" + } } - } - ], + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionImportResult" + } + } + } }, "400": { "description": "Bad Request", @@ -105920,7 +107390,7 @@ "error-code-400": { "summary": "Bad Request", "value": { - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "status": 400, "subscriptionErrorCode": null, @@ -106040,32 +107510,32 @@ ] } }, - "/api/solutions/templates/{solutionTemplateId}/install": { + "/api/solution/validate": { "post": { "tags": [ - "solution-controller" + "solution-export-import-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" + "summary": "Validate Solution (validateSolution)", + "description": "Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings.\n\nAvailable for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission.", + "operationId": "validateSolution", + "requestBody": { + "description": "Solution data to validate.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionData" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SolutionInstallResponse" + "$ref": "#/components/schemas/SolutionValidationResult" } } } @@ -110423,7 +111893,7 @@ "requestBody": { "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -110774,7 +112244,7 @@ "requestBody": { "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -111704,7 +113174,7 @@ "requestBody": { "description": "A JSON with the telemetry values. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -111889,7 +113359,7 @@ "requestBody": { "description": "A JSON with the telemetry values. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -113157,7 +114627,7 @@ "requestBody": { "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", "content": { - "application/json": { + "text/plain": { "schema": { "type": "string" } @@ -116900,7 +118370,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -132776,21 +134253,31 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ADMIN_SETTINGS", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AffectedTenantAdministratorsFilter": { "allOf": [ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "AFFECTED_TENANT_ADMINISTRATORS" + } }, "AffectedUserFilter": { "allOf": [ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "AFFECTED_USER" + } }, "AggFunction": { "type": "string", @@ -132816,7 +134303,11 @@ } } } - ] + ], + "example": { + "type": "function", + "function": null + } }, "AggInput": { "discriminator": { @@ -132826,6 +134317,10 @@ "function": "#/components/schemas/AggFunctionInput" } }, + "example": { + "type": "key", + "key": null + }, "properties": { "type": { "type": "string" @@ -132849,6 +134344,11 @@ "CUSTOM": "#/components/schemas/CustomInterval" } }, + "example": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, "properties": { "type": { "type": "string" @@ -132871,7 +134371,11 @@ } } } - ] + ], + "example": { + "type": "key", + "key": null + } }, "AggMetric": { "type": "object", @@ -132932,12 +134436,10 @@ } } }, - "AiChatModelConfigObject": { - "type": "object", + "AiChatModelConfig": { "properties": { "modelType": { - "$ref": "#/components/schemas/AiModelType", - "readOnly": true + "$ref": "#/components/schemas/AiModelType" } } }, @@ -132980,9 +134482,7 @@ } }, "required": [ - "name", - "tenantId", - "version" + "name" ] }, "AiModelConfig": { @@ -133001,6 +134501,22 @@ "OLLAMA": "#/components/schemas/OllamaChatModelConfig" } }, + "example": { + "provider": "OPENAI", + "providerConfig": { + "baseUrl": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "properties": { "provider": { "type": "string" @@ -133015,7 +134531,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "AI_MODEL" + } }, "AiModelId": { "type": "object", @@ -133026,7 +134560,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "AI_MODEL", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AiModelType": { "type": "string", @@ -133236,6 +134774,13 @@ } } ], + "example": { + "triggerType": "ALARM_ASSIGNMENT", + "alarmTypes": null, + "alarmSeverities": null, + "alarmStatuses": null, + "notifyOn": null + }, "required": [ "notifyOn" ] @@ -133259,6 +134804,10 @@ } } ], + "example": { + "triggerType": "ALARM_ASSIGNMENT", + "targets": null + }, "required": [ "targets" ] @@ -133278,25 +134827,19 @@ }, "minProperties": 1 }, - "clearRule": { - "$ref": "#/components/schemas/AlarmRuleDefinition" - }, "createRules": { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/AlarmRuleDefinition" + "$ref": "#/components/schemas/AlarmRule" }, "minProperties": 1 }, + "clearRule": { + "$ref": "#/components/schemas/AlarmRule" + }, "propagate": { "type": "boolean" }, - "propagateRelationTypes": { - "type": "array", - "items": { - "type": "string" - } - }, "propagateToOwner": { "type": "boolean" }, @@ -133305,10 +134848,52 @@ }, "propagateToTenant": { "type": "boolean" + }, + "propagateRelationTypes": { + "type": "array", + "items": { + "type": "string" + } } } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "ALARM", + "arguments": null, + "createRules": null, + "clearRule": { + "condition": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + }, + "alarmDetails": null, + "dashboardId": { + "entityType": "DASHBOARD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "propagate": null, + "propagateToOwner": null, + "propagateToOwnerHierarchy": null, + "propagateToTenant": null, + "propagateRelationTypes": null + }, "required": [ "arguments", "createRules" @@ -133462,7 +135047,15 @@ } } } - ] + ], + "example": { + "triggerType": "ALARM_COMMENT", + "alarmTypes": null, + "alarmSeverities": null, + "alarmStatuses": null, + "onlyUserComments": null, + "notifyOnCommentUpdate": null + } }, "AlarmCommentRecipientsConfig": { "allOf": [ @@ -133483,6 +135076,10 @@ } } ], + "example": { + "triggerType": "ALARM_COMMENT", + "targets": null + }, "required": [ "targets" ] @@ -133496,18 +135093,41 @@ }, "AlarmCondition": { "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "SIMPLE": "#/components/schemas/SimpleAlarmCondition", + "DURATION": "#/components/schemas/DurationAlarmCondition", + "REPEATING": "#/components/schemas/RepeatingAlarmCondition" + } + }, + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + }, "properties": { - "condition": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AlarmConditionFilter" - } + "expression": { + "$ref": "#/components/schemas/AlarmConditionExpression" }, - "spec": { - "$ref": "#/components/schemas/AlarmConditionSpec", - "description": "JSON object representing alarm condition type" + "schedule": { + "$ref": "#/components/schemas/AlarmConditionValueAlarmSchedule" + }, + "type": { + "type": "string" } - } + }, + "required": [ + "expression", + "type" + ] }, "AlarmConditionExpression": { "discriminator": { @@ -133517,6 +135137,11 @@ "TBEL": "#/components/schemas/TbelAlarmConditionExpression" } }, + "example": { + "type": "SIMPLE", + "filters": null, + "operation": {} + }, "properties": { "type": { "type": "string" @@ -133529,75 +135154,38 @@ "AlarmConditionFilter": { "type": "object", "properties": { - "valueType": { - "$ref": "#/components/schemas/EntityKeyValueType", - "description": "String representation of the type of the value", - "example": "NUMERIC" - }, - "key": { - "$ref": "#/components/schemas/AlarmConditionFilterKey", - "description": "JSON object for specifying alarm condition by specific key" + "argument": { + "type": "string", + "minLength": 1 }, - "predicate": { - "$ref": "#/components/schemas/KeyFilterPredicate", - "description": "JSON object representing filter condition" + "valueType": { + "$ref": "#/components/schemas/EntityKeyValueType" }, - "value": { - "description": "Value used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is used" - } - } - }, - "AlarmConditionFilterKey": { - "type": "object", - "properties": { - "type": { - "$ref": "#/components/schemas/AlarmConditionKeyType", - "description": "The key type", - "example": "TIME_SERIES" + "operation": { + "$ref": "#/components/schemas/AlarmRuleComplexOperation" }, - "key": { - "type": "string", - "description": "String value representing the key", - "example": "temp" - } - } - }, - "AlarmConditionKeyType": { - "type": "string", - "enum": [ - "ATTRIBUTE", - "TIME_SERIES", - "ENTITY_FIELD", - "CONSTANT" - ] - }, - "AlarmConditionSpec": { - "description": "Specification for alarm conditions", - "discriminator": { - "propertyName": "type", - "mapping": { - "SIMPLE": "#/components/schemas/SimpleAlarmConditionSpec", - "DURATION": "#/components/schemas/DurationAlarmConditionSpec", - "REPEATING": "#/components/schemas/RepeatingAlarmConditionSpec" - } - }, - "properties": { - "type": { - "type": "string" + "predicates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" + }, + "minItems": 1 } }, "required": [ - "type" + "argument", + "predicates", + "valueType" ] }, - "AlarmConditionValueAlarmRuleSchedule": { + "AlarmConditionValueAlarmSchedule": { "type": "object", "properties": { + "staticValue": { + "$ref": "#/components/schemas/AlarmSchedule" + }, "dynamicValueArgument": { "type": "string" - }, - "staticValue": { - "$ref": "#/components/schemas/AlarmRuleSchedule" } } }, @@ -134009,7 +135597,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ALARM", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AlarmInfo": { "type": "object", @@ -134202,6 +135794,15 @@ } } ], + "example": { + "triggerType": "ALARM", + "alarmTypes": null, + "alarmSeverities": null, + "notifyOn": null, + "clearRule": { + "alarmStatuses": null + } + }, "required": [ "notifyOn" ] @@ -134210,28 +135811,17 @@ "type": "object", "properties": { "condition": { - "$ref": "#/components/schemas/AlarmCondition", - "description": "JSON object representing the alarm rule condition" + "$ref": "#/components/schemas/AlarmCondition" }, "alarmDetails": { - "type": "string", - "description": "String value representing the additional details for an alarm rule" + "type": "string" }, "dashboardId": { - "$ref": "#/components/schemas/DashboardId", - "description": "JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application" - }, - "schedule": { - "$ref": "#/components/schemas/AlarmSchedule", - "description": "JSON object representing time interval during which the rule is active" - } - } - }, - "AlarmRuleAnyTimeSchedule": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleSchedule" + "$ref": "#/components/schemas/DashboardId" } + }, + "required": [ + "condition" ] }, "AlarmRuleBooleanFilterPredicate": { @@ -134243,7 +135833,7 @@ "type": "object", "properties": { "operation": { - "$ref": "#/components/schemas/BooleanOperation" + "$ref": "#/components/schemas/AlarmRuleBooleanOperation" }, "value": { "$ref": "#/components/schemas/AlarmConditionValueBoolean" @@ -134251,11 +135841,26 @@ } } ], + "example": { + "type": "BOOLEAN", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "operation", "value" ] }, + "AlarmRuleBooleanOperation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL" + ] + }, "AlarmRuleComplexFilterPredicate": { "allOf": [ { @@ -134265,7 +135870,7 @@ "type": "object", "properties": { "operation": { - "$ref": "#/components/schemas/ComplexOperation" + "$ref": "#/components/schemas/AlarmRuleComplexOperation" }, "predicates": { "type": "array", @@ -134275,139 +135880,137 @@ } } } + ], + "example": { + "type": "COMPLEX", + "operation": {}, + "predicates": null + } + }, + "AlarmRuleComplexOperation": { + "type": "string", + "enum": [ + "AND", + "OR" ] }, - "AlarmRuleCondition": { + "AlarmRuleDefinition": { "type": "object", - "discriminator": { - "propertyName": "type", - "mapping": { - "SIMPLE": "#/components/schemas/AlarmRuleSimpleCondition", - "DURATION": "#/components/schemas/AlarmRuleDurationCondition", - "REPEATING": "#/components/schemas/AlarmRuleRepeatingCondition" - } - }, "properties": { - "expression": { - "$ref": "#/components/schemas/AlarmConditionExpression" + "id": { + "$ref": "#/components/schemas/CalculatedFieldId", + "description": "JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error." }, - "schedule": { - "$ref": "#/components/schemas/AlarmConditionValueAlarmRuleSchedule" + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm rule creation, in milliseconds", + "example": 1609459200000, + "readOnly": true }, - "type": { - "type": "string" - } - }, - "required": [ - "expression", - "type" - ] - }, - "AlarmRuleConditionFilter": { - "type": "object", - "properties": { - "argument": { + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "name": { "type": "string", - "minLength": 1 + "description": "User defined name of the alarm rule." }, - "operation": { - "$ref": "#/components/schemas/ComplexOperation" + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." }, - "predicates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" - }, - "minItems": 1 + "configurationVersion": { + "type": "integer", + "format": "int32", + "description": "Version of alarm rule configuration.", + "example": 0 }, - "valueType": { - "$ref": "#/components/schemas/EntityKeyValueType" - } - }, - "required": [ - "argument", - "predicates", - "valueType" - ] - }, - "AlarmRuleCustomTimeSchedule": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleSchedule" + "configuration": { + "$ref": "#/components/schemas/AlarmCalculatedFieldConfiguration" }, - { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AlarmRuleCustomTimeScheduleItem" - } - }, - "timezone": { - "type": "string" - } + "version": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the alarm rule. May include: 'description' (string).", + "example": { + "description": "High temperature alarm rule" } + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "writeOnly": true } + }, + "required": [ + "configuration" ] }, - "AlarmRuleCustomTimeScheduleItem": { + "AlarmRuleDefinitionInfo": { "type": "object", "properties": { - "dayOfWeek": { + "id": { + "$ref": "#/components/schemas/CalculatedFieldId", + "description": "JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error." + }, + "createdTime": { "type": "integer", - "format": "int32" + "format": "int64", + "description": "Timestamp of the alarm rule creation, in milliseconds", + "example": 1609459200000, + "readOnly": true }, - "enabled": { - "type": "boolean" + "tenantId": { + "$ref": "#/components/schemas/TenantId" }, - "endsOn": { + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "name": { + "type": "string", + "description": "User defined name of the alarm rule." + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "configurationVersion": { "type": "integer", - "format": "int64" + "format": "int32", + "description": "Version of alarm rule configuration.", + "example": 0 }, - "startsOn": { + "configuration": { + "$ref": "#/components/schemas/AlarmCalculatedFieldConfiguration" + }, + "version": { "type": "integer", "format": "int64" - } - } - }, - "AlarmRuleDefinition": { - "type": "object", - "properties": { - "alarmDetails": { - "type": "string" }, - "condition": { - "$ref": "#/components/schemas/AlarmRuleCondition" + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the alarm rule. May include: 'description' (string).", + "example": { + "description": "High temperature alarm rule" + } }, - "dashboardId": { - "$ref": "#/components/schemas/DashboardId" - } - }, - "required": [ - "condition" - ] - }, - "AlarmRuleDurationCondition": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleCondition" + "entityName": { + "type": "string" }, - { - "type": "object", - "properties": { - "unit": { - "$ref": "#/components/schemas/TimeUnit" - }, - "value": { - "$ref": "#/components/schemas/AlarmConditionValueLong" - } - } + "debugMode": { + "type": "boolean", + "deprecated": true, + "writeOnly": true } - ], + }, "required": [ - "unit", - "value" + "configuration" ] }, "AlarmRuleKeyFilterPredicate": { @@ -134418,10 +136021,19 @@ "STRING": "#/components/schemas/AlarmRuleStringFilterPredicate", "NUMERIC": "#/components/schemas/AlarmRuleNumericFilterPredicate", "BOOLEAN": "#/components/schemas/AlarmRuleBooleanFilterPredicate", - "NO_DATA": "#/components/schemas/AlarmRuleNoDataFilterPredicate", + "NO_DATA": "#/components/schemas/NoDataFilterPredicate", "COMPLEX": "#/components/schemas/AlarmRuleComplexFilterPredicate" } }, + "example": { + "type": "STRING", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + }, + "ignoreCase": null + }, "properties": { "type": { "type": "string" @@ -134431,28 +136043,6 @@ "type" ] }, - "AlarmRuleNoDataFilterPredicate": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" - }, - { - "type": "object", - "properties": { - "duration": { - "$ref": "#/components/schemas/AlarmConditionValueLong" - }, - "unit": { - "$ref": "#/components/schemas/TimeUnit" - } - } - } - ], - "required": [ - "duration", - "unit" - ] - }, "AlarmRuleNumericFilterPredicate": { "allOf": [ { @@ -134462,7 +136052,7 @@ "type": "object", "properties": { "operation": { - "$ref": "#/components/schemas/NumericOperation" + "$ref": "#/components/schemas/AlarmRuleNumericOperation" }, "value": { "$ref": "#/components/schemas/AlarmConditionValueDouble" @@ -134470,83 +136060,28 @@ } } ], - "required": [ - "operation", - "value" - ] - }, - "AlarmRuleRepeatingCondition": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleCondition" - }, - { - "type": "object", - "properties": { - "count": { - "$ref": "#/components/schemas/AlarmConditionValueInteger" - } - } - } - ], - "required": [ - "count" - ] - }, - "AlarmRuleSchedule": { - "discriminator": { - "propertyName": "type", - "mapping": { - "ANY_TIME": "#/components/schemas/AlarmRuleAnyTimeSchedule", - "SPECIFIC_TIME": "#/components/schemas/AlarmRuleSpecificTimeSchedule", - "CUSTOM": "#/components/schemas/AlarmRuleCustomTimeSchedule" - } - }, - "properties": { - "type": { - "type": "string" + "example": { + "type": "NUMERIC", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null } }, "required": [ - "type" - ] - }, - "AlarmRuleSimpleCondition": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleCondition" - } + "operation", + "value" ] }, - "AlarmRuleSpecificTimeSchedule": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmRuleSchedule" - }, - { - "type": "object", - "properties": { - "daysOfWeek": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - }, - "uniqueItems": true - }, - "endsOn": { - "type": "integer", - "format": "int64" - }, - "startsOn": { - "type": "integer", - "format": "int64" - }, - "timezone": { - "type": "string" - } - } - } + "AlarmRuleNumericOperation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL", + "GREATER", + "LESS", + "GREATER_OR_EQUAL", + "LESS_OR_EQUAL" ] }, "AlarmRuleStringFilterPredicate": { @@ -134557,26 +136092,46 @@ { "type": "object", "properties": { - "ignoreCase": { - "type": "boolean" - }, "operation": { - "$ref": "#/components/schemas/StringOperation" + "$ref": "#/components/schemas/AlarmRuleStringOperation" }, "value": { "$ref": "#/components/schemas/AlarmConditionValueString" + }, + "ignoreCase": { + "type": "boolean" } } } ], + "example": { + "type": "STRING", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + }, + "ignoreCase": null + }, "required": [ "operation", "value" ] }, + "AlarmRuleStringOperation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL", + "STARTS_WITH", + "ENDS_WITH", + "CONTAINS", + "NOT_CONTAINS", + "IN", + "NOT_IN" + ] + }, "AlarmSchedule": { - "type": "object", - "description": "Configuration for alarm schedule", "discriminator": { "propertyName": "type", "mapping": { @@ -134585,21 +136140,16 @@ "CUSTOM": "#/components/schemas/CustomTimeSchedule" } }, + "example": { + "type": "ANY_TIME" + }, "properties": { - "dynamicValue": { - "$ref": "#/components/schemas/DynamicValueString" - }, "type": { - "$ref": "#/components/schemas/AlarmScheduleType" + "type": "string" } - } - }, - "AlarmScheduleType": { - "type": "string", - "enum": [ - "ANY_TIME", - "SPECIFIC_TIME", - "CUSTOM" + }, + "required": [ + "type" ] }, "AlarmSearchStatus": { @@ -134676,7 +136226,77 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "ALARM_TABLE", + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "showTableHeading": null, + "tableHeading": { + "text": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, + "tableSortOrder": { + "column": null, + "direction": {} + }, + "alarmSource": { + "type": {}, + "deviceId": null, + "entityAliasId": null, + "filterId": null, + "dataKeys": null, + "latestDataKeys": null, + "alarmFilterConfig": { + "typeList": null, + "statusList": null, + "severityList": null, + "assigneeId": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "searchPropagatedAlarms": null + } + }, + "timewindow": { + "history": { + "historyType": null, + "interval": {}, + "timewindowMs": null, + "fixedTimewindow": {}, + "quickInterval": {} + }, + "aggregation": { + "type": {}, + "limit": null + }, + "timezone": null + } + } }, "AliasEntityId": { "type": "object", @@ -134714,14 +136334,21 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "ALL_USERS" + } }, "AllowCreateNewDevicesDeviceProfileProvisionConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "ALLOW_CREATE_NEW_DEVICES" + } }, "AllowedPermissionsInfo": { "type": "object", @@ -134814,46 +136441,29 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/AmazonBedrockProviderConfig" }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "AMAZON_BEDROCK", + "providerConfig": { + "region": null, + "accessKeyId": null, + "secretAccessKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -134917,50 +136527,28 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/AnthropicProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "ANTHROPIC", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -134982,7 +136570,10 @@ { "$ref": "#/components/schemas/AlarmSchedule" } - ] + ], + "example": { + "type": "ANY_TIME" + } }, "ApiFeature": { "type": "string", @@ -135063,7 +136654,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "API_KEY", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ApiKeyInfo": { "type": "object", @@ -135140,7 +136735,12 @@ } } } - ] + ], + "example": { + "triggerType": "API_USAGE_LIMIT", + "apiFeatures": null, + "notifyOn": null + } }, "ApiUsageLimitRecipientsConfig": { "allOf": [ @@ -135161,6 +136761,10 @@ } } ], + "example": { + "triggerType": "API_USAGE_LIMIT", + "targets": null + }, "required": [ "targets" ] @@ -135178,7 +136782,14 @@ } } } - ] + ], + "example": { + "type": "apiUsageState", + "customerId": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "ApiUsageStateId": { "type": "object", @@ -135189,7 +136800,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "API_USAGE_STATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ApiUsageStateValue": { "type": "string", @@ -135302,7 +136917,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ASSET" + } }, "AssetId": { "type": "object", @@ -135313,7 +136946,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ASSET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AssetInfo": { "type": "object", @@ -135456,7 +137093,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ASSET_PROFILE" + } }, "AssetProfileId": { "type": "object", @@ -135467,14 +137122,18 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ASSET_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AssetProfileInfo": { "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with the entity Id. " + "$ref": "#/components/schemas/AssetProfileId", + "description": "JSON object with the Asset Profile Id." }, "name": { "type": "string", @@ -135552,7 +137211,26 @@ } } } - ] + ], + "example": { + "type": "assetSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "assetTypes": null + } }, "AssetTypeFilter": { "allOf": [ @@ -135578,7 +137256,13 @@ } } } - ] + ], + "example": { + "type": "assetType", + "assetTypes": null, + "assetNameFilter": null, + "assetType": null + } }, "AttributeData": { "type": "object", @@ -135705,7 +137389,15 @@ } } } - ] + ], + "example": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + } }, "AttributesOutput": { "allOf": [ @@ -135720,7 +137412,21 @@ } } } - ] + ], + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + }, + "type": "ATTRIBUTES" + } }, "AttributesOutputStrategy": { "discriminator": { @@ -135730,6 +137436,14 @@ "RULE_CHAIN": "#/components/schemas/AttributesRuleChainOutputStrategy" } }, + "example": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + }, "properties": { "type": { "type": "string" @@ -135744,7 +137458,10 @@ { "$ref": "#/components/schemas/AttributesOutputStrategy" } - ] + ], + "example": { + "type": "RULE_CHAIN" + } }, "AuditLog": { "type": "object", @@ -135935,6 +137652,12 @@ "type": "object", "description": "Contains unique time series and attribute key names discovered from entities matching a query,\noptionally including a sample value for each key.", "properties": { + "totalEntities": { + "type": "integer", + "format": "int32", + "description": "Total number of entities that matched the query filter.", + "example": 5 + }, "entityTypes": { "type": "array", "description": "Set of entity types found among the matched entities.", @@ -135965,7 +137688,8 @@ } }, "required": [ - "entityTypes" + "entityTypes", + "totalEntities" ] }, "AwsSnsSmsProviderConfiguration": { @@ -135990,7 +137714,13 @@ } } } - ] + ], + "example": { + "type": "AWS_SNS", + "accessKeyId": null, + "secretAccessKey": null, + "region": null + } }, "AxisPosition": { "type": "string", @@ -136044,54 +137774,31 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/AzureOpenAiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "AZURE_OPENAI", + "providerConfig": { + "endpoint": null, + "serviceVersion": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -136138,6 +137845,12 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "BACKUP_CODE", + "codes": null, + "codesLeft": null + }, "required": [ "codes" ] @@ -136157,7 +137870,11 @@ } } } - ] + ], + "example": { + "providerType": "BACKUP_CODE", + "codesQuantity": null + } }, "BadgePosition": { "type": "string", @@ -136261,6 +137978,11 @@ } } ], + "example": { + "type": "BASIC", + "username": null, + "password": null + }, "required": [ "password", "username" @@ -136275,7 +137997,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "BILLING_CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "BlobEntityId": { "type": "object", @@ -136286,7 +138012,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "BLOB_ENTITY", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "BlobEntityInfo": { "type": "object", @@ -136431,7 +138161,21 @@ } } } - ] + ], + "example": { + "type": "BOOLEAN", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + } + } }, "BooleanOperation": { "type": "string", @@ -136720,12 +138464,25 @@ "ENTITY_AGGREGATION": "#/components/schemas/EntityAggregationCalculatedFieldConfiguration" } }, - "properties": { - "type": { - "type": "string" + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null }, + "type": "SIMPLE", + "arguments": null, + "expression": null, + "useLatestTs": null + }, + "properties": { "output": { "$ref": "#/components/schemas/Output" + }, + "type": { + "type": "string" } }, "required": [ @@ -136803,7 +138560,31 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_CALCULATED_FIELD", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "entityId": "57b6bafe-d600-423c-9267-fe31e5218986", + "entityType": "DEVICE", + "msgId": "dcf44612-2ce4-4e5d-b462-ebb9c5628228", + "msgType": "POST_TELEMETRY_REQUEST", + "arguments": { + "x": { + "ts": 1739432016629, + "value": 20 + }, + "y": { + "ts": 1739429717656, + "value": 12 + } + }, + "result": { + "x + y": 32 + } + } }, "CalculatedFieldId": { "type": "object", @@ -136814,7 +138595,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CALCULATED_FIELD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CalculatedFieldInfo": { "type": "object", @@ -136913,6 +138698,15 @@ "v3": "#/components/schemas/V3CaptchaParams" } }, + "example": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, "properties": { "version": { "type": "string" @@ -136996,6 +138790,10 @@ "CURRENT_OWNER": "#/components/schemas/CurrentOwnerDynamicSourceConfiguration" } }, + "example": { + "type": "RELATION_PATH_QUERY", + "levels": null + }, "properties": { "type": { "type": "string" @@ -137030,6 +138828,18 @@ } } ], + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "CF_REPROCESSING", + "calculatedFieldId": { + "entityType": "CALCULATED_FIELD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "calculatedFieldName": null, + "startTs": null, + "endTs": null + }, "required": [ "calculatedFieldId" ] @@ -137039,7 +138849,19 @@ { "$ref": "#/components/schemas/JobResult" } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "CF_REPROCESSING" + } }, "CfReprocessingTaskFailure": { "type": "object", @@ -137174,7 +138996,11 @@ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "CHECK_PRE_PROVISIONED_DEVICES" + } }, "ChecksumAlgorithm": { "type": "string", @@ -137229,8 +139055,57 @@ } } } + ], + "example": { + "spec": "CLIENT_ATTRIBUTES_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + } + }, + "CloudDomainId": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" ] }, + "CloudDomainInfo": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/CloudDomainId" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Entity creation timestamp in milliseconds since Unix epoch", + "example": 1746028547220, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId" + }, + "domainName": { + "type": "string" + }, + "acmeCertificateId": { + "$ref": "#/components/schemas/AcmeCertificateId" + }, + "certificate": { + "$ref": "#/components/schemas/CertificateInfo" + } + } + }, "CoapDeviceProfileTransportConfiguration": { "allOf": [ { @@ -137247,7 +139122,22 @@ } } } - ] + ], + "example": { + "type": "COAP", + "coapDeviceTypeConfiguration": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + }, + "clientSettings": { + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } + } }, "CoapDeviceTransportConfiguration": { "allOf": [ @@ -137274,7 +139164,14 @@ } } } - ] + ], + "example": { + "type": "COAP", + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } }, "CoapDeviceTypeConfiguration": { "description": "CoAP device type configuration", @@ -137285,6 +139182,12 @@ "EFENTO": "#/components/schemas/EfentoCoapDeviceTypeConfiguration" } }, + "example": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + }, "properties": { "coapDeviceType": { "type": "string" @@ -137323,6 +139226,34 @@ }, "ColumnSettings": { "type": "object", + "example": { + "columnWidth": null, + "header": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "cell": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "type": "COLUMN" + }, "properties": { "columnWidth": { "type": "string" @@ -137383,7 +139314,12 @@ } } } - ] + ], + "example": { + "type": "COMPLEX", + "operation": {}, + "predicates": null + } }, "ComplexOperation": { "type": "string", @@ -137411,7 +139347,14 @@ } } } - ] + ], + "example": { + "versionName": null, + "branch": null, + "type": "COMPLEX", + "syncStrategy": {}, + "entityTypes": null + } }, "ComponentClusteringMode": { "type": "string", @@ -137665,7 +139608,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "CONVERTER" + } }, "ConverterId": { "type": "object", @@ -137676,7 +139637,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CONVERTER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ConverterType": { "type": "string", @@ -137720,21 +139685,36 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "COUPON", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CsvReportTemplateConfig": { "allOf": [ { "$ref": "#/components/schemas/ReportTemplateConfig" } - ] + ], + "example": { + "namePattern": null, + "timeDataPattern": null, + "format": "CSV", + "entityAliases": null, + "filters": null, + "components": null + } }, "CurrentOwnerDynamicSourceConfiguration": { "allOf": [ { "$ref": "#/components/schemas/CfArgumentDynamicSourceConfiguration" } - ] + ], + "example": { + "type": "CURRENT_OWNER" + } }, "CustomInterval": { "allOf": [ @@ -137760,6 +139740,12 @@ } } ], + "example": { + "type": "CUSTOM", + "tz": null, + "offsetSec": null, + "durationSec": null + }, "required": [ "durationSec", "tz" @@ -137824,7 +139810,6 @@ }, "CustomMenuConfig": { "type": "object", - "description": "A JSON value representing the custom menu configuration", "properties": { "items": { "type": "array", @@ -137979,6 +139964,19 @@ } } ], + "example": { + "type": "CUSTOM", + "visible": null, + "name": "My Custom Menu", + "icon": "My Custom Menu", + "menuItemType": "LINK", + "linkType": "URL", + "dashboardId": "https://mycompany.com", + "hideDashboardToolbar": null, + "url": "https://myexternalurl.com", + "setAccessToken": null, + "pages": null + }, "required": [ "menuItemType", "name" @@ -138009,7 +140007,14 @@ } } } - ] + ], + "example": { + "type": "CUSTOM", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "path": "/alarmDetails/868c7083-032d-4f52-b8b4-7859aebb6a4e" + } }, "CustomTimeSchedule": { "allOf": [ @@ -138030,7 +140035,12 @@ } } } - ] + ], + "example": { + "type": "CUSTOM", + "timezone": null, + "items": null + } }, "CustomTimeScheduleItem": { "type": "object", @@ -138153,7 +140163,6 @@ } }, "required": [ - "email", "title" ] }, @@ -138162,7 +140171,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "CUSTOMER" + } }, "CustomerId": { "type": "object", @@ -138173,7 +140200,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CustomerInfo": { "type": "object", @@ -138289,7 +140320,6 @@ } }, "required": [ - "email", "title" ] }, @@ -138308,6 +140338,10 @@ } } ], + "example": { + "type": "CUSTOMER_USERS", + "customerId": null + }, "required": [ "customerId" ] @@ -138440,6 +140474,42 @@ } } ], + "example": { + "subType": {}, + "type": "DASHBOARD", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "config": { + "baseUrl": "https:thingsboard.cloud", + "dashboardId": "784f394c-42b6-435a-983c-b7beff2784f9", + "state": null, + "timezone": "Europe/Kiev", + "useDashboardTimewindow": true, + "timewindow": {}, + "namePattern": "report-%d{yyyy-MM-dd_HH:mm:ss}", + "type": "pdf", + "useCurrentUserCredentials": true, + "userId": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, "required": [ "config" ] @@ -138449,7 +140519,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DASHBOARD" + } }, "DashboardId": { "type": "object", @@ -138460,7 +140548,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DASHBOARD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DashboardInfo": { "type": "object", @@ -138577,7 +140669,14 @@ } } } - ] + ], + "example": { + "type": "DASHBOARD", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "dashboardId": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DashboardReportConfig": { "type": "object", @@ -138702,6 +140801,34 @@ "DEFAULT": "#/components/schemas/DefaultDataKeySettings" } }, + "example": { + "columnWidth": null, + "header": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "cell": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "type": "COLUMN" + }, "properties": { "type": { "$ref": "#/components/schemas/DataKeySettingsType", @@ -138790,6 +140917,11 @@ } } ], + "example": { + "type": "DAY", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -138834,7 +140966,18 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_CONVERTER", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "type": null, + "in": null, + "out": null, + "metadata": null + } }, "DebugIntegrationEventFilter": { "allOf": [ @@ -138873,7 +141016,17 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_INTEGRATION", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "type": null, + "message": null, + "statusIntegration": null + } }, "DebugSettings": { "type": "object", @@ -138908,7 +141061,13 @@ } } } - ] + ], + "example": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + } }, "DefaultDashboardParams": { "type": "object", @@ -138929,7 +141088,10 @@ { "$ref": "#/components/schemas/DataKeySettings" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceConfiguration": { "allOf": [ @@ -138937,7 +141099,10 @@ "$ref": "#/components/schemas/DeviceConfiguration" } ], - "description": "Default device configuration" + "description": "Default device configuration", + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceProfileConfiguration": { "allOf": [ @@ -138945,21 +141110,30 @@ "$ref": "#/components/schemas/DeviceProfileConfiguration" } ], - "description": "Default device profile configuration" + "description": "Default device profile configuration", + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceProfileTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceTransportConfiguration" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultMenuItem": { "allOf": [ @@ -138998,7 +141172,15 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "visible": null, + "id": "home", + "name": "My Custom Menu", + "icon": "My Custom Menu", + "pages": null + } }, "DefaultMobilePage": { "allOf": [ @@ -139025,7 +141207,14 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "id": "HOME" + } }, "DefaultPageId": { "type": "string", @@ -139443,7 +141632,102 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "maxDevices": null, + "maxAssets": null, + "maxCustomers": null, + "maxUsers": null, + "maxDashboards": null, + "maxRuleChains": null, + "maxEdges": null, + "maxResourcesInBytes": null, + "maxOtaPackagesInBytes": null, + "maxResourceSize": null, + "maxReportSizeInBytes": null, + "maxIntegrations": null, + "maxConverters": null, + "maxSchedulerEvents": null, + "whiteLabelingEnabled": null, + "trendzEnabled": null, + "edgeEnabled": null, + "transportTenantMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60", + "transportDeviceMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayDeviceMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "integrationMsgsPerTenantRateLimit": "20:1,600:60", + "integrationMsgsPerDeviceRateLimit": "20:1,600:60", + "integrationMsgsPerAssetRateLimit": null, + "tenantEntityExportRateLimit": "20:1,600:60", + "tenantEntityImportRateLimit": "20:1,600:60", + "tenantNotificationRequestsRateLimit": "20:1,600:60", + "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60", + "maxTransportMessages": 10000000, + "maxTransportDataPoints": 10000000, + "maxREExecutions": 4000000, + "maxJSExecutions": 5000000, + "maxTbelExecutions": 5000000, + "maxDPStorageDays": 0, + "maxRuleNodeExecutionsPerMessage": 50, + "maxDebugModeDurationMinutes": 15, + "maxEmails": 0, + "smsEnabled": true, + "maxSms": 0, + "maxCreatedAlarms": 1000, + "maxGeneratedReports": 10000, + "maxAiCredits": 10000, + "tenantServerRestLimitsConfiguration": null, + "customerServerRestLimitsConfiguration": null, + "maxWsSessionsPerTenant": null, + "maxWsSessionsPerCustomer": null, + "maxWsSessionsPerRegularUser": null, + "maxWsSessionsPerPublicUser": null, + "wsMsgQueueLimitPerSession": null, + "maxWsSubscriptionsPerTenant": null, + "maxWsSubscriptionsPerCustomer": null, + "maxWsSubscriptionsPerRegularUser": null, + "maxWsSubscriptionsPerPublicUser": null, + "wsUpdatesPerSessionRateLimit": null, + "cassandraReadQueryTenantCoreRateLimits": null, + "cassandraWriteQueryTenantCoreRateLimits": null, + "cassandraReadQueryTenantRuleEngineRateLimits": null, + "cassandraWriteQueryTenantRuleEngineRateLimits": null, + "edgeEventRateLimits": null, + "edgeEventRateLimitsPerEdge": null, + "edgeUplinkMessagesRateLimits": null, + "edgeUplinkMessagesRateLimitsPerEdge": null, + "defaultStorageTtlDays": null, + "alarmsTtlDays": null, + "rpcTtlDays": null, + "queueStatsTtlDays": null, + "ruleEngineExceptionsTtlDays": null, + "blobEntityTtlDays": null, + "reportTtlDays": null, + "warnThreshold": null, + "maxCalculatedFieldsPerEntity": 100, + "maxArgumentsPerCF": 10, + "minAllowedScheduledUpdateIntervalInSecForCF": 10, + "maxRelationLevelPerCfArgument": 2, + "maxRelatedEntitiesToReturnPerCfArgument": 1000, + "maxDataPointsPerRollingArg": 1000, + "maxStateSizeInKBytes": 512, + "maxSingleValueArgumentSizeInKBytes": 32, + "minAllowedDeduplicationIntervalInSecForCF": 10, + "minAllowedAggregationIntervalInSecForCF": 60, + "intermediateAggregationIntervalInSecForCF": 300, + "cfReevaluationCheckInterval": 60, + "alarmsReevaluationInterval": 60, + "aiChatRequestsPerTenantRateLimit": null + } }, "DeleteTenantRequest": { "type": "object", @@ -139470,6 +141754,13 @@ "MOBILE_APP": "#/components/schemas/MobileAppDeliveryMethodNotificationTemplate" } }, + "example": { + "enabled": null, + "body": null, + "method": "WEB", + "subject": "New Message Received", + "additionalConfig": {} + }, "properties": { "enabled": { "type": "boolean" @@ -139537,7 +141828,7 @@ }, "deviceProfileId": { "$ref": "#/components/schemas/DeviceProfileId", - "description": "JSON object with Device Profile Id." + "description": "JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used." }, "deviceData": { "$ref": "#/components/schemas/DeviceData", @@ -139560,10 +141851,7 @@ "description": "JSON object with Customer or Tenant Id", "readOnly": true } - }, - "required": [ - "deviceProfileId" - ] + } }, "DeviceActivityNotificationRuleTriggerConfig": { "allOf": [ @@ -139600,6 +141888,12 @@ } } ], + "example": { + "triggerType": "DEVICE_ACTIVITY", + "devices": null, + "deviceProfiles": null, + "notifyOn": null + }, "required": [ "notifyOn" ] @@ -139623,6 +141917,10 @@ } } ], + "example": { + "triggerType": "DEVICE_ACTIVITY", + "targets": null + }, "required": [ "targets" ] @@ -139636,6 +141934,9 @@ "DEFAULT": "#/components/schemas/DefaultDeviceConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "$ref": "#/components/schemas/DeviceProfileType", @@ -139742,9 +142043,6 @@ }, "DeviceExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -139752,8 +142050,41 @@ "$ref": "#/components/schemas/DeviceCredentials" } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "credentials": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "createdTime": 1609459200000, + "deviceId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "credentialsType": {}, + "credentialsId": "Access token or other value that depends on the credentials type", + "credentialsValue": "Null in case of ACCESS_TOKEN. See model definition.", + "version": null + }, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE" + } }, "DeviceGroupOtaPackage": { "type": "object", @@ -139786,7 +142117,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DeviceInfo": { "type": "object", @@ -139838,7 +142173,7 @@ }, "deviceProfileId": { "$ref": "#/components/schemas/DeviceProfileId", - "description": "JSON object with Device Profile Id." + "description": "JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used." }, "deviceData": { "$ref": "#/components/schemas/DeviceData", @@ -139879,10 +142214,7 @@ "description": "JSON object with Customer or Tenant Id", "readOnly": true } - }, - "required": [ - "deviceProfileId" - ] + } }, "DeviceProfile": { "type": "object", @@ -139971,59 +142303,6 @@ } } }, - "DeviceProfileAlarm": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "String value representing the alarm rule id", - "example": "highTemperatureAlarmID" - }, - "alarmType": { - "type": "string", - "description": "String value representing type of the alarm", - "example": "High Temperature Alarm" - }, - "createRules": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/AlarmRule" - }, - "description": "Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details" - }, - "clearRule": { - "$ref": "#/components/schemas/AlarmRule", - "description": "JSON object representing clear alarm rule" - }, - "propagate": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to parent entities of alarm originator", - "example": true - }, - "propagateToOwner": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator", - "example": true - }, - "propagateToOwnerHierarchy": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy", - "example": true - }, - "propagateToTenant": { - "type": "boolean", - "description": "Propagation flag to specify if alarm should be propagated to the tenant entity", - "example": true - }, - "propagateRelationTypes": { - "type": "array", - "description": "JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.", - "items": { - "type": "string" - } - } - } - }, "DeviceProfileConfiguration": { "description": "Device profile configuration", "discriminator": { @@ -140032,6 +142311,9 @@ "DEFAULT": "#/components/schemas/DefaultDeviceProfileConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -140055,12 +142337,6 @@ "provisionConfiguration": { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration", "description": "JSON object of provisioning strategy type per device profile" - }, - "alarms": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileAlarm" - } } } }, @@ -140069,7 +142345,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE_PROFILE" + } }, "DeviceProfileId": { "type": "object", @@ -140080,14 +142374,18 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DEVICE_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DeviceProfileInfo": { "type": "object", "properties": { "id": { - "$ref": "#/components/schemas/EntityId", - "description": "JSON object with the entity Id. " + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with the Device Profile Id." }, "name": { "type": "string", @@ -140127,6 +142425,10 @@ "X509_CERTIFICATE_CHAIN": "#/components/schemas/X509CertificateChainProvisionConfiguration" } }, + "example": { + "provisionDeviceSecret": "secret123", + "type": "DISABLED" + }, "properties": { "provisionDeviceSecret": { "type": "string", @@ -140162,6 +142464,9 @@ "SNMP": "#/components/schemas/SnmpDeviceProfileTransportConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -140236,7 +142541,26 @@ } } } - ] + ], + "example": { + "type": "deviceSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "deviceTypes": null + } }, "DeviceTransportConfiguration": { "description": "Configuration for device transport", @@ -140250,6 +142574,9 @@ "SNMP": "#/components/schemas/SnmpDeviceTransportConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -140293,7 +142620,13 @@ } } } - ] + ], + "example": { + "type": "deviceType", + "deviceTypes": null, + "deviceNameFilter": null, + "deviceType": null + } }, "Direction": { "type": "string", @@ -140307,7 +142640,11 @@ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "DISABLED" + } }, "Discount": { "type": "object", @@ -140388,7 +142725,31 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "DIVIDER", + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "length": {}, + "borderType": {}, + "widthPx": null, + "color": null + } }, "Domain": { "type": "object", @@ -140444,7 +142805,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DomainInfo": { "type": "object", @@ -140472,6 +142837,14 @@ "description": "Domain name. Cannot be empty", "minLength": 1 }, + "oauth2Enabled": { + "type": "boolean", + "description": "Whether OAuth2 settings are enabled or not" + }, + "propagateToEdge": { + "type": "boolean", + "description": "Whether OAuth2 settings are enabled on Edge or not" + }, "oauth2ClientInfos": { "type": "array", "description": "List of available oauth2 clients", @@ -140479,18 +142852,10 @@ "$ref": "#/components/schemas/OAuth2ClientInfo" } }, - "oauth2Enabled": { - "type": "boolean", - "description": "Whether OAuth2 settings are enabled or not" - }, "ownerId": { "$ref": "#/components/schemas/EntityId", "description": "JSON object with Customer or Tenant Id", "readOnly": true - }, - "propagateToEdge": { - "type": "boolean", - "description": "Whether OAuth2 settings are enabled on Edge or not" } }, "required": [ @@ -140552,14 +142917,40 @@ } } ], - "description": "Dummy job configuration" + "description": "Dummy job configuration", + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "DUMMY", + "taskProcessingTimeMs": null, + "successfulTasksCount": null, + "failedTasksCount": null, + "permanentlyFailedTasksCount": null, + "errors": null, + "retries": null, + "taskProcessingTimeoutMs": null, + "generalError": null, + "submittedTasksBeforeGeneralError": null + } }, "DummyJobResult": { "allOf": [ { "$ref": "#/components/schemas/JobResult" } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "DUMMY" + } }, "DummyTaskFailure": { "type": "object", @@ -140591,26 +142982,44 @@ } ] }, - "DurationAlarmConditionSpec": { + "DurationAlarmCondition": { "allOf": [ { - "$ref": "#/components/schemas/AlarmConditionSpec" + "$ref": "#/components/schemas/AlarmCondition" }, { "type": "object", "properties": { "unit": { - "$ref": "#/components/schemas/TimeUnit", - "description": "Duration time unit" + "$ref": "#/components/schemas/TimeUnit" }, - "predicate": { - "$ref": "#/components/schemas/FilterPredicateValueLong", - "description": "Duration predicate" + "value": { + "$ref": "#/components/schemas/AlarmConditionValueLong" } } } ], - "description": "Duration Alarm Condition Specification" + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "DURATION", + "unit": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, + "required": [ + "unit", + "value" + ] }, "DynamicValueBoolean": { "type": "object", @@ -140647,42 +143056,6 @@ } } }, - "DynamicValueInteger": { - "type": "object", - "properties": { - "resolvedValue": { - "type": "integer", - "format": "int32" - }, - "sourceType": { - "$ref": "#/components/schemas/DynamicValueSourceType" - }, - "sourceAttribute": { - "type": "string" - }, - "inherit": { - "type": "boolean" - } - } - }, - "DynamicValueLong": { - "type": "object", - "properties": { - "resolvedValue": { - "type": "integer", - "format": "int64" - }, - "sourceType": { - "$ref": "#/components/schemas/DynamicValueSourceType" - }, - "sourceAttribute": { - "type": "string" - }, - "inherit": { - "type": "boolean" - } - } - }, "DynamicValueSourceType": { "type": "string", "enum": [ @@ -140818,7 +143191,11 @@ } } } - ] + ], + "example": { + "triggerType": "EDGE_COMMUNICATION_FAILURE", + "edges": null + } }, "EdgeCommunicationFailureRecipientsConfig": { "allOf": [ @@ -140839,6 +143216,10 @@ } } ], + "example": { + "triggerType": "EDGE_COMMUNICATION_FAILURE", + "targets": null + }, "required": [ "targets" ] @@ -140868,7 +143249,12 @@ } } } - ] + ], + "example": { + "triggerType": "EDGE_CONNECTION", + "edges": null, + "notifyOn": null + } }, "EdgeConnectionRecipientsConfig": { "allOf": [ @@ -140889,6 +143275,10 @@ } } ], + "example": { + "triggerType": "EDGE_CONNECTION", + "targets": null + }, "required": [ "targets" ] @@ -141049,7 +143439,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "EDGE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EdgeInfo": { "type": "object", @@ -141228,7 +143622,26 @@ } } } - ] + ], + "example": { + "type": "edgeSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "edgeTypes": null + } }, "EdgeTypeFilter": { "allOf": [ @@ -141254,7 +143667,13 @@ } } } - ] + ], + "example": { + "type": "edgeType", + "edgeTypes": null, + "edgeNameFilter": null, + "edgeType": null + } }, "EdqsApiMode": { "type": "string", @@ -141305,7 +143724,10 @@ { "$ref": "#/components/schemas/CoapDeviceTypeConfiguration" } - ] + ], + "example": { + "coapDeviceType": "EFENTO" + } }, "EmailDeliveryMethodNotificationTemplate": { "allOf": [ @@ -141322,6 +143744,12 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "EMAIL", + "subject": null + }, "required": [ "subject" ] @@ -141341,6 +143769,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "EMAIL", + "email": null + }, "required": [ "email" ] @@ -141360,7 +143793,11 @@ } } } - ] + ], + "example": { + "providerType": "EMAIL", + "verificationCodeLifetime": null + } }, "EnterpriseCaptchaParams": { "allOf": [ @@ -141396,7 +143833,16 @@ } } } - ] + ], + "example": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + } }, "EntitiesByGroupNameFilter": { "allOf": [ @@ -141423,7 +143869,18 @@ } } } - ] + ], + "example": { + "type": "entitiesByGroupName", + "groupType": {}, + "ownerId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityGroupNameFilter": null, + "groupStateEntity": null, + "stateEntityParamName": null + } }, "EntitiesLimitNotificationRuleTriggerConfig": { "allOf": [ @@ -141447,7 +143904,12 @@ } } } - ] + ], + "example": { + "triggerType": "ENTITIES_LIMIT", + "entityTypes": null, + "threshold": null + } }, "EntitiesLimitRecipientsConfig": { "allOf": [ @@ -141468,6 +143930,10 @@ } } ], + "example": { + "triggerType": "ENTITIES_LIMIT", + "targets": null + }, "required": [ "targets" ] @@ -141514,7 +143980,14 @@ } } } - ] + ], + "example": { + "triggerType": "ENTITY_ACTION", + "entityTypes": null, + "created": null, + "updated": null, + "deleted": null + } }, "EntityActionRecipientsConfig": { "allOf": [ @@ -141535,6 +144008,10 @@ } } ], + "example": { + "triggerType": "ENTITY_ACTION", + "targets": null + }, "required": [ "targets" ] @@ -141554,9 +144031,6 @@ }, "minProperties": 1 }, - "interval": { - "$ref": "#/components/schemas/AggInterval" - }, "metrics": { "type": "object", "additionalProperties": { @@ -141564,15 +144038,39 @@ }, "minProperties": 1 }, - "produceIntermediateResult": { - "type": "boolean" + "interval": { + "$ref": "#/components/schemas/AggInterval" }, "watermark": { "$ref": "#/components/schemas/Watermark" + }, + "produceIntermediateResult": { + "type": "boolean" } } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "ENTITY_AGGREGATION", + "arguments": null, + "metrics": null, + "interval": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, + "watermark": { + "duration": null + }, + "produceIntermediateResult": null + }, "required": [ "arguments", "interval", @@ -141791,6 +144289,36 @@ "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateExportData" } }, + "example": { + "credentials": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "createdTime": 1609459200000, + "deviceId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "credentialsType": {}, + "credentialsId": "Access token or other value that depends on the credentials type", + "credentialsValue": "Null in case of ACCESS_TOKEN. See model definition.", + "version": null + }, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE" + }, "properties": { "entity": { "$ref": "#/components/schemas/ExportableEntity" @@ -141825,6 +144353,29 @@ "entityType" ] }, + "EntityExportSettings": { + "type": "object", + "properties": { + "exportRelations": { + "type": "boolean" + }, + "exportAttributes": { + "type": "boolean" + }, + "exportCredentials": { + "type": "boolean" + }, + "exportCalculatedFields": { + "type": "boolean" + }, + "exportPermissions": { + "type": "boolean" + }, + "exportGroupEntities": { + "type": "boolean" + } + } + }, "EntityFilter": { "description": "Filter for selecting entities", "discriminator": { @@ -141853,6 +144404,14 @@ "schedulerEvent": "#/components/schemas/SchedulerEventFilter" } }, + "example": { + "type": "singleEntity", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, "properties": { "type": { "type": "string" @@ -141935,9 +144494,6 @@ }, "EntityGroupExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -141957,8 +144513,32 @@ "type": "boolean" } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "permissions": null, + "groupOtaPackages": null, + "groupEntities": null, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ENTITY_GROUP" + } }, "EntityGroupFilter": { "allOf": [ @@ -141985,7 +144565,15 @@ } } } - ] + ], + "example": { + "type": "entityGroup", + "groupType": {}, + "entityGroup": null, + "groupStateEntity": null, + "defaultStateGroupType": {}, + "defaultStateEntityGroup": null + } }, "EntityGroupId": { "type": "object", @@ -141996,7 +144584,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EntityGroupInfo": { "type": "object", @@ -142051,166 +144643,8 @@ }, "ownerIds": { "type": "array", - "description": "List of the entity group owners.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/AdminSettingsId" - }, - { - "$ref": "#/components/schemas/AiModelId" - }, - { - "$ref": "#/components/schemas/AlarmId" - }, - { - "$ref": "#/components/schemas/ApiKeyId" - }, - { - "$ref": "#/components/schemas/ApiUsageStateId" - }, - { - "$ref": "#/components/schemas/AssetId" - }, - { - "$ref": "#/components/schemas/AssetProfileId" - }, - { - "$ref": "#/components/schemas/BillingCustomerId" - }, - { - "$ref": "#/components/schemas/BlobEntityId" - }, - { - "$ref": "#/components/schemas/CalculatedFieldId" - }, - { - "$ref": "#/components/schemas/ConverterId" - }, - { - "$ref": "#/components/schemas/CouponId" - }, - { - "$ref": "#/components/schemas/CustomerId" - }, - { - "$ref": "#/components/schemas/DashboardId" - }, - { - "$ref": "#/components/schemas/DeviceId" - }, - { - "$ref": "#/components/schemas/DeviceProfileId" - }, - { - "$ref": "#/components/schemas/DomainId" - }, - { - "$ref": "#/components/schemas/EdgeId" - }, - { - "$ref": "#/components/schemas/EntityGroupId" - }, - { - "$ref": "#/components/schemas/EntityViewId" - }, - { - "$ref": "#/components/schemas/GroupPermissionId" - }, - { - "$ref": "#/components/schemas/IntegrationId" - }, - { - "$ref": "#/components/schemas/JobId" - }, - { - "$ref": "#/components/schemas/MobileAppBundleId" - }, - { - "$ref": "#/components/schemas/MobileAppId" - }, - { - "$ref": "#/components/schemas/NotificationId" - }, - { - "$ref": "#/components/schemas/NotificationRequestId" - }, - { - "$ref": "#/components/schemas/NotificationRuleId" - }, - { - "$ref": "#/components/schemas/NotificationTargetId" - }, - { - "$ref": "#/components/schemas/NotificationTemplateId" - }, - { - "$ref": "#/components/schemas/OAuth2ClientId" - }, - { - "$ref": "#/components/schemas/OtaPackageId" - }, - { - "$ref": "#/components/schemas/ProductId" - }, - { - "$ref": "#/components/schemas/QueueId" - }, - { - "$ref": "#/components/schemas/QueueStatsId" - }, - { - "$ref": "#/components/schemas/ReportId" - }, - { - "$ref": "#/components/schemas/ReportTemplateId" - }, - { - "$ref": "#/components/schemas/RoleId" - }, - { - "$ref": "#/components/schemas/RpcId" - }, - { - "$ref": "#/components/schemas/RuleChainId" - }, - { - "$ref": "#/components/schemas/RuleNodeId" - }, - { - "$ref": "#/components/schemas/SchedulerEventId" - }, - { - "$ref": "#/components/schemas/SecretId" - }, - { - "$ref": "#/components/schemas/SubscriptionAddonId" - }, - { - "$ref": "#/components/schemas/SubscriptionId" - }, - { - "$ref": "#/components/schemas/SubscriptionPlanId" - }, - { - "$ref": "#/components/schemas/TbResourceId" - }, - { - "$ref": "#/components/schemas/TenantId" - }, - { - "$ref": "#/components/schemas/TenantProfileId" - }, - { - "$ref": "#/components/schemas/UserId" - }, - { - "$ref": "#/components/schemas/WidgetTypeId" - }, - { - "$ref": "#/components/schemas/WidgetsBundleId" - } - ] + "$ref": "#/components/schemas/EntityId" }, "uniqueItems": true }, @@ -142230,7 +144664,6 @@ }, "required": [ "name", - "ownerIds", "type" ] }, @@ -142253,7 +144686,12 @@ } } } - ] + ], + "example": { + "type": "entityGroupList", + "groupType": {}, + "entityGroupList": null + } }, "EntityGroupNameFilter": { "allOf": [ @@ -142271,7 +144709,12 @@ } } } - ] + ], + "example": { + "type": "entityGroupName", + "groupType": {}, + "entityGroupNameFilter": null + } }, "EntityId": { "type": "object", @@ -142332,6 +144775,10 @@ "SUBSCRIPTION_ADDON": "#/components/schemas/SubscriptionAddonId" } }, + "example": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, "properties": { "entityType": { "$ref": "#/components/schemas/EntityType", @@ -142413,7 +144860,12 @@ } } } - ] + ], + "example": { + "type": "entityList", + "entityType": {}, + "entityList": null + } }, "EntityLoadError": { "type": "object", @@ -142448,7 +144900,12 @@ } } } - ] + ], + "example": { + "type": "entityName", + "entityType": {}, + "entityNameFilter": null + } }, "EntityRelation": { "type": "object", @@ -142628,7 +145085,46 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "ENTITY_TABLE", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "showTableHeading": null, + "tableHeading": { + "text": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, + "tableSortOrder": { + "column": null, + "direction": {} + } + } }, "EntityType": { "type": "string", @@ -142700,7 +145196,11 @@ } } } - ] + ], + "example": { + "type": "entityType", + "entityType": {} + } }, "EntityTypeLoadResult": { "type": "object", @@ -142821,7 +145321,13 @@ } } } - ] + ], + "example": { + "versionId": null, + "type": "ENTITY_TYPE", + "entityTypes": null, + "rollbackOnError": null + } }, "EntityVersion": { "type": "object", @@ -142922,7 +145428,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ENTITY_VIEW" + } }, "EntityViewId": { "type": "object", @@ -142933,7 +145457,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ENTITY_VIEW", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EntityViewInfo": { "type": "object", @@ -143082,7 +145610,26 @@ } } } - ] + ], + "example": { + "type": "entityViewSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityViewTypes": null + } }, "EntityViewTypeFilter": { "allOf": [ @@ -143108,7 +145655,13 @@ } } } - ] + ], + "example": { + "type": "entityViewType", + "entityViewTypes": null, + "entityViewNameFilter": null, + "entityViewType": null + } }, "ErrorComponent": { "allOf": [ @@ -143151,11 +145704,11 @@ "type": "integer", "format": "int32" }, - "className": { - "type": "string" - }, "nativeMethod": { "type": "boolean" + }, + "className": { + "type": "string" } } } @@ -143192,11 +145745,11 @@ "type": "integer", "format": "int32" }, - "className": { - "type": "string" - }, "nativeMethod": { "type": "boolean" + }, + "className": { + "type": "string" } } } @@ -143233,11 +145786,11 @@ "type": "integer", "format": "int32" }, - "className": { - "type": "string" - }, "nativeMethod": { "type": "boolean" + }, + "className": { + "type": "string" } } } @@ -143258,7 +145811,13 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "ERROR", + "errorMessage": null, + "exception": null + } }, "ErrorEventFilter": { "allOf": [ @@ -143285,7 +145844,14 @@ } } } - ] + ], + "example": { + "eventType": "ERROR", + "notEmpty": null, + "server": "ip-172-31-24-152", + "method": "onClusterEventMsg", + "errorStr": "not present in the DB" + } }, "EscalatedNotificationRuleRecipientsConfig": { "allOf": [ @@ -143310,6 +145876,10 @@ } ], "description": "Escalated notification rule recipients configuration", + "example": { + "triggerType": "ALARM", + "escalationTable": null + }, "required": [ "escalationTable" ] @@ -143331,6 +145901,15 @@ "RAW_DATA": "#/components/schemas/RawDataEventFilter" } }, + "example": { + "eventType": "STATS", + "notEmpty": null, + "server": "ip-172-31-24-152", + "minMessagesProcessed": 25, + "maxMessagesProcessed": 250, + "minErrorsOccurred": 30, + "maxErrorsOccurred": 300 + }, "properties": { "eventType": { "$ref": "#/components/schemas/EventType", @@ -143414,11 +145993,19 @@ "ExportableEntity": { "type": "object", "properties": { + "createdTime": { + "type": "integer", + "format": "int64" + }, "id": { "$ref": "#/components/schemas/EntityId" }, "name": { "type": "string" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "writeOnly": true } } }, @@ -143436,7 +146023,11 @@ } } } - ] + ], + "example": { + "status": "FAILURE", + "errorDetails": null + } }, "Favicon": { "type": "object", @@ -143516,38 +146107,6 @@ } } }, - "FilterPredicateValueInteger": { - "type": "object", - "properties": { - "defaultValue": { - "type": "integer", - "format": "int32" - }, - "userValue": { - "type": "integer", - "format": "int32" - }, - "dynamicValue": { - "$ref": "#/components/schemas/DynamicValueInteger" - } - } - }, - "FilterPredicateValueLong": { - "type": "object", - "properties": { - "defaultValue": { - "type": "integer", - "format": "int64" - }, - "userValue": { - "type": "integer", - "format": "int64" - }, - "dynamicValue": { - "$ref": "#/components/schemas/DynamicValueLong" - } - } - }, "FilterPredicateValueString": { "type": "object", "properties": { @@ -143619,22 +146178,39 @@ "entityCoordinates": { "$ref": "#/components/schemas/EntityCoordinates" }, + "zoneGroups": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ZoneGroupConfiguration" + } + }, "scheduledUpdateEnabled": { "type": "boolean" }, "scheduledUpdateInterval": { "type": "integer", "format": "int32" - }, - "zoneGroups": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ZoneGroupConfiguration" - } } } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "GEOFENCING", + "entityCoordinates": { + "latitudeKeyName": null, + "longitudeKeyName": null + }, + "zoneGroups": null, + "scheduledUpdateEnabled": null, + "scheduledUpdateInterval": null + }, "required": [ "entityCoordinates", "output", @@ -143692,54 +146268,29 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/GitHubModelsProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "GITHUB_MODELS", + "providerConfig": { + "personalAccessToken": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -143803,58 +146354,30 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/GoogleAiGeminiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "GOOGLE_AI_GEMINI", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -143918,58 +146441,33 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/GoogleVertexAiGeminiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "GOOGLE_VERTEX_AI_GEMINI", + "providerConfig": { + "fileName": null, + "projectId": null, + "location": null, + "serviceAccountKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -144061,7 +146559,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "GROUP_PERMISSION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "GroupPermissionInfo": { "type": "object", @@ -144251,7 +146753,39 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "HEADING", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "value": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + } }, "History": { "type": "object", @@ -144275,6 +146809,87 @@ } } }, + "HomeDashboard": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the dashboard creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. " + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "name": { + "type": "string", + "description": "Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + "readOnly": true + }, + "image": { + "type": "string", + "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", + "readOnly": true + }, + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true + }, + "mobileHide": { + "type": "boolean", + "description": "Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", + "readOnly": true + }, + "mobileOrder": { + "type": "integer", + "format": "int32", + "description": "Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", + "readOnly": true + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } + }, + "version": { + "type": "integer", + "format": "int64" + }, + "hideDashboardToolbar": { + "type": "boolean", + "description": "Hide dashboard toolbar flag. Useful for rendering dashboards on mobile." + } + } + }, "HomeDashboardInfo": { "type": "object", "description": "A JSON object that represents home dashboard id and other parameters", @@ -144348,7 +146963,18 @@ } } } - ] + ], + "example": { + "type": "HOME", + "visible": null, + "id": "home", + "name": "My Custom Menu", + "icon": "My Custom Menu", + "pages": null, + "homeType": {}, + "dashboardId": null, + "hideDashboardToolbar": null + } }, "HomeMenuItemType": { "type": "string", @@ -144376,6 +147002,11 @@ } } ], + "example": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -144440,7 +147071,33 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "IMAGE", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "sourceType": {}, + "imageUrl": null + } }, "ImageSourceType": { "type": "string", @@ -144588,7 +147245,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "INTEGRATION" + } }, "IntegrationId": { "type": "object", @@ -144599,7 +147274,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "INTEGRATION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "IntegrationInfo": { "type": "object", @@ -144706,7 +147385,14 @@ } } } - ] + ], + "example": { + "triggerType": "INTEGRATION_LIFECYCLE_EVENT", + "integrationTypes": null, + "integrations": null, + "notifyOn": null, + "onlyOnError": null + } }, "IntegrationLifecycleEventRecipientsConfig": { "allOf": [ @@ -144727,6 +147413,10 @@ } } ], + "example": { + "triggerType": "INTEGRATION_LIFECYCLE_EVENT", + "targets": null + }, "required": [ "targets" ] @@ -144846,6 +147536,20 @@ "REPORT": "#/components/schemas/ReportJobConfiguration" } }, + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "DUMMY", + "taskProcessingTimeMs": null, + "successfulTasksCount": null, + "failedTasksCount": null, + "permanentlyFailedTasksCount": null, + "errors": null, + "retries": null, + "taskProcessingTimeoutMs": null, + "generalError": null, + "submittedTasksBeforeGeneralError": null + }, "properties": { "tasksKey": { "type": "string", @@ -144875,7 +147579,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "JOB", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "JobResult": { "type": "object", @@ -144888,6 +147596,18 @@ "REPORT": "#/components/schemas/ReportJobResult" } }, + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "DUMMY" + }, "properties": { "successfulCount": { "type": "integer", @@ -144970,7 +147690,10 @@ { "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" } - ] + ], + "example": { + "transportPayloadType": "JSON" + } }, "JwtPair": { "type": "object", @@ -145044,6 +147767,21 @@ "COMPLEX": "#/components/schemas/ComplexFilterPredicate" } }, + "example": { + "type": "STRING", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + }, + "ignoreCase": null + }, "properties": { "type": { "type": "string" @@ -145168,7 +147906,66 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "LATEST_CHART", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "height": null, + "latestChartSettings": { + "showTitle": null, + "title": null, + "titleFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "titleColor": null, + "titleAlignment": {}, + "units": null, + "decimals": null, + "autoScale": null, + "sortSeries": null, + "showTotal": null, + "showLegend": null, + "legendPosition": {}, + "legendLabelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendLabelColor": null, + "legendValueFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendValueColor": null, + "legendShowTotal": null + } + } }, "LegendConfig": { "type": "object", @@ -145276,7 +148073,15 @@ } } } - ] + ], + "example": { + "eventType": "LC_EVENT", + "notEmpty": null, + "server": "ip-172-31-24-152", + "event": "STARTED", + "status": "Success", + "errorStr": "not present in the DB" + } }, "LimitedApi": { "type": "string", @@ -145787,7 +148592,34 @@ } } } - ] + ], + "example": { + "type": "LWM2M", + "observeAttr": { + "keyName": null, + "observe": null, + "attribute": null, + "telemetry": null, + "attributeLwm2m": null, + "initAttrTelAsObsStrategy": null, + "observeStrategy": {} + }, + "bootstrapServerUpdateEnable": null, + "bootstrap": null, + "clientLwM2mSettings": { + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null, + "useObject19ForOtaInfo": null, + "fwUpdateStrategy": null, + "swUpdateStrategy": null, + "clientOnlyObserveAfterConnect": null, + "fwUpdateResource": null, + "swUpdateResource": null, + "defaultObjectIDVer": null + } + } }, "Lwm2mDeviceTransportConfiguration": { "allOf": [ @@ -145814,7 +148646,14 @@ } } } - ] + ], + "example": { + "type": "LWM2M", + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } }, "MapperType": { "type": "string", @@ -145855,6 +148694,17 @@ "CUSTOM": "#/components/schemas/CustomMenuItem" } }, + "example": { + "type": "HOME", + "visible": null, + "id": "home", + "name": "My Custom Menu", + "icon": "My Custom Menu", + "pages": null, + "homeType": {}, + "dashboardId": null, + "hideDashboardToolbar": null + }, "properties": { "type": { "$ref": "#/components/schemas/MenuItemType", @@ -145977,7 +148827,23 @@ } } } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "MICROSOFT_TEAMS", + "subject": null, + "themeColor": null, + "button": { + "enabled": null, + "text": null, + "linkType": {}, + "link": null, + "dashboardId": null, + "dashboardState": null, + "setEntityIdInState": null + } + } }, "MicrosoftTeamsNotificationTargetConfig": { "allOf": [ @@ -146014,6 +148880,18 @@ } } ], + "example": { + "description": null, + "type": "MICROSOFT_TEAMS", + "webhookUrl": null, + "channelName": null, + "useOldApi": null, + "email": null, + "firstName": null, + "id": null, + "lastName": null, + "title": null + }, "required": [ "channelName", "webhookUrl" @@ -146062,54 +148940,29 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/MistralAiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "MISTRAL_AI", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -146255,7 +149108,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "MOBILE_APP_BUNDLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "MobileAppBundleInfo": { "type": "object", @@ -146354,6 +149211,13 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "MOBILE_APP", + "subject": "New Message Received", + "additionalConfig": {} + }, "required": [ "subject" ] @@ -146367,7 +149231,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "MOBILE_APP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "MobileAppNotificationDeliveryMethodConfig": { "allOf": [ @@ -146388,7 +149256,13 @@ } } } - ] + ], + "example": { + "method": "MOBILE_APP", + "firebaseServiceAccountCredentialsFileName": null, + "firebaseServiceAccountCredentials": null, + "useSystemSettings": null + } }, "MobileAppStatus": { "type": "string", @@ -146443,6 +149317,13 @@ "CUSTOM": "#/components/schemas/CustomMobilePage" } }, + "example": { + "type": "DEFAULT", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "id": "HOME" + }, "properties": { "type": { "$ref": "#/components/schemas/MobilePageType" @@ -146500,6 +149381,50 @@ } } ], + "example": { + "type": "MOBILE", + "enabled": null, + "title": null, + "captcha": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, + "permissions": null, + "notificationRecipient": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "signUpFields": null, + "customerTitlePrefix": null, + "showPrivacyPolicy": null, + "showTermsOfUse": null, + "defaultDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "fullscreen": null + }, + "homeDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "hideToolbar": null + }, + "customerGroupId": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customMenuId": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "privacyPolicy": null, + "redirect": { + "scheme": null, + "host": null + }, + "termsOfUse": null + }, "required": [ "redirect" ] @@ -146546,6 +149471,11 @@ } } ], + "example": { + "type": "MONTH", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -146585,14 +149515,29 @@ } } } - ] + ], + "example": { + "type": "MQTT", + "deviceTelemetryTopic": null, + "deviceAttributesTopic": null, + "deviceAttributesSubscribeTopic": null, + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + }, + "sparkplug": null, + "sparkplugAttributesMetricNames": null, + "sendAckOnValidationException": null + } }, "MqttDeviceTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceTransportConfiguration" } - ] + ], + "example": { + "type": "MQTT" + } }, "NameConflictPolicy": { "type": "string", @@ -146606,7 +149551,10 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ] + ], + "example": { + "triggerType": "NEW_PLATFORM_VERSION" + } }, "NewPlatformVersionRecipientsConfig": { "allOf": [ @@ -146627,10 +149575,44 @@ } } ], + "example": { + "triggerType": "NEW_PLATFORM_VERSION", + "targets": null + }, "required": [ "targets" ] }, + "NoDataFilterPredicate": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmRuleKeyFilterPredicate" + }, + { + "type": "object", + "properties": { + "unit": { + "$ref": "#/components/schemas/TimeUnit" + }, + "duration": { + "$ref": "#/components/schemas/AlarmConditionValueLong" + } + } + } + ], + "example": { + "type": "NO_DATA", + "unit": {}, + "duration": { + "staticValue": null, + "dynamicValueArgument": null + } + }, + "required": [ + "duration", + "unit" + ] + }, "NoSecLwM2MBootstrapServerCredential": { "allOf": [ { @@ -146750,7 +149732,10 @@ { "$ref": "#/components/schemas/OllamaAuth" } - ] + ], + "example": { + "type": "NONE" + } }, "Notification": { "type": "object", @@ -146813,6 +149798,10 @@ "MOBILE_APP": "#/components/schemas/MobileAppNotificationDeliveryMethodConfig" } }, + "example": { + "method": "SLACK", + "botToken": null + }, "properties": { "method": { "type": "string" @@ -146831,7 +149820,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationInfo": { "type": "object", @@ -146948,7 +149941,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_REQUEST", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationRequestInfo": { "type": "object", @@ -147141,7 +150138,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_RULE" + } }, "NotificationRuleId": { "type": "object", @@ -147152,7 +150167,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_RULE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationRuleInfo": { "type": "object", @@ -147232,6 +150251,10 @@ "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/IntegrationLifecycleEventRecipientsConfig" } }, + "example": { + "triggerType": "ENTITY_ACTION", + "targets": null + }, "properties": { "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" @@ -147261,6 +150284,15 @@ "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/IntegrationLifecycleEventNotificationRuleTriggerConfig" } }, + "example": { + "triggerType": "ALARM", + "alarmTypes": null, + "alarmSeverities": null, + "notifyOn": null, + "clearRule": { + "alarmStatuses": null + } + }, "properties": { "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" @@ -147350,6 +150382,13 @@ "MICROSOFT_TEAMS": "#/components/schemas/MicrosoftTeamsNotificationTargetConfig" } }, + "example": { + "description": null, + "type": "PLATFORM_USERS", + "usersFilter": { + "type": null + } + }, "properties": { "description": { "type": "string" @@ -147367,7 +150406,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_TARGET" + } }, "NotificationTargetId": { "type": "object", @@ -147378,7 +150435,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationTemplate": { "type": "object", @@ -147445,7 +150506,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_TEMPLATE" + } }, "NotificationTemplateId": { "type": "object", @@ -147456,7 +150535,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationType": { "type": "string", @@ -147504,7 +150587,21 @@ } } } - ] + ], + "example": { + "type": "NUMERIC", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + } + } }, "NumericOperation": { "type": "string", @@ -147698,7 +150795,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "OAUTH2_CLIENT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "OAuth2ClientInfo": { "type": "object", @@ -148006,6 +151107,9 @@ "TOKEN": "#/components/schemas/Token" } }, + "example": { + "type": "NONE" + }, "properties": { "type": { "type": "string" @@ -148058,54 +151162,32 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/OllamaProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "topK": { - "type": "integer", - "format": "int32" }, - "contextLength": { - "type": "integer", - "format": "int32" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" - }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "OLLAMA", + "providerConfig": { + "baseUrl": null, + "auth": { + "type": null + } + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "contextLength": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -148169,54 +151251,30 @@ "maxRetries": { "type": "integer", "format": "int32" - } - } - }, - { - "$ref": "#/components/schemas/AiChatModelConfigObject" - }, - { - "type": "object", - "properties": { - "providerConfig": { - "$ref": "#/components/schemas/OpenAiProviderConfig" - }, - "modelId": { - "type": "string", - "minLength": 1 - }, - "temperature": { - "type": "number", - "format": "double" - }, - "topP": { - "type": "number", - "format": "double", - "maximum": 1 - }, - "frequencyPenalty": { - "type": "number", - "format": "double" - }, - "presencePenalty": { - "type": "number", - "format": "double" - }, - "maxOutputTokens": { - "type": "integer", - "format": "int32" }, - "timeoutSeconds": { - "type": "integer", - "format": "int32" - }, - "maxRetries": { - "type": "integer", - "format": "int32" + "modelType": { + "$ref": "#/components/schemas/AiModelType", + "readOnly": true } } } ], + "example": { + "provider": "OPENAI", + "providerConfig": { + "baseUrl": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -148264,7 +151322,10 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "ORIGINATOR_ENTITY_OWNER_USERS" + } }, "OtaPackage": { "type": "object", @@ -148372,7 +151433,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "OTA_PACKAGE" + } }, "OtaPackageId": { "type": "object", @@ -148383,7 +151462,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "OTA_PACKAGE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "OtaPackageInfo": { "type": "object", @@ -148542,17 +151625,26 @@ "ATTRIBUTES": "#/components/schemas/AttributesOutput" } }, + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": null + }, + "type": "TIME_SERIES" + }, "properties": { + "decimalsByDefault": { + "type": "integer", + "format": "int32" + }, "name": { "type": "string" }, "scope": { "$ref": "#/components/schemas/AttributeScope" }, - "decimalsByDefault": { - "type": "integer", - "format": "int32" - }, "strategy": { "$ref": "#/components/schemas/OutputStrategy" }, @@ -148660,7 +151752,11 @@ { "$ref": "#/components/schemas/ReportComponent" } - ] + ], + "example": { + "subType": {}, + "type": "PAGE_BREAK" + } }, "PageDataAiModel": { "type": "object", @@ -148782,6 +151878,66 @@ } } }, + "PageDataAlarmRuleDefinition": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmRuleDefinition" + }, + "readOnly": true + }, + "totalPages": { + "type": "integer", + "format": "int32", + "description": "Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + "readOnly": true + }, + "totalElements": { + "type": "integer", + "format": "int64", + "description": "Total number of elements in all available pages", + "readOnly": true + }, + "hasNext": { + "type": "boolean", + "description": "'false' value indicates the end of the result set", + "readOnly": true + } + } + }, + "PageDataAlarmRuleDefinitionInfo": { + "type": "object", + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmRuleDefinitionInfo" + }, + "readOnly": true + }, + "totalPages": { + "type": "integer", + "format": "int32", + "description": "Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + "readOnly": true + }, + "totalElements": { + "type": "integer", + "format": "int64", + "description": "Total number of elements in all available pages", + "readOnly": true + }, + "hasNext": { + "type": "boolean", + "description": "'false' value indicates the end of the result set", + "readOnly": true + } + } + }, "PageDataApiKeyInfo": { "type": "object", "properties": { @@ -150850,7 +154006,34 @@ } } } - ] + ], + "example": { + "namePattern": null, + "timeDataPattern": null, + "format": "PDF", + "entityAliases": null, + "filters": null, + "components": null, + "footer": { + "enabled": null, + "components": null, + "firstPage": null + }, + "header": { + "enabled": null, + "components": null, + "firstPage": null + }, + "pageBackground": null, + "pageMargins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "pageOrientation": {}, + "pageSize": {} + } }, "PieChartLabelPosition": { "type": "string", @@ -150926,6 +154109,13 @@ } } ], + "example": { + "description": null, + "type": "PLATFORM_USERS", + "usersFilter": { + "type": null + } + }, "required": [ "usersFilter" ] @@ -151011,7 +154201,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "PRODUCT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "PropagationCalculatedFieldConfiguration": { "allOf": [ @@ -151021,9 +154215,6 @@ { "type": "object", "properties": { - "applyExpressionToResolvedArguments": { - "type": "boolean" - }, "arguments": { "type": "object", "additionalProperties": { @@ -151036,10 +154227,30 @@ }, "relation": { "$ref": "#/components/schemas/RelationPathLevel" + }, + "applyExpressionToResolvedArguments": { + "type": "boolean" } } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "PROPAGATION", + "arguments": null, + "expression": null, + "relation": { + "direction": {}, + "relationType": null + }, + "applyExpressionToResolvedArguments": null + }, "required": [ "arguments", "relation" @@ -151073,7 +154284,16 @@ } } } - ] + ], + "example": { + "transportPayloadType": "PROTOBUF", + "deviceTelemetryProtoSchema": null, + "deviceAttributesProtoSchema": null, + "deviceRpcRequestProtoSchema": null, + "deviceRpcResponseProtoSchema": null, + "enableCompatibilityWithJsonPayloadFormat": null, + "useJsonPayloadFormatForDefaultDownlinkTopics": null + } }, "QRCodeConfig": { "type": "object", @@ -151188,6 +154408,11 @@ } } ], + "example": { + "type": "QUARTER", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -151250,7 +154475,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "QUEUE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "QueueStats": { "type": "object", @@ -151285,7 +154514,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "QUEUE_STATS", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "QuickTimeInterval": { "type": "string", @@ -151423,7 +154656,11 @@ } } } - ] + ], + "example": { + "triggerType": "RATE_LIMITS", + "apis": null + } }, "RateLimitsRecipientsConfig": { "allOf": [ @@ -151444,6 +154681,10 @@ } } ], + "example": { + "triggerType": "RATE_LIMITS", + "targets": null + }, "required": [ "targets" ] @@ -151476,7 +154717,15 @@ } } } - ] + ], + "example": { + "eventType": "RAW_DATA", + "notEmpty": null, + "server": "ip-172-31-24-152", + "uuid": "STARTED", + "messageType": null, + "message": null + } }, "ReadTsKvQueryResult": { "type": "object", @@ -151519,6 +154768,9 @@ { "type": "object", "properties": { + "relation": { + "$ref": "#/components/schemas/RelationPathLevel" + }, "arguments": { "type": "object", "additionalProperties": { @@ -151537,22 +154789,39 @@ }, "minProperties": 1 }, - "relation": { - "$ref": "#/components/schemas/RelationPathLevel" - }, - "scheduledUpdateEnabled": { + "useLatestTs": { "type": "boolean" }, "scheduledUpdateInterval": { "type": "integer", "format": "int32" }, - "useLatestTs": { + "scheduledUpdateEnabled": { "type": "boolean" } } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "RELATED_ENTITIES_AGGREGATION", + "relation": { + "direction": {}, + "relationType": null + }, + "arguments": null, + "deduplicationIntervalInSec": null, + "metrics": null, + "useLatestTs": null, + "scheduledUpdateInterval": null, + "scheduledUpdateEnabled": null + }, "required": [ "arguments", "metrics", @@ -151613,7 +154882,11 @@ } } } - ] + ], + "example": { + "type": "RELATION_PATH_QUERY", + "levels": null + } }, "RelationTypeGroup": { "type": "string", @@ -151678,7 +154951,29 @@ } } } - ] + ], + "example": { + "type": "relationsQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "multiRoot": null, + "multiRootEntitiesType": {}, + "multiRootEntityIds": null, + "direction": {}, + "filters": null, + "maxLevel": null, + "fetchLastLevelOnly": null, + "negate": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "RelationsSearchParameters": { "type": "object", @@ -151712,20 +155007,38 @@ } } }, - "RepeatingAlarmConditionSpec": { + "RepeatingAlarmCondition": { "allOf": [ { - "$ref": "#/components/schemas/AlarmConditionSpec" + "$ref": "#/components/schemas/AlarmCondition" }, { "type": "object", "properties": { - "predicate": { - "$ref": "#/components/schemas/FilterPredicateValueInteger", - "description": "Repeating predicate" + "count": { + "$ref": "#/components/schemas/AlarmConditionValueInteger" } } } + ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "REPEATING", + "count": { + "staticValue": null, + "dynamicValueArgument": null + } + }, + "required": [ + "count" ] }, "Report": { @@ -151875,6 +155188,38 @@ "SPLIT_VIEW": "#/components/schemas/SplitViewComponent" } }, + "example": { + "subType": {}, + "type": "HEADING", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "value": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, "properties": { "subType": { "$ref": "#/components/schemas/ReportComponentSubType" @@ -151956,7 +155301,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "REPORT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ReportInfo": { "type": "object", @@ -152063,7 +155412,72 @@ } } } - ] + ], + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "REPORT", + "reportTemplateId": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "userId": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "timezone": null, + "targets": null, + "notificationTemplateId": { + "entityType": "NOTIFICATION_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "notificationRequests": null, + "originator": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "ruleNode": { + "id": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "createdTime": 1609459200000, + "additionalInfo": { + "layoutX": 320, + "layoutY": 160, + "description": "Filter temperature data" + }, + "ruleChainId": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "type": "com.mycompany.iot.rule.engine.ProcessingNode", + "name": "Process sensor reading", + "debugSettings": { + "failuresEnabled": false, + "allEnabled": false, + "allEnabledUntil": null + }, + "singletonMode": false, + "queueName": "Main", + "configurationVersion": 0, + "configuration": {}, + "externalId": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "debugMode": null + }, + "outputTbMsgProto": null, + "queueName": null, + "schedulerEventInfo": { + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null + } + } }, "ReportJobResult": { "allOf": [ @@ -152078,19 +155492,51 @@ } } } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "REPORT", + "report": { + "id": { + "entityType": "REPORT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "createdTime": 1746028547220, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customerId": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "templateId": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "format": {}, + "name": null, + "userId": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "ownerId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } + } }, "ReportLatestChartSettings": { "type": "object", - "discriminator": { - "propertyName": "subType", - "mapping": { - "latestBarChart": "#/components/schemas/ReportBarChartSettings", - "pieChart": "#/components/schemas/ReportPieChartSettings", - "doughnutChart": "#/components/schemas/ReportDoughnutChartSettings", - "horizontalDoughnutChart": "#/components/schemas/ReportDoughnutChartSettings" - } - }, "properties": { "showTitle": { "type": "boolean" @@ -152358,6 +155804,33 @@ "CSV": "#/components/schemas/CsvReportTemplateConfig" } }, + "example": { + "namePattern": null, + "timeDataPattern": null, + "format": "PDF", + "entityAliases": null, + "filters": null, + "components": null, + "footer": { + "enabled": null, + "components": null, + "firstPage": null + }, + "header": { + "enabled": null, + "components": null, + "firstPage": null + }, + "pageBackground": null, + "pageMargins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "pageOrientation": {}, + "pageSize": {} + }, "properties": { "namePattern": { "type": "string" @@ -152397,7 +155870,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "REPORT_TEMPLATE" + } }, "ReportTemplateId": { "type": "object", @@ -152408,7 +155899,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ReportTemplateInfo": { "type": "object", @@ -152487,13 +155982,6 @@ }, "ReportTimeSeriesChartSettings": { "type": "object", - "discriminator": { - "propertyName": "subType", - "mapping": { - "barChartWithLabels": "#/components/schemas/ReportBarChartWithLabelsSettings", - "rangeChart": "#/components/schemas/ReportRangeChartSettings" - } - }, "properties": { "showTitle": { "type": "boolean" @@ -152793,6 +156281,10 @@ } } ], + "example": { + "triggerType": "RESOURCES_SHORTAGE", + "targets": null + }, "required": [ "targets" ] @@ -152843,7 +156335,13 @@ } } } - ] + ], + "example": { + "triggerType": "RESOURCES_SHORTAGE", + "cpuThreshold": null, + "ramThreshold": null, + "storageThreshold": null + } }, "RichTextComponent": { "allOf": [ @@ -152884,7 +156382,29 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "RICH_TEXT", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "value": null + } }, "Role": { "type": "object", @@ -152929,7 +156449,12 @@ "example": "GROUP" }, "permissions": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with the set of permissions. Structure is specific for role type" + }, + "excludedPermissions": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions" }, "version": { "type": "integer", @@ -152943,7 +156468,7 @@ }, "required": [ "name", - "tenantId", + "permissions", "type" ] }, @@ -152952,7 +156477,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ROLE" + } }, "RoleId": { "type": "object", @@ -152963,7 +156506,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ROLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RoleType": { "type": "string", @@ -153033,7 +156580,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RPC", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RpcStatus": { "type": "string", @@ -153102,8 +156653,7 @@ } }, "required": [ - "name", - "tenantId" + "name" ] }, "RuleChainConnectionInfo": { @@ -153192,13 +156742,18 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_RULE_CHAIN", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "message": null + } }, "RuleChainExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -153206,8 +156761,40 @@ "$ref": "#/components/schemas/RuleChainMetaData" } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "metaData": { + "ruleChainId": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "version": null, + "firstNodeIndex": null, + "nodes": null, + "connections": null, + "ruleChainConnections": null + }, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "RULE_CHAIN" + } }, "RuleChainId": { "type": "object", @@ -153218,7 +156805,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RuleChainImportResult": { "type": "object", @@ -153276,13 +156867,6 @@ "items": { "$ref": "#/components/schemas/RuleChainConnectionInfo" } - }, - "notes": { - "type": "array", - "description": "List of sticky notes placed on the rule chain canvas", - "items": { - "$ref": "#/components/schemas/RuleChainNote" - } } }, "required": [ @@ -153293,60 +156877,6 @@ "ruleChainId" ] }, - "RuleChainNote": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique identifier of the note on the canvas" - }, - "x": { - "type": "integer", - "format": "int32", - "description": "Horizontal position of the note on the canvas, in pixels" - }, - "y": { - "type": "integer", - "format": "int32", - "description": "Vertical position of the note on the canvas, in pixels" - }, - "width": { - "type": "integer", - "format": "int32", - "description": "Width of the note, in pixels" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Height of the note, in pixels" - }, - "content": { - "type": "string", - "description": "Markdown or HTML content of the note" - }, - "backgroundColor": { - "type": "string", - "description": "Background color of the note in CSS hex format, e.g. '#FFF9C4'" - }, - "borderColor": { - "type": "string", - "description": "Border color of the note in CSS hex format, e.g. '#E6C800'" - }, - "borderWidth": { - "type": "integer", - "format": "int32", - "description": "Border width of the note in pixels" - }, - "applyDefaultMarkdownStyle": { - "type": "boolean", - "description": "Whether to apply the default markdown stylesheet to the note content" - }, - "markdownCss": { - "type": "string", - "description": "Custom CSS styles applied to the note content" - } - } - }, "RuleChainOutputLabelsUsage": { "type": "object", "properties": { @@ -153436,7 +156966,16 @@ } } } - ] + ], + "example": { + "triggerType": "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "ruleChains": null, + "ruleChainEvents": null, + "onlyRuleChainLifecycleFailures": null, + "trackRuleNodeEvents": null, + "ruleNodeEvents": null, + "onlyRuleNodeLifecycleFailures": null + } }, "RuleEngineComponentLifecycleEventRecipientsConfig": { "allOf": [ @@ -153457,6 +156996,10 @@ } } ], + "example": { + "triggerType": "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "targets": null + }, "required": [ "targets" ] @@ -153606,7 +157149,22 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_RULE_NODE", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "msgDirectionType": "IN", + "entityId": "de9d54a0-2b7a-11ec-a3cc-23386423d98f", + "entityType": "DEVICE", + "msgId": "de9d54a0-2b7a-11ec-a3cc-23386423d98f", + "msgType": "POST_TELEMETRY_REQUEST", + "relationType": "Success", + "dataSearch": "humidity", + "metadataSearch": "deviceName" + } }, "RuleNodeId": { "type": "object", @@ -153617,7 +157175,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SaveDeviceWithCredentialsRequest": { "type": "object", @@ -153891,7 +157453,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "SCHEDULER_EVENT" + } }, "SchedulerEventFilter": { "allOf": [ @@ -153915,7 +157495,22 @@ } } } - ] + ], + "example": { + "type": "schedulerEvent", + "originator": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "eventType": null, + "originatorStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "SchedulerEventId": { "type": "object", @@ -153926,7 +157521,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SCHEDULER_EVENT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SchedulerEventInfo": { "type": "object", @@ -154092,6 +157691,18 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SCRIPT", + "arguments": null, + "expression": null + }, "required": [ "arguments" ] @@ -154160,7 +157771,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SECRET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SecretInfo": { "type": "object", @@ -154261,6 +157876,50 @@ "MOBILE": "#/components/schemas/MobileSelfRegistrationParams" } }, + "example": { + "type": "WEB", + "enabled": null, + "title": null, + "captcha": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, + "permissions": null, + "notificationRecipient": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "signUpFields": null, + "customerTitlePrefix": null, + "showPrivacyPolicy": null, + "showTermsOfUse": null, + "defaultDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "fullscreen": null + }, + "homeDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "hideToolbar": null + }, + "customerGroupId": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customMenuId": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "domainId": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "privacyPolicy": null, + "termsOfUse": null + }, "properties": { "type": { "$ref": "#/components/schemas/SelfRegistrationType" @@ -154371,7 +158030,11 @@ } } } - ] + ], + "example": { + "spec": "SHARED_ATTRIBUTES_SETTING", + "mappings": null + } }, "ShortCustomerInfo": { "type": "object", @@ -154506,6 +158169,25 @@ } } }, + "SimpleAlarmCondition": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmCondition" + } + ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + } + }, "SimpleAlarmConditionExpression": { "allOf": [ { @@ -154517,27 +158199,25 @@ "filters": { "type": "array", "items": { - "$ref": "#/components/schemas/AlarmRuleConditionFilter" + "$ref": "#/components/schemas/AlarmConditionFilter" }, "minItems": 1 }, "operation": { - "$ref": "#/components/schemas/ComplexOperation" + "$ref": "#/components/schemas/AlarmRuleComplexOperation" } } } ], + "example": { + "type": "SIMPLE", + "filters": null, + "operation": {} + }, "required": [ "filters" ] }, - "SimpleAlarmConditionSpec": { - "allOf": [ - { - "$ref": "#/components/schemas/AlarmConditionSpec" - } - ] - }, "SimpleCalculatedFieldConfiguration": { "allOf": [ { @@ -154562,6 +158242,19 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SIMPLE", + "arguments": null, + "expression": null, + "useLatestTs": null + }, "required": [ "arguments" ] @@ -154591,7 +158284,15 @@ } } } - ] + ], + "example": { + "type": "singleEntity", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "SingleEntityVersionCreateRequest": { "allOf": [ @@ -154609,7 +158310,24 @@ } } } - ] + ], + "example": { + "versionName": null, + "branch": null, + "type": "SINGLE_ENTITY", + "entityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "saveRelations": null, + "saveAttributes": null, + "saveCredentials": null, + "saveCalculatedFields": null, + "savePermissions": null, + "saveGroupEntities": null + } + } }, "SingleEntityVersionLoadRequest": { "allOf": [ @@ -154630,7 +158348,28 @@ } } } - ] + ], + "example": { + "versionId": null, + "type": "SINGLE_ENTITY", + "internalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "externalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "loadRelations": null, + "loadAttributes": null, + "loadCredentials": null, + "loadCalculatedFields": null, + "loadPermissions": null, + "loadGroupEntities": null, + "autoGenerateIntegrationKey": null + } + } }, "SlackConversation": { "type": "object", @@ -154675,7 +158414,12 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "SLACK" + } }, "SlackNotificationDeliveryMethodConfig": { "allOf": [ @@ -154692,6 +158436,10 @@ } } ], + "example": { + "method": "SLACK", + "botToken": null + }, "required": [ "botToken" ] @@ -154713,6 +158461,19 @@ } } ], + "example": { + "description": null, + "type": "SLACK", + "conversationType": {}, + "conversation": { + "type": {}, + "id": null, + "name": null, + "wholeName": null, + "email": null, + "title": null + } + }, "required": [ "conversation" ] @@ -154807,6 +158568,24 @@ } } ], + "example": { + "type": "SMPP", + "protocolVersion": "3.3, 3.4", + "host": null, + "port": null, + "systemId": null, + "password": null, + "systemType": null, + "bindType": {}, + "serviceType": null, + "sourceAddress": null, + "sourceTon": null, + "sourceNpi": null, + "destinationTon": null, + "destinationNpi": null, + "addressRange": null, + "codingScheme": null + }, "required": [ "host", "password", @@ -154820,7 +158599,12 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "SMS" + } }, "SmsProviderConfiguration": { "description": "Base configuration for SMS providers", @@ -154832,6 +158616,12 @@ "SMPP": "#/components/schemas/SmppSmsProviderConfiguration" } }, + "example": { + "type": "AWS_SNS", + "accessKeyId": null, + "secretAccessKey": null, + "region": null + }, "properties": { "type": { "type": "string" @@ -154857,6 +158647,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "SMS", + "phoneNumber": null + }, "required": [ "phoneNumber" ] @@ -154882,6 +158677,11 @@ } } ], + "example": { + "providerType": "SMS", + "verificationCodeLifetime": null, + "smsVerificationMessageTemplate": null + }, "required": [ "smsVerificationMessageTemplate" ] @@ -154899,6 +158699,11 @@ "TO_SERVER_RPC_REQUEST": "#/components/schemas/ToServerRpcRequestSnmpCommunicationConfig" } }, + "example": { + "spec": "TELEMETRY_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + }, "properties": { "spec": { "$ref": "#/components/schemas/SnmpCommunicationSpec", @@ -154943,7 +158748,13 @@ } } } - ] + ], + "example": { + "type": "SNMP", + "timeoutMs": null, + "retries": null, + "communicationConfigs": null + } }, "SnmpDeviceTransportConfiguration": { "allOf": [ @@ -154992,7 +158803,22 @@ } } } - ] + ], + "example": { + "type": "SNMP", + "host": null, + "port": null, + "protocolVersion": {}, + "community": null, + "username": null, + "securityName": null, + "contextName": null, + "authenticationProtocol": {}, + "authenticationPassphrase": null, + "privacyProtocol": {}, + "privacyPassphrase": null, + "engineId": null + } }, "SnmpMapping": { "type": "object", @@ -155016,6 +158842,94 @@ "V3" ] }, + "SolutionData": { + "type": "object", + "description": "Portable solution package containing exported entities grouped by type. Represents a self-contained snapshot that can be imported into another tenant.", + "properties": { + "entities": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityExportData" + } + }, + "description": "Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects." + } + }, + "required": [ + "entities" + ] + }, + "SolutionExportRequest": { + "type": "object", + "description": "Solution export request specifying which entities to include and export settings.", + "properties": { + "entityIds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "uniqueItems": true + }, + "settings": { + "$ref": "#/components/schemas/EntityExportSettings", + "description": "Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data." + } + } + }, + "SolutionExportResponse": { + "type": "object", + "description": "Solution export response containing the exported solution data and any dependency warnings.", + "properties": { + "solution": { + "$ref": "#/components/schemas/SolutionData", + "description": "The exported solution data containing all requested entities grouped by type." + }, + "warnings": { + "type": "array", + "description": "List of dependency warnings. Generated when exported entities reference other entities that are not included in the export (e.g. a device profile references a rule chain that was not selected for export).", + "example": [ + "DEVICE_PROFILE 'My DP' references RuleChain (784f394c-42b6-435a-983c-b7beff2784f9) which is not in the export selection" + ], + "items": { + "type": "string" + } + } + } + }, + "SolutionImportResult": { + "type": "object", + "description": "Result of a solution import operation.", + "properties": { + "success": { + "type": "boolean", + "description": "'true' if all entities were imported successfully.", + "example": true + }, + "created": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + }, + "description": "Number of newly created entities per entity type. Entity types with zero created entities are omitted.", + "example": { + "RULE_CHAIN": 2, + "DEVICE_PROFILE": 1, + "DEVICE": 3 + } + }, + "idMapping": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "uuid" + }, + "description": "Mapping from external entity IDs (as they appear in the solution file) to the internal entity IDs assigned during import." + } + } + }, "SolutionInstallResponse": { "type": "object", "properties": { @@ -155060,6 +158974,49 @@ "STARTUP" ] }, + "SolutionValidationResult": { + "type": "object", + "description": "Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data.", + "properties": { + "valid": { + "type": "boolean", + "description": "'true' if the solution can be imported without errors. 'false' if there are structural issues (empty entities, unsupported types, malformed data).", + "example": true + }, + "entitySummary": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + }, + "description": "Number of entities per type found in the solution file.", + "example": { + "RULE_CHAIN": 2, + "DEVICE_PROFILE": 1 + } + }, + "conflicts": { + "type": "array", + "description": "List of blocking issues that would prevent import (e.g. unsupported entity types, missing or malformed entity data).", + "example": [ + "Unsupported entity types: UNKNOWN_TYPE" + ], + "items": { + "type": "string" + } + }, + "warnings": { + "type": "array", + "description": "List of non-blocking warnings (e.g. missing dependency references).", + "example": [ + "DEVICE_PROFILE 'My DP' references rule chain (uuid) which is not included in the solution file" + ], + "items": { + "type": "string" + } + } + } + }, "SpecificTimeSchedule": { "allOf": [ { @@ -155089,7 +159046,14 @@ } } } - ] + ], + "example": { + "type": "SPECIFIC_TIME", + "timezone": null, + "daysOfWeek": null, + "startsOn": null, + "endsOn": null + } }, "SplitViewComponent": { "allOf": [ @@ -155141,7 +159105,33 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "SPLIT_VIEW", + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "leftView": {}, + "rightView": {}, + "splitPosition": null, + "splitGap": null, + "leftVerticalAlignment": {}, + "rightVerticalAlignment": {} + } }, "StarredDashboardInfo": { "type": "object", @@ -155176,7 +159166,15 @@ } } } - ] + ], + "example": { + "type": "stateEntity", + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "StateEntityOwnerFilter": { "allOf": [ @@ -155194,7 +159192,20 @@ } } } - ] + ], + "example": { + "type": "stateEntityOwner", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "StatisticsEventFilter": { "allOf": [ @@ -155235,7 +159246,16 @@ } } } - ] + ], + "example": { + "eventType": "STATS", + "notEmpty": null, + "server": "ip-172-31-24-152", + "minMessagesProcessed": 25, + "maxMessagesProcessed": 250, + "minErrorsOccurred": 30, + "maxErrorsOccurred": 300 + } }, "StoreInfo": { "type": "object", @@ -155271,7 +159291,22 @@ } } } - ] + ], + "example": { + "type": "STRING", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + }, + "ignoreCase": null + } }, "StringOperation": { "type": "string", @@ -155308,7 +159343,17 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "SUB_REPORT", + "dataSources": null, + "templateId": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "avoidPageBreakInside": null + } }, "SubmitStrategy": { "type": "object", @@ -155341,7 +159386,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SUBSCRIPTION_ADDON", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SubscriptionDetails": { "type": "object", @@ -155480,7 +159529,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SUBSCRIPTION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SubscriptionItems": { "type": "object", @@ -155553,7 +159606,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SUBSCRIPTION_PLAN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SubscriptionUsage": { "type": "object", @@ -155654,7 +159711,11 @@ } } } - ] + ], + "example": { + "status": "SUCCESS", + "generatedContent": null + } }, "SyncStrategy": { "type": "string", @@ -155668,7 +159729,10 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "SYSTEM_ADMINISTRATORS" + } }, "SystemInfo": { "type": "object", @@ -155730,6 +159794,13 @@ } }, "SystemLevelUsersFilter": {}, + "TableSortDirection": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + }, "TableSortOrder": { "type": "object", "properties": { @@ -155737,7 +159808,7 @@ "type": "string" }, "direction": { - "$ref": "#/components/schemas/Direction" + "$ref": "#/components/schemas/TableSortDirection" } } }, @@ -155746,7 +159817,10 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ] + ], + "example": { + "triggerType": "TASK_PROCESSING_FAILURE" + } }, "TaskProcessingFailureRecipientsConfig": { "allOf": [ @@ -155767,6 +159841,10 @@ } } ], + "example": { + "triggerType": "TASK_PROCESSING_FAILURE", + "targets": null + }, "required": [ "targets" ] @@ -155790,6 +159868,9 @@ "type": "integer", "format": "int64" }, + "error": { + "type": "string" + }, "jobType": { "type": "string" } @@ -155830,6 +159911,10 @@ "FAILURE": "#/components/schemas/Failure" } }, + "example": { + "status": "SUCCESS", + "generatedContent": null + }, "properties": { "status": { "type": "string", @@ -155848,6 +159933,10 @@ "TEXT": "#/components/schemas/TbTextContent" } }, + "example": { + "contentType": "TEXT", + "text": "What is the weather like in Kyiv today?" + }, "properties": { "contentType": { "type": "string" @@ -155998,7 +160087,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "TB_RESOURCE" + } }, "TbResourceId": { "type": "object", @@ -156009,7 +160116,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TB_RESOURCE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TbResourceInfo": { "type": "object", @@ -156128,6 +160239,10 @@ } ], "description": "Text-based content part of a user's prompt", + "example": { + "contentType": "TEXT", + "text": "What is the weather like in Kyiv today?" + }, "required": [ "text" ] @@ -156162,6 +160277,10 @@ } } ], + "example": { + "type": "TBEL", + "expression": null + }, "required": [ "expression" ] @@ -156268,7 +160387,12 @@ } } } - ] + ], + "example": { + "spec": "TELEMETRY_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + } }, "Tenant": { "type": "object", @@ -156491,7 +160615,12 @@ } } } - ] + ], + "example": { + "type": "TENANT_ADMINISTRATORS", + "tenantsIds": null, + "tenantProfilesIds": null + } }, "TenantId": { "type": "object", @@ -156502,7 +160631,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TenantInfo": { "type": "object", @@ -156673,6 +160806,101 @@ "DEFAULT": "#/components/schemas/DefaultTenantProfileConfiguration" } }, + "example": { + "type": "DEFAULT", + "maxDevices": null, + "maxAssets": null, + "maxCustomers": null, + "maxUsers": null, + "maxDashboards": null, + "maxRuleChains": null, + "maxEdges": null, + "maxResourcesInBytes": null, + "maxOtaPackagesInBytes": null, + "maxResourceSize": null, + "maxReportSizeInBytes": null, + "maxIntegrations": null, + "maxConverters": null, + "maxSchedulerEvents": null, + "whiteLabelingEnabled": null, + "trendzEnabled": null, + "edgeEnabled": null, + "transportTenantMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60", + "transportDeviceMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayDeviceMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "integrationMsgsPerTenantRateLimit": "20:1,600:60", + "integrationMsgsPerDeviceRateLimit": "20:1,600:60", + "integrationMsgsPerAssetRateLimit": null, + "tenantEntityExportRateLimit": "20:1,600:60", + "tenantEntityImportRateLimit": "20:1,600:60", + "tenantNotificationRequestsRateLimit": "20:1,600:60", + "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60", + "maxTransportMessages": 10000000, + "maxTransportDataPoints": 10000000, + "maxREExecutions": 4000000, + "maxJSExecutions": 5000000, + "maxTbelExecutions": 5000000, + "maxDPStorageDays": 0, + "maxRuleNodeExecutionsPerMessage": 50, + "maxDebugModeDurationMinutes": 15, + "maxEmails": 0, + "smsEnabled": true, + "maxSms": 0, + "maxCreatedAlarms": 1000, + "maxGeneratedReports": 10000, + "maxAiCredits": 10000, + "tenantServerRestLimitsConfiguration": null, + "customerServerRestLimitsConfiguration": null, + "maxWsSessionsPerTenant": null, + "maxWsSessionsPerCustomer": null, + "maxWsSessionsPerRegularUser": null, + "maxWsSessionsPerPublicUser": null, + "wsMsgQueueLimitPerSession": null, + "maxWsSubscriptionsPerTenant": null, + "maxWsSubscriptionsPerCustomer": null, + "maxWsSubscriptionsPerRegularUser": null, + "maxWsSubscriptionsPerPublicUser": null, + "wsUpdatesPerSessionRateLimit": null, + "cassandraReadQueryTenantCoreRateLimits": null, + "cassandraWriteQueryTenantCoreRateLimits": null, + "cassandraReadQueryTenantRuleEngineRateLimits": null, + "cassandraWriteQueryTenantRuleEngineRateLimits": null, + "edgeEventRateLimits": null, + "edgeEventRateLimitsPerEdge": null, + "edgeUplinkMessagesRateLimits": null, + "edgeUplinkMessagesRateLimitsPerEdge": null, + "defaultStorageTtlDays": null, + "alarmsTtlDays": null, + "rpcTtlDays": null, + "queueStatsTtlDays": null, + "ruleEngineExceptionsTtlDays": null, + "blobEntityTtlDays": null, + "reportTtlDays": null, + "warnThreshold": null, + "maxCalculatedFieldsPerEntity": 100, + "maxArgumentsPerCF": 10, + "minAllowedScheduledUpdateIntervalInSecForCF": 10, + "maxRelationLevelPerCfArgument": 2, + "maxRelatedEntitiesToReturnPerCfArgument": 1000, + "maxDataPointsPerRollingArg": 1000, + "maxStateSizeInKBytes": 512, + "maxSingleValueArgumentSizeInKBytes": 32, + "minAllowedDeduplicationIntervalInSecForCF": 10, + "minAllowedAggregationIntervalInSecForCF": 60, + "intermediateAggregationIntervalInSecForCF": 300, + "cfReevaluationCheckInterval": 60, + "alarmsReevaluationInterval": 60, + "aiChatRequestsPerTenantRateLimit": null + }, "properties": { "type": { "type": "string" @@ -156707,7 +160935,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TENANT_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TenantProfileQueueConfiguration": { "type": "object", @@ -157100,7 +161332,68 @@ } } } - ] + ], + "example": { + "type": "TIME_SERIES_CHART", + "yAxisId": null, + "showInLegend": null, + "seriesType": {}, + "lineSettings": { + "showLine": null, + "step": null, + "stepType": {}, + "smooth": null, + "lineType": {}, + "lineWidth": null, + "showPoints": null, + "showPointLabel": null, + "pointLabelPosition": {}, + "pointLabelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "pointLabelColor": null, + "enablePointLabelBackground": null, + "pointLabelBackground": null, + "pointShape": {}, + "pointSize": null, + "fillAreaSettings": { + "type": {}, + "opacity": null, + "gradient": {} + } + }, + "barSettings": { + "showBorder": null, + "borderWidth": null, + "borderRadius": null, + "barWidth": null, + "showLabel": null, + "labelPosition": {}, + "labelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "labelColor": null, + "enableLabelBackground": null, + "labelBackground": null, + "backgroundSettings": { + "type": {}, + "opacity": null, + "gradient": {} + } + }, + "comparisonSettings": { + "showValuesForComparison": null, + "comparisonValuesLabel": null, + "color": null + }, + "yaxisId": null + } }, "TimeSeriesChartNoAggregationBarWidthSettings": { "type": "object", @@ -157401,7 +161694,15 @@ } } } - ] + ], + "example": { + "type": "IMMEDIATE", + "ttl": null, + "saveTimeSeries": null, + "saveLatest": null, + "sendWsUpdate": null, + "processCfs": null + } }, "TimeSeriesOutput": { "allOf": [ @@ -157416,7 +161717,16 @@ } } } - ] + ], + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": null + }, + "type": "TIME_SERIES" + } }, "TimeSeriesOutputStrategy": { "discriminator": { @@ -157426,6 +161736,14 @@ "RULE_CHAIN": "#/components/schemas/TimeSeriesRuleChainOutputStrategy" } }, + "example": { + "type": "IMMEDIATE", + "ttl": null, + "saveTimeSeries": null, + "saveLatest": null, + "sendWsUpdate": null, + "processCfs": null + }, "properties": { "type": { "type": "string" @@ -157440,7 +161758,10 @@ { "$ref": "#/components/schemas/TimeSeriesOutputStrategy" } - ] + ], + "example": { + "type": "RULE_CHAIN" + } }, "TimeUnit": { "type": "string", @@ -157524,7 +161845,163 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "TIME_SERIES_CHART", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "height": null, + "timewindow": { + "history": { + "historyType": null, + "interval": {}, + "timewindowMs": null, + "fixedTimewindow": {}, + "quickInterval": {} + }, + "aggregation": { + "type": {}, + "limit": null + }, + "timezone": null + }, + "timeSeriesChartSettings": { + "showTitle": null, + "title": null, + "titleFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "titleColor": null, + "titleAlignment": {}, + "thresholds": null, + "stack": null, + "grid": { + "show": null, + "backgroundColor": null, + "borderWidth": null, + "borderColor": null + }, + "yAxes": null, + "xAxis": { + "show": null, + "label": null, + "labelFont": {}, + "labelColor": null, + "position": {}, + "showTickLabels": null, + "tickLabelFont": {}, + "tickLabelColor": null, + "showTicks": null, + "ticksColor": null, + "showLine": null, + "lineColor": null, + "showSplitLines": null, + "splitLinesColor": null, + "ticksFormat": null + }, + "barWidthSettings": { + "barGap": null, + "intervalGap": null + }, + "noAggregationBarWidthSettings": { + "strategy": {}, + "groupWidth": {}, + "barWidth": {} + }, + "states": null, + "comparisonEnabled": null, + "timeForComparison": {}, + "comparisonCustomIntervalValue": null, + "comparisonXAxis": { + "show": null, + "label": null, + "labelFont": {}, + "labelColor": null, + "position": {}, + "showTickLabels": null, + "tickLabelFont": {}, + "tickLabelColor": null, + "showTicks": null, + "ticksColor": null, + "showLine": null, + "lineColor": null, + "showSplitLines": null, + "splitLinesColor": null, + "ticksFormat": null + }, + "showLegend": null, + "legendColumnTitleFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendColumnTitleColor": null, + "legendLabelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendLabelColor": null, + "legendValueFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendValueColor": null, + "legendConfig": { + "position": {}, + "sortDataKeys": null, + "showMin": null, + "showMax": null, + "showAvg": null, + "showTotal": null, + "showLatest": null + }, + "xaxis": { + "show": null, + "label": null, + "labelFont": {}, + "labelColor": null, + "position": {}, + "showTickLabels": null, + "tickLabelFont": {}, + "tickLabelColor": null, + "showTicks": null, + "ticksColor": null, + "showLine": null, + "lineColor": null, + "showSplitLines": null, + "splitLinesColor": null, + "ticksFormat": null + }, + "yaxes": null + } + } }, "TimeseriesTableComponent": { "allOf": [ @@ -157586,7 +162063,91 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "TIME_SERIES_TABLE", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "showTableHeading": null, + "tableHeading": { + "text": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, + "tableSortOrder": { + "column": null, + "direction": {} + }, + "timewindow": { + "history": { + "historyType": null, + "interval": {}, + "timewindowMs": null, + "fixedTimewindow": {}, + "quickInterval": {} + }, + "aggregation": { + "type": {}, + "limit": null + }, + "timezone": null + }, + "showTimestamp": null, + "timestampLabel": null, + "timestampPattern": null, + "timestampColumnSettings": { + "columnWidth": null, + "header": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "cell": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "type": "COLUMN" + } + } }, "ToCoreEdqsRequest": { "type": "object", @@ -157615,7 +162176,11 @@ } } } - ] + ], + "example": { + "spec": "TO_DEVICE_RPC_REQUEST", + "mappings": null + } }, "ToServerRpcRequestSnmpCommunicationConfig": { "allOf": [ @@ -157633,7 +162198,11 @@ } } } - ] + ], + "example": { + "spec": "TO_SERVER_RPC_REQUEST", + "mappings": null + } }, "Token": { "allOf": [ @@ -157649,6 +162218,10 @@ } } ], + "example": { + "type": "TOKEN", + "token": null + }, "required": [ "token" ] @@ -157669,6 +162242,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "TOTP", + "authUrl": null + }, "required": [ "authUrl" ] @@ -157688,6 +162266,10 @@ } } ], + "example": { + "providerType": "TOTP", + "issuerName": null + }, "required": [ "issuerName" ] @@ -157727,6 +162309,9 @@ "PROTOBUF": "#/components/schemas/ProtoTransportPayloadConfiguration" } }, + "example": { + "transportPayloadType": "JSON" + }, "properties": { "transportPayloadType": { "type": "string" @@ -157983,7 +162568,13 @@ } } } - ] + ], + "example": { + "type": "TWILIO", + "accountSid": null, + "accountToken": null, + "numberFrom": null + } }, "TwoFaAccountConfig": { "type": "object", @@ -157997,6 +162588,11 @@ "BACKUP_CODE": "#/components/schemas/BackupCodeTwoFaAccountConfig" } }, + "example": { + "useByDefault": null, + "providerType": "TOTP", + "authUrl": null + }, "properties": { "useByDefault": { "type": "boolean" @@ -158028,6 +162624,10 @@ "BACKUP_CODE": "#/components/schemas/BackupCodeTwoFaProviderConfig" } }, + "example": { + "providerType": "TOTP", + "issuerName": null + }, "properties": { "providerType": { "type": "string" @@ -158379,6 +162979,10 @@ } } ], + "example": { + "type": "USER_GROUP_LIST", + "groupsIds": null + }, "required": [ "groupsIds" ] @@ -158392,7 +162996,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "UserInfo": { "type": "object", @@ -158508,6 +163116,10 @@ } } ], + "example": { + "type": "USER_LIST", + "usersIds": null + }, "required": [ "usersIds" ] @@ -158618,6 +163230,10 @@ } } ], + "example": { + "type": "USER_ROLE", + "rolesIds": null + }, "required": [ "rolesIds" ] @@ -158638,6 +163254,10 @@ "USER_ROLE": "#/components/schemas/UserRoleFilter" } }, + "example": { + "type": "USER_LIST", + "usersIds": null + }, "properties": { "type": { "type": "string" @@ -158669,7 +163289,13 @@ } } } - ] + ], + "example": { + "version": "v2", + "siteKey": null, + "logActionName": null, + "secretKey": null + } }, "V3CaptchaParams": { "allOf": [ @@ -158693,7 +163319,13 @@ } } } - ] + ], + "example": { + "version": "v3", + "siteKey": null, + "logActionName": null, + "secretKey": null + } }, "ValueSourceType": { "type": "string", @@ -158748,6 +163380,23 @@ "COMPLEX": "#/components/schemas/ComplexVersionCreateRequest" } }, + "example": { + "versionName": null, + "branch": null, + "type": "SINGLE_ENTITY", + "entityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "saveRelations": null, + "saveAttributes": null, + "saveCredentials": null, + "saveCalculatedFields": null, + "savePermissions": null, + "saveGroupEntities": null + } + }, "properties": { "versionName": { "type": "string" @@ -158833,6 +163482,27 @@ "ENTITY_TYPE": "#/components/schemas/EntityTypeVersionLoadRequest" } }, + "example": { + "versionId": null, + "type": "SINGLE_ENTITY", + "internalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "externalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "loadRelations": null, + "loadAttributes": null, + "loadCredentials": null, + "loadCalculatedFields": null, + "loadPermissions": null, + "loadGroupEntities": null, + "autoGenerateIntegrationKey": null + } + }, "properties": { "versionId": { "type": "string" @@ -158920,6 +163590,13 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "WEB", + "subject": "New Message Received", + "additionalConfig": {} + }, "required": [ "subject" ] @@ -158947,6 +163624,50 @@ } } ], + "example": { + "type": "WEB", + "enabled": null, + "title": null, + "captcha": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, + "permissions": null, + "notificationRecipient": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "signUpFields": null, + "customerTitlePrefix": null, + "showPrivacyPolicy": null, + "showTermsOfUse": null, + "defaultDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "fullscreen": null + }, + "homeDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "hideToolbar": null + }, + "customerGroupId": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customMenuId": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "domainId": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "privacyPolicy": null, + "termsOfUse": null + }, "required": [ "domainId" ] @@ -158976,7 +163697,14 @@ } } } - ] + ], + "example": { + "type": "WEB_VIEW", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "url": "/url" + } }, "WeekInterval": { "allOf": [ @@ -158997,6 +163725,11 @@ } } ], + "example": { + "type": "WEEK", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -159020,6 +163753,11 @@ } } ], + "example": { + "type": "WEEK_SUN_SAT", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -159273,7 +164011,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "WIDGET_TYPE" + } }, "WidgetTypeId": { "type": "object", @@ -159284,7 +164040,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "WIDGET_TYPE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "WidgetTypeInfo": { "type": "object", @@ -159426,9 +164186,6 @@ }, "WidgetsBundleExportData": { "allOf": [ - { - "$ref": "#/components/schemas/EntityExportData" - }, { "type": "object", "properties": { @@ -159445,8 +164202,31 @@ } } } + }, + { + "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "widgets": null, + "fqns": null, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "WIDGETS_BUNDLE" + } }, "WidgetsBundleId": { "type": "object", @@ -159457,7 +164237,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "WIDGETS_BUNDLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "X509CertificateChainProvisionConfiguration": { "allOf": [ @@ -159475,7 +164259,13 @@ } } } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "X509_CERTIFICATE_CHAIN", + "certificateRegExPattern": null, + "allowCreateNewDevicesByX509Certificate": null + } }, "X509LwM2MBootstrapServerCredential": { "allOf": [ @@ -159586,6 +164376,11 @@ } } ], + "example": { + "type": "YEAR", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] diff --git a/paas/tb_paas_client/__init__.py b/paas/tb_paas_client/__init__.py index 977729d2..7a9fca3d 100644 --- a/paas/tb_paas_client/__init__.py +++ b/paas/tb_paas_client/__init__.py @@ -43,6 +43,7 @@ from tb_paas_client.api.ai_tool_controller_api import AiToolControllerApi from tb_paas_client.api.alarm_comment_controller_api import AlarmCommentControllerApi from tb_paas_client.api.alarm_controller_api import AlarmControllerApi + from tb_paas_client.api.alarm_rule_controller_api import AlarmRuleControllerApi from tb_paas_client.api.api_key_controller_api import ApiKeyControllerApi from tb_paas_client.api.asset_controller_api import AssetControllerApi from tb_paas_client.api.asset_profile_controller_api import AssetProfileControllerApi @@ -105,6 +106,7 @@ from tb_paas_client.api.self_registration_controller_api import SelfRegistrationControllerApi from tb_paas_client.api.sign_up_controller_api import SignUpControllerApi from tb_paas_client.api.solution_controller_api import SolutionControllerApi + from tb_paas_client.api.solution_export_import_controller_api import SolutionExportImportControllerApi from tb_paas_client.api.subscription_controller_api import SubscriptionControllerApi from tb_paas_client.api.tb_resource_controller_api import TbResourceControllerApi from tb_paas_client.api.telemetry_controller_api import TelemetryControllerApi @@ -141,7 +143,7 @@ from tb_paas_client.models.aggregation import Aggregation from tb_paas_client.models.aggregation_configuration import AggregationConfiguration from tb_paas_client.models.aggregation_params import AggregationParams - from tb_paas_client.models.ai_chat_model_config_object import AiChatModelConfigObject + from tb_paas_client.models.ai_chat_model_config import AiChatModelConfig from tb_paas_client.models.ai_model import AiModel from tb_paas_client.models.ai_model_config import AiModelConfig from tb_paas_client.models.ai_model_export_data import AiModelExportData @@ -162,10 +164,7 @@ from tb_paas_client.models.alarm_condition import AlarmCondition from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression from tb_paas_client.models.alarm_condition_filter import AlarmConditionFilter - from tb_paas_client.models.alarm_condition_filter_key import AlarmConditionFilterKey - from tb_paas_client.models.alarm_condition_key_type import AlarmConditionKeyType - from tb_paas_client.models.alarm_condition_spec import AlarmConditionSpec - from tb_paas_client.models.alarm_condition_value_alarm_rule_schedule import AlarmConditionValueAlarmRuleSchedule + from tb_paas_client.models.alarm_condition_value_alarm_schedule import AlarmConditionValueAlarmSchedule from tb_paas_client.models.alarm_condition_value_boolean import AlarmConditionValueBoolean from tb_paas_client.models.alarm_condition_value_double import AlarmConditionValueDouble from tb_paas_client.models.alarm_condition_value_integer import AlarmConditionValueInteger @@ -180,25 +179,18 @@ from tb_paas_client.models.alarm_info import AlarmInfo from tb_paas_client.models.alarm_notification_rule_trigger_config import AlarmNotificationRuleTriggerConfig from tb_paas_client.models.alarm_rule import AlarmRule - from tb_paas_client.models.alarm_rule_any_time_schedule import AlarmRuleAnyTimeSchedule from tb_paas_client.models.alarm_rule_boolean_filter_predicate import AlarmRuleBooleanFilterPredicate + from tb_paas_client.models.alarm_rule_boolean_operation import AlarmRuleBooleanOperation from tb_paas_client.models.alarm_rule_complex_filter_predicate import AlarmRuleComplexFilterPredicate - from tb_paas_client.models.alarm_rule_condition import AlarmRuleCondition - from tb_paas_client.models.alarm_rule_condition_filter import AlarmRuleConditionFilter - from tb_paas_client.models.alarm_rule_custom_time_schedule import AlarmRuleCustomTimeSchedule - from tb_paas_client.models.alarm_rule_custom_time_schedule_item import AlarmRuleCustomTimeScheduleItem + from tb_paas_client.models.alarm_rule_complex_operation import AlarmRuleComplexOperation from tb_paas_client.models.alarm_rule_definition import AlarmRuleDefinition - from tb_paas_client.models.alarm_rule_duration_condition import AlarmRuleDurationCondition + from tb_paas_client.models.alarm_rule_definition_info import AlarmRuleDefinitionInfo from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate - from tb_paas_client.models.alarm_rule_no_data_filter_predicate import AlarmRuleNoDataFilterPredicate from tb_paas_client.models.alarm_rule_numeric_filter_predicate import AlarmRuleNumericFilterPredicate - from tb_paas_client.models.alarm_rule_repeating_condition import AlarmRuleRepeatingCondition - from tb_paas_client.models.alarm_rule_schedule import AlarmRuleSchedule - from tb_paas_client.models.alarm_rule_simple_condition import AlarmRuleSimpleCondition - from tb_paas_client.models.alarm_rule_specific_time_schedule import AlarmRuleSpecificTimeSchedule + from tb_paas_client.models.alarm_rule_numeric_operation import AlarmRuleNumericOperation from tb_paas_client.models.alarm_rule_string_filter_predicate import AlarmRuleStringFilterPredicate + from tb_paas_client.models.alarm_rule_string_operation import AlarmRuleStringOperation from tb_paas_client.models.alarm_schedule import AlarmSchedule - from tb_paas_client.models.alarm_schedule_type import AlarmScheduleType from tb_paas_client.models.alarm_search_status import AlarmSearchStatus from tb_paas_client.models.alarm_severity import AlarmSeverity from tb_paas_client.models.alarm_status import AlarmStatus @@ -309,6 +301,8 @@ from tb_paas_client.models.claim_request import ClaimRequest from tb_paas_client.models.clear_rule import ClearRule from tb_paas_client.models.client_attributes_querying_snmp_communication_config import ClientAttributesQueryingSnmpCommunicationConfig + from tb_paas_client.models.cloud_domain_id import CloudDomainId + from tb_paas_client.models.cloud_domain_info import CloudDomainInfo from tb_paas_client.models.coap_device_profile_transport_configuration import CoapDeviceProfileTransportConfiguration from tb_paas_client.models.coap_device_transport_configuration import CoapDeviceTransportConfiguration from tb_paas_client.models.coap_device_type_configuration import CoapDeviceTypeConfiguration @@ -398,7 +392,6 @@ from tb_paas_client.models.device_id import DeviceId from tb_paas_client.models.device_info import DeviceInfo from tb_paas_client.models.device_profile import DeviceProfile - from tb_paas_client.models.device_profile_alarm import DeviceProfileAlarm from tb_paas_client.models.device_profile_configuration import DeviceProfileConfiguration from tb_paas_client.models.device_profile_data import DeviceProfileData from tb_paas_client.models.device_profile_export_data import DeviceProfileExportData @@ -425,11 +418,9 @@ from tb_paas_client.models.dummy_job_result import DummyJobResult from tb_paas_client.models.dummy_task_failure import DummyTaskFailure from tb_paas_client.models.dummy_task_result import DummyTaskResult - from tb_paas_client.models.duration_alarm_condition_spec import DurationAlarmConditionSpec + from tb_paas_client.models.duration_alarm_condition import DurationAlarmCondition from tb_paas_client.models.dynamic_value_boolean import DynamicValueBoolean from tb_paas_client.models.dynamic_value_double import DynamicValueDouble - from tb_paas_client.models.dynamic_value_integer import DynamicValueInteger - from tb_paas_client.models.dynamic_value_long import DynamicValueLong from tb_paas_client.models.dynamic_value_source_type import DynamicValueSourceType from tb_paas_client.models.dynamic_value_string import DynamicValueString from tb_paas_client.models.edge import Edge @@ -475,13 +466,13 @@ from tb_paas_client.models.entity_data_query import EntityDataQuery from tb_paas_client.models.entity_data_sort_order import EntityDataSortOrder from tb_paas_client.models.entity_export_data import EntityExportData + from tb_paas_client.models.entity_export_settings import EntityExportSettings from tb_paas_client.models.entity_filter import EntityFilter from tb_paas_client.models.entity_group import EntityGroup from tb_paas_client.models.entity_group_export_data import EntityGroupExportData from tb_paas_client.models.entity_group_filter import EntityGroupFilter from tb_paas_client.models.entity_group_id import EntityGroupId from tb_paas_client.models.entity_group_info import EntityGroupInfo - from tb_paas_client.models.entity_group_info_owner_ids_inner import EntityGroupInfoOwnerIdsInner from tb_paas_client.models.entity_group_list_filter import EntityGroupListFilter from tb_paas_client.models.entity_group_name_filter import EntityGroupNameFilter from tb_paas_client.models.entity_id import EntityId @@ -529,8 +520,6 @@ from tb_paas_client.models.filter import Filter from tb_paas_client.models.filter_predicate_value_boolean import FilterPredicateValueBoolean from tb_paas_client.models.filter_predicate_value_double import FilterPredicateValueDouble - from tb_paas_client.models.filter_predicate_value_integer import FilterPredicateValueInteger - from tb_paas_client.models.filter_predicate_value_long import FilterPredicateValueLong from tb_paas_client.models.filter_predicate_value_string import FilterPredicateValueString from tb_paas_client.models.fixed_time_window import FixedTimeWindow from tb_paas_client.models.font import Font @@ -552,6 +541,7 @@ from tb_paas_client.models.heading import Heading from tb_paas_client.models.heading_component import HeadingComponent from tb_paas_client.models.history import History + from tb_paas_client.models.home_dashboard import HomeDashboard from tb_paas_client.models.home_dashboard_info import HomeDashboardInfo from tb_paas_client.models.home_dashboard_params import HomeDashboardParams from tb_paas_client.models.home_menu_item import HomeMenuItem @@ -641,6 +631,7 @@ from tb_paas_client.models.name_conflict_policy import NameConflictPolicy from tb_paas_client.models.new_platform_version_notification_rule_trigger_config import NewPlatformVersionNotificationRuleTriggerConfig from tb_paas_client.models.new_platform_version_recipients_config import NewPlatformVersionRecipientsConfig + from tb_paas_client.models.no_data_filter_predicate import NoDataFilterPredicate from tb_paas_client.models.no_sec_lw_m2_m_bootstrap_server_credential import NoSecLwM2MBootstrapServerCredential from tb_paas_client.models.node_connection_info import NodeConnectionInfo from tb_paas_client.models.notification import Notification @@ -708,6 +699,8 @@ from tb_paas_client.models.page_data_alarm_comment_info import PageDataAlarmCommentInfo from tb_paas_client.models.page_data_alarm_data import PageDataAlarmData from tb_paas_client.models.page_data_alarm_info import PageDataAlarmInfo + from tb_paas_client.models.page_data_alarm_rule_definition import PageDataAlarmRuleDefinition + from tb_paas_client.models.page_data_alarm_rule_definition_info import PageDataAlarmRuleDefinitionInfo from tb_paas_client.models.page_data_api_key_info import PageDataApiKeyInfo from tb_paas_client.models.page_data_asset import PageDataAsset from tb_paas_client.models.page_data_asset_info import PageDataAssetInfo @@ -814,7 +807,7 @@ from tb_paas_client.models.relation_type_group import RelationTypeGroup from tb_paas_client.models.relations_query_filter import RelationsQueryFilter from tb_paas_client.models.relations_search_parameters import RelationsSearchParameters - from tb_paas_client.models.repeating_alarm_condition_spec import RepeatingAlarmConditionSpec + from tb_paas_client.models.repeating_alarm_condition import RepeatingAlarmCondition from tb_paas_client.models.report import Report from tb_paas_client.models.report_bar_chart_settings import ReportBarChartSettings from tb_paas_client.models.report_bar_chart_with_labels_settings import ReportBarChartWithLabelsSettings @@ -865,7 +858,6 @@ from tb_paas_client.models.rule_chain_id import RuleChainId from tb_paas_client.models.rule_chain_import_result import RuleChainImportResult from tb_paas_client.models.rule_chain_meta_data import RuleChainMetaData - from tb_paas_client.models.rule_chain_note import RuleChainNote from tb_paas_client.models.rule_chain_output_labels_usage import RuleChainOutputLabelsUsage from tb_paas_client.models.rule_chain_type import RuleChainType from tb_paas_client.models.rule_engine_component_lifecycle_event_notification_rule_trigger_config import RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig @@ -900,8 +892,8 @@ from tb_paas_client.models.sign_up_request import SignUpRequest from tb_paas_client.models.sign_up_result import SignUpResult from tb_paas_client.models.sign_up_self_registration_params import SignUpSelfRegistrationParams + from tb_paas_client.models.simple_alarm_condition import SimpleAlarmCondition from tb_paas_client.models.simple_alarm_condition_expression import SimpleAlarmConditionExpression - from tb_paas_client.models.simple_alarm_condition_spec import SimpleAlarmConditionSpec from tb_paas_client.models.simple_calculated_field_configuration import SimpleCalculatedFieldConfiguration from tb_paas_client.models.simple_entity import SimpleEntity from tb_paas_client.models.single_entity_filter import SingleEntityFilter @@ -924,9 +916,14 @@ from tb_paas_client.models.snmp_device_transport_configuration import SnmpDeviceTransportConfiguration from tb_paas_client.models.snmp_mapping import SnmpMapping from tb_paas_client.models.snmp_protocol_version import SnmpProtocolVersion + from tb_paas_client.models.solution_data import SolutionData + from tb_paas_client.models.solution_export_request import SolutionExportRequest + from tb_paas_client.models.solution_export_response import SolutionExportResponse + from tb_paas_client.models.solution_import_result import SolutionImportResult from tb_paas_client.models.solution_install_response import SolutionInstallResponse from tb_paas_client.models.solution_step import SolutionStep from tb_paas_client.models.solution_template_level import SolutionTemplateLevel + from tb_paas_client.models.solution_validation_result import SolutionValidationResult from tb_paas_client.models.specific_time_schedule import SpecificTimeSchedule from tb_paas_client.models.split_view_component import SplitViewComponent from tb_paas_client.models.starred_dashboard_info import StarredDashboardInfo @@ -952,6 +949,7 @@ from tb_paas_client.models.system_administrators_filter import SystemAdministratorsFilter from tb_paas_client.models.system_info import SystemInfo from tb_paas_client.models.system_info_data import SystemInfoData + from tb_paas_client.models.table_sort_direction import TableSortDirection from tb_paas_client.models.table_sort_order import TableSortOrder from tb_paas_client.models.task_processing_failure_notification_rule_trigger_config import TaskProcessingFailureNotificationRuleTriggerConfig from tb_paas_client.models.task_processing_failure_recipients_config import TaskProcessingFailureRecipientsConfig @@ -1101,6 +1099,7 @@ "AiToolControllerApi": "tb_paas_client.api.ai_tool_controller_api", "AlarmCommentControllerApi": "tb_paas_client.api.alarm_comment_controller_api", "AlarmControllerApi": "tb_paas_client.api.alarm_controller_api", + "AlarmRuleControllerApi": "tb_paas_client.api.alarm_rule_controller_api", "ApiKeyControllerApi": "tb_paas_client.api.api_key_controller_api", "AssetControllerApi": "tb_paas_client.api.asset_controller_api", "AssetProfileControllerApi": "tb_paas_client.api.asset_profile_controller_api", @@ -1163,6 +1162,7 @@ "SelfRegistrationControllerApi": "tb_paas_client.api.self_registration_controller_api", "SignUpControllerApi": "tb_paas_client.api.sign_up_controller_api", "SolutionControllerApi": "tb_paas_client.api.solution_controller_api", + "SolutionExportImportControllerApi": "tb_paas_client.api.solution_export_import_controller_api", "SubscriptionControllerApi": "tb_paas_client.api.subscription_controller_api", "TbResourceControllerApi": "tb_paas_client.api.tb_resource_controller_api", "TelemetryControllerApi": "tb_paas_client.api.telemetry_controller_api", @@ -1199,7 +1199,7 @@ "Aggregation": "tb_paas_client.models.aggregation", "AggregationConfiguration": "tb_paas_client.models.aggregation_configuration", "AggregationParams": "tb_paas_client.models.aggregation_params", - "AiChatModelConfigObject": "tb_paas_client.models.ai_chat_model_config_object", + "AiChatModelConfig": "tb_paas_client.models.ai_chat_model_config", "AiModel": "tb_paas_client.models.ai_model", "AiModelConfig": "tb_paas_client.models.ai_model_config", "AiModelExportData": "tb_paas_client.models.ai_model_export_data", @@ -1220,10 +1220,7 @@ "AlarmCondition": "tb_paas_client.models.alarm_condition", "AlarmConditionExpression": "tb_paas_client.models.alarm_condition_expression", "AlarmConditionFilter": "tb_paas_client.models.alarm_condition_filter", - "AlarmConditionFilterKey": "tb_paas_client.models.alarm_condition_filter_key", - "AlarmConditionKeyType": "tb_paas_client.models.alarm_condition_key_type", - "AlarmConditionSpec": "tb_paas_client.models.alarm_condition_spec", - "AlarmConditionValueAlarmRuleSchedule": "tb_paas_client.models.alarm_condition_value_alarm_rule_schedule", + "AlarmConditionValueAlarmSchedule": "tb_paas_client.models.alarm_condition_value_alarm_schedule", "AlarmConditionValueBoolean": "tb_paas_client.models.alarm_condition_value_boolean", "AlarmConditionValueDouble": "tb_paas_client.models.alarm_condition_value_double", "AlarmConditionValueInteger": "tb_paas_client.models.alarm_condition_value_integer", @@ -1238,25 +1235,18 @@ "AlarmInfo": "tb_paas_client.models.alarm_info", "AlarmNotificationRuleTriggerConfig": "tb_paas_client.models.alarm_notification_rule_trigger_config", "AlarmRule": "tb_paas_client.models.alarm_rule", - "AlarmRuleAnyTimeSchedule": "tb_paas_client.models.alarm_rule_any_time_schedule", "AlarmRuleBooleanFilterPredicate": "tb_paas_client.models.alarm_rule_boolean_filter_predicate", + "AlarmRuleBooleanOperation": "tb_paas_client.models.alarm_rule_boolean_operation", "AlarmRuleComplexFilterPredicate": "tb_paas_client.models.alarm_rule_complex_filter_predicate", - "AlarmRuleCondition": "tb_paas_client.models.alarm_rule_condition", - "AlarmRuleConditionFilter": "tb_paas_client.models.alarm_rule_condition_filter", - "AlarmRuleCustomTimeSchedule": "tb_paas_client.models.alarm_rule_custom_time_schedule", - "AlarmRuleCustomTimeScheduleItem": "tb_paas_client.models.alarm_rule_custom_time_schedule_item", + "AlarmRuleComplexOperation": "tb_paas_client.models.alarm_rule_complex_operation", "AlarmRuleDefinition": "tb_paas_client.models.alarm_rule_definition", - "AlarmRuleDurationCondition": "tb_paas_client.models.alarm_rule_duration_condition", + "AlarmRuleDefinitionInfo": "tb_paas_client.models.alarm_rule_definition_info", "AlarmRuleKeyFilterPredicate": "tb_paas_client.models.alarm_rule_key_filter_predicate", - "AlarmRuleNoDataFilterPredicate": "tb_paas_client.models.alarm_rule_no_data_filter_predicate", "AlarmRuleNumericFilterPredicate": "tb_paas_client.models.alarm_rule_numeric_filter_predicate", - "AlarmRuleRepeatingCondition": "tb_paas_client.models.alarm_rule_repeating_condition", - "AlarmRuleSchedule": "tb_paas_client.models.alarm_rule_schedule", - "AlarmRuleSimpleCondition": "tb_paas_client.models.alarm_rule_simple_condition", - "AlarmRuleSpecificTimeSchedule": "tb_paas_client.models.alarm_rule_specific_time_schedule", + "AlarmRuleNumericOperation": "tb_paas_client.models.alarm_rule_numeric_operation", "AlarmRuleStringFilterPredicate": "tb_paas_client.models.alarm_rule_string_filter_predicate", + "AlarmRuleStringOperation": "tb_paas_client.models.alarm_rule_string_operation", "AlarmSchedule": "tb_paas_client.models.alarm_schedule", - "AlarmScheduleType": "tb_paas_client.models.alarm_schedule_type", "AlarmSearchStatus": "tb_paas_client.models.alarm_search_status", "AlarmSeverity": "tb_paas_client.models.alarm_severity", "AlarmStatus": "tb_paas_client.models.alarm_status", @@ -1367,6 +1357,8 @@ "ClaimRequest": "tb_paas_client.models.claim_request", "ClearRule": "tb_paas_client.models.clear_rule", "ClientAttributesQueryingSnmpCommunicationConfig": "tb_paas_client.models.client_attributes_querying_snmp_communication_config", + "CloudDomainId": "tb_paas_client.models.cloud_domain_id", + "CloudDomainInfo": "tb_paas_client.models.cloud_domain_info", "CoapDeviceProfileTransportConfiguration": "tb_paas_client.models.coap_device_profile_transport_configuration", "CoapDeviceTransportConfiguration": "tb_paas_client.models.coap_device_transport_configuration", "CoapDeviceTypeConfiguration": "tb_paas_client.models.coap_device_type_configuration", @@ -1456,7 +1448,6 @@ "DeviceId": "tb_paas_client.models.device_id", "DeviceInfo": "tb_paas_client.models.device_info", "DeviceProfile": "tb_paas_client.models.device_profile", - "DeviceProfileAlarm": "tb_paas_client.models.device_profile_alarm", "DeviceProfileConfiguration": "tb_paas_client.models.device_profile_configuration", "DeviceProfileData": "tb_paas_client.models.device_profile_data", "DeviceProfileExportData": "tb_paas_client.models.device_profile_export_data", @@ -1483,11 +1474,9 @@ "DummyJobResult": "tb_paas_client.models.dummy_job_result", "DummyTaskFailure": "tb_paas_client.models.dummy_task_failure", "DummyTaskResult": "tb_paas_client.models.dummy_task_result", - "DurationAlarmConditionSpec": "tb_paas_client.models.duration_alarm_condition_spec", + "DurationAlarmCondition": "tb_paas_client.models.duration_alarm_condition", "DynamicValueBoolean": "tb_paas_client.models.dynamic_value_boolean", "DynamicValueDouble": "tb_paas_client.models.dynamic_value_double", - "DynamicValueInteger": "tb_paas_client.models.dynamic_value_integer", - "DynamicValueLong": "tb_paas_client.models.dynamic_value_long", "DynamicValueSourceType": "tb_paas_client.models.dynamic_value_source_type", "DynamicValueString": "tb_paas_client.models.dynamic_value_string", "Edge": "tb_paas_client.models.edge", @@ -1533,13 +1522,13 @@ "EntityDataQuery": "tb_paas_client.models.entity_data_query", "EntityDataSortOrder": "tb_paas_client.models.entity_data_sort_order", "EntityExportData": "tb_paas_client.models.entity_export_data", + "EntityExportSettings": "tb_paas_client.models.entity_export_settings", "EntityFilter": "tb_paas_client.models.entity_filter", "EntityGroup": "tb_paas_client.models.entity_group", "EntityGroupExportData": "tb_paas_client.models.entity_group_export_data", "EntityGroupFilter": "tb_paas_client.models.entity_group_filter", "EntityGroupId": "tb_paas_client.models.entity_group_id", "EntityGroupInfo": "tb_paas_client.models.entity_group_info", - "EntityGroupInfoOwnerIdsInner": "tb_paas_client.models.entity_group_info_owner_ids_inner", "EntityGroupListFilter": "tb_paas_client.models.entity_group_list_filter", "EntityGroupNameFilter": "tb_paas_client.models.entity_group_name_filter", "EntityId": "tb_paas_client.models.entity_id", @@ -1587,8 +1576,6 @@ "Filter": "tb_paas_client.models.filter", "FilterPredicateValueBoolean": "tb_paas_client.models.filter_predicate_value_boolean", "FilterPredicateValueDouble": "tb_paas_client.models.filter_predicate_value_double", - "FilterPredicateValueInteger": "tb_paas_client.models.filter_predicate_value_integer", - "FilterPredicateValueLong": "tb_paas_client.models.filter_predicate_value_long", "FilterPredicateValueString": "tb_paas_client.models.filter_predicate_value_string", "FixedTimeWindow": "tb_paas_client.models.fixed_time_window", "Font": "tb_paas_client.models.font", @@ -1610,6 +1597,7 @@ "Heading": "tb_paas_client.models.heading", "HeadingComponent": "tb_paas_client.models.heading_component", "History": "tb_paas_client.models.history", + "HomeDashboard": "tb_paas_client.models.home_dashboard", "HomeDashboardInfo": "tb_paas_client.models.home_dashboard_info", "HomeDashboardParams": "tb_paas_client.models.home_dashboard_params", "HomeMenuItem": "tb_paas_client.models.home_menu_item", @@ -1699,6 +1687,7 @@ "NameConflictPolicy": "tb_paas_client.models.name_conflict_policy", "NewPlatformVersionNotificationRuleTriggerConfig": "tb_paas_client.models.new_platform_version_notification_rule_trigger_config", "NewPlatformVersionRecipientsConfig": "tb_paas_client.models.new_platform_version_recipients_config", + "NoDataFilterPredicate": "tb_paas_client.models.no_data_filter_predicate", "NoSecLwM2MBootstrapServerCredential": "tb_paas_client.models.no_sec_lw_m2_m_bootstrap_server_credential", "NodeConnectionInfo": "tb_paas_client.models.node_connection_info", "Notification": "tb_paas_client.models.notification", @@ -1766,6 +1755,8 @@ "PageDataAlarmCommentInfo": "tb_paas_client.models.page_data_alarm_comment_info", "PageDataAlarmData": "tb_paas_client.models.page_data_alarm_data", "PageDataAlarmInfo": "tb_paas_client.models.page_data_alarm_info", + "PageDataAlarmRuleDefinition": "tb_paas_client.models.page_data_alarm_rule_definition", + "PageDataAlarmRuleDefinitionInfo": "tb_paas_client.models.page_data_alarm_rule_definition_info", "PageDataApiKeyInfo": "tb_paas_client.models.page_data_api_key_info", "PageDataAsset": "tb_paas_client.models.page_data_asset", "PageDataAssetInfo": "tb_paas_client.models.page_data_asset_info", @@ -1872,7 +1863,7 @@ "RelationTypeGroup": "tb_paas_client.models.relation_type_group", "RelationsQueryFilter": "tb_paas_client.models.relations_query_filter", "RelationsSearchParameters": "tb_paas_client.models.relations_search_parameters", - "RepeatingAlarmConditionSpec": "tb_paas_client.models.repeating_alarm_condition_spec", + "RepeatingAlarmCondition": "tb_paas_client.models.repeating_alarm_condition", "Report": "tb_paas_client.models.report", "ReportBarChartSettings": "tb_paas_client.models.report_bar_chart_settings", "ReportBarChartWithLabelsSettings": "tb_paas_client.models.report_bar_chart_with_labels_settings", @@ -1923,7 +1914,6 @@ "RuleChainId": "tb_paas_client.models.rule_chain_id", "RuleChainImportResult": "tb_paas_client.models.rule_chain_import_result", "RuleChainMetaData": "tb_paas_client.models.rule_chain_meta_data", - "RuleChainNote": "tb_paas_client.models.rule_chain_note", "RuleChainOutputLabelsUsage": "tb_paas_client.models.rule_chain_output_labels_usage", "RuleChainType": "tb_paas_client.models.rule_chain_type", "RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig": "tb_paas_client.models.rule_engine_component_lifecycle_event_notification_rule_trigger_config", @@ -1958,8 +1948,8 @@ "SignUpRequest": "tb_paas_client.models.sign_up_request", "SignUpResult": "tb_paas_client.models.sign_up_result", "SignUpSelfRegistrationParams": "tb_paas_client.models.sign_up_self_registration_params", + "SimpleAlarmCondition": "tb_paas_client.models.simple_alarm_condition", "SimpleAlarmConditionExpression": "tb_paas_client.models.simple_alarm_condition_expression", - "SimpleAlarmConditionSpec": "tb_paas_client.models.simple_alarm_condition_spec", "SimpleCalculatedFieldConfiguration": "tb_paas_client.models.simple_calculated_field_configuration", "SimpleEntity": "tb_paas_client.models.simple_entity", "SingleEntityFilter": "tb_paas_client.models.single_entity_filter", @@ -1982,9 +1972,14 @@ "SnmpDeviceTransportConfiguration": "tb_paas_client.models.snmp_device_transport_configuration", "SnmpMapping": "tb_paas_client.models.snmp_mapping", "SnmpProtocolVersion": "tb_paas_client.models.snmp_protocol_version", + "SolutionData": "tb_paas_client.models.solution_data", + "SolutionExportRequest": "tb_paas_client.models.solution_export_request", + "SolutionExportResponse": "tb_paas_client.models.solution_export_response", + "SolutionImportResult": "tb_paas_client.models.solution_import_result", "SolutionInstallResponse": "tb_paas_client.models.solution_install_response", "SolutionStep": "tb_paas_client.models.solution_step", "SolutionTemplateLevel": "tb_paas_client.models.solution_template_level", + "SolutionValidationResult": "tb_paas_client.models.solution_validation_result", "SpecificTimeSchedule": "tb_paas_client.models.specific_time_schedule", "SplitViewComponent": "tb_paas_client.models.split_view_component", "StarredDashboardInfo": "tb_paas_client.models.starred_dashboard_info", @@ -2010,6 +2005,7 @@ "SystemAdministratorsFilter": "tb_paas_client.models.system_administrators_filter", "SystemInfo": "tb_paas_client.models.system_info", "SystemInfoData": "tb_paas_client.models.system_info_data", + "TableSortDirection": "tb_paas_client.models.table_sort_direction", "TableSortOrder": "tb_paas_client.models.table_sort_order", "TaskProcessingFailureNotificationRuleTriggerConfig": "tb_paas_client.models.task_processing_failure_notification_rule_trigger_config", "TaskProcessingFailureRecipientsConfig": "tb_paas_client.models.task_processing_failure_recipients_config", diff --git a/paas/tb_paas_client/_auth.py b/paas/tb_paas_client/_auth.py index 4ada8e58..1c793d11 100644 --- a/paas/tb_paas_client/_auth.py +++ b/paas/tb_paas_client/_auth.py @@ -20,11 +20,13 @@ This file lives in common/ and is copied verbatim into each edition package directory by generate-client.sh. Use only relative imports and stdlib; no edition-specific imports. """ + import base64 import json import logging import threading import time + import urllib3 logger = logging.getLogger(__name__) @@ -37,12 +39,14 @@ # _TokenInfo # --------------------------------------------------------------------------- + class _TokenInfo: """Immutable value object holding JWT token state. All timestamps are in milliseconds since epoch. clock_diff = iat_ms_from_server - local_now_ms at login time (may be negative). """ + __slots__ = ("token", "refresh_token", "token_exp_ts", "refresh_exp_ts", "clock_diff") def __init__( @@ -55,9 +59,9 @@ def __init__( ): self.token = token self.refresh_token = refresh_token - self.token_exp_ts = token_exp_ts # -1 means unknown / invalid + self.token_exp_ts = token_exp_ts # -1 means unknown / invalid self.refresh_exp_ts = refresh_exp_ts # -1 means unknown / invalid - self.clock_diff = clock_diff # server_clock - local_clock offset in ms + self.clock_diff = clock_diff # server_clock - local_clock offset in ms # Sentinel used before first login @@ -68,6 +72,7 @@ def __init__( # JWT helpers # --------------------------------------------------------------------------- + def _parse_jwt_claim_ms(jwt: str, claim: str) -> int: """Decode JWT payload (base64url) and return the named claim value * 1000 (ms). @@ -90,6 +95,7 @@ def _parse_jwt_claim_ms(jwt: str, claim: str) -> int: # _AuthManager # --------------------------------------------------------------------------- + class _AuthManager: """Manages JWT token state and implements the refresh_api_key_hook. @@ -229,9 +235,7 @@ def _raw_post(self, path: str, body: bytes) -> dict: headers={"Content-Type": "application/json"}, ) if response.status != 200: - raise RuntimeError( - f"Auth request to {path} returned HTTP {response.status}" - ) + raise RuntimeError(f"Auth request to {path} returned HTTP {response.status}") return json.loads(response.data) def _build_token_info(self, token: str, refresh_token: str) -> "_TokenInfo": diff --git a/paas/tb_paas_client/_controller_map.py b/paas/tb_paas_client/_controller_map.py index 8c0582a4..021b1900 100644 --- a/paas/tb_paas_client/_controller_map.py +++ b/paas/tb_paas_client/_controller_map.py @@ -170,6 +170,9 @@ "delete_alarm_comment": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), "delete_alarm_comment_with_http_info": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), "delete_alarm_comment_without_preload_content": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), + "delete_alarm_rule": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "delete_alarm_rule_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "delete_alarm_rule_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), "delete_alarm_with_http_info": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "delete_alarm_without_preload_content": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "delete_api_key": ("tb_paas_client.api.api_key_controller_api", "ApiKeyControllerApi"), @@ -430,9 +433,9 @@ "export_rule_chains": ("tb_paas_client.api.rule_chain_controller_api", "RuleChainControllerApi"), "export_rule_chains_with_http_info": ("tb_paas_client.api.rule_chain_controller_api", "RuleChainControllerApi"), "export_rule_chains_without_preload_content": ("tb_paas_client.api.rule_chain_controller_api", "RuleChainControllerApi"), - "export_solution": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), - "export_solution_with_http_info": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), - "export_solution_without_preload_content": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "export_solution": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "export_solution_with_http_info": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "export_solution_without_preload_content": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), "find_alarm_data_by_query": ("tb_paas_client.api.entity_query_controller_api", "EntityQueryControllerApi"), "find_alarm_data_by_query_with_http_info": ("tb_paas_client.api.entity_query_controller_api", "EntityQueryControllerApi"), "find_alarm_data_by_query_without_preload_content": ("tb_paas_client.api.entity_query_controller_api", "EntityQueryControllerApi"), @@ -529,6 +532,18 @@ "get_alarm_info_by_id": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "get_alarm_info_by_id_with_http_info": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "get_alarm_info_by_id_without_preload_content": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), + "get_alarm_rule_by_id": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rule_by_id_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rule_by_id_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rule_names": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rule_names_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rule_names_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rules": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rules_by_entity_id": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rules_by_entity_id_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rules_by_entity_id_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rules_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_alarm_rules_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), "get_alarm_types": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "get_alarm_types_with_http_info": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "get_alarm_types_without_preload_content": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), @@ -715,9 +730,6 @@ "get_chat_messages": ("tb_paas_client.api.ai_chat_controller_api", "AiChatControllerApi"), "get_chat_messages_with_http_info": ("tb_paas_client.api.ai_chat_controller_api", "AiChatControllerApi"), "get_chat_messages_without_preload_content": ("tb_paas_client.api.ai_chat_controller_api", "AiChatControllerApi"), - "get_client_registration_templates": ("tb_paas_client.api.mail_config_template_controller_api", "MailConfigTemplateControllerApi"), - "get_client_registration_templates_with_http_info": ("tb_paas_client.api.mail_config_template_controller_api", "MailConfigTemplateControllerApi"), - "get_client_registration_templates_without_preload_content": ("tb_paas_client.api.mail_config_template_controller_api", "MailConfigTemplateControllerApi"), "get_cloud_domain_info_by_id": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), "get_cloud_domain_info_by_id_with_http_info": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), "get_cloud_domain_info_by_id_without_preload_content": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), @@ -1087,6 +1099,9 @@ "get_last_visited_dashboards": ("tb_paas_client.api.user_controller_api", "UserControllerApi"), "get_last_visited_dashboards_with_http_info": ("tb_paas_client.api.user_controller_api", "UserControllerApi"), "get_last_visited_dashboards_without_preload_content": ("tb_paas_client.api.user_controller_api", "UserControllerApi"), + "get_latest_alarm_rule_debug_event": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_latest_alarm_rule_debug_event_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "get_latest_alarm_rule_debug_event_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), "get_latest_calculated_field_debug_event": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "get_latest_calculated_field_debug_event_with_http_info": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "get_latest_calculated_field_debug_event_without_preload_content": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), @@ -1123,6 +1138,9 @@ "get_lwm2m_list_objects_page_without_preload_content": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), "get_lwm2m_list_objects_with_http_info": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), "get_lwm2m_list_objects_without_preload_content": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), + "get_mail_config_templates": ("tb_paas_client.api.mail_config_template_controller_api", "MailConfigTemplateControllerApi"), + "get_mail_config_templates_with_http_info": ("tb_paas_client.api.mail_config_template_controller_api", "MailConfigTemplateControllerApi"), + "get_mail_config_templates_without_preload_content": ("tb_paas_client.api.mail_config_template_controller_api", "MailConfigTemplateControllerApi"), "get_mail_o_auth2_authorization_url": ("tb_paas_client.api.admin_controller_api", "AdminControllerApi"), "get_mail_o_auth2_authorization_url_with_http_info": ("tb_paas_client.api.admin_controller_api", "AdminControllerApi"), "get_mail_o_auth2_authorization_url_without_preload_content": ("tb_paas_client.api.admin_controller_api", "AdminControllerApi"), @@ -1211,9 +1229,9 @@ "get_ota_package_info_by_id_with_http_info": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), "get_ota_package_info_by_id_without_preload_content": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), "get_ota_packages": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), - "get_ota_packages_by_device_profile_id_and_type": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), - "get_ota_packages_by_device_profile_id_and_type_with_http_info": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), - "get_ota_packages_by_device_profile_id_and_type_without_preload_content": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), + "get_ota_packages_by_device_profile_and_type": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), + "get_ota_packages_by_device_profile_and_type_with_http_info": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), + "get_ota_packages_by_device_profile_and_type_without_preload_content": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), "get_ota_packages_with_http_info": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), "get_ota_packages_without_preload_content": ("tb_paas_client.api.ota_package_controller_api", "OtaPackageControllerApi"), "get_owner_info": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), @@ -1687,9 +1705,9 @@ "import_rule_chains": ("tb_paas_client.api.rule_chain_controller_api", "RuleChainControllerApi"), "import_rule_chains_with_http_info": ("tb_paas_client.api.rule_chain_controller_api", "RuleChainControllerApi"), "import_rule_chains_without_preload_content": ("tb_paas_client.api.rule_chain_controller_api", "RuleChainControllerApi"), - "import_solution": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), - "import_solution_with_http_info": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), - "import_solution_without_preload_content": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "import_solution": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "import_solution_with_http_info": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "import_solution_without_preload_content": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), "install_solution": ("tb_paas_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "install_solution_template": ("tb_paas_client.api.solution_controller_api", "SolutionControllerApi"), "install_solution_template_with_http_info": ("tb_paas_client.api.solution_controller_api", "SolutionControllerApi"), @@ -1868,6 +1886,9 @@ "save_alarm_comment": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), "save_alarm_comment_with_http_info": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), "save_alarm_comment_without_preload_content": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), + "save_alarm_rule": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "save_alarm_rule_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "save_alarm_rule_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), "save_alarm_with_http_info": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "save_alarm_without_preload_content": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), "save_api_key": ("tb_paas_client.api.api_key_controller_api", "ApiKeyControllerApi"), @@ -2136,9 +2157,6 @@ "set_user_credentials_enabled_without_preload_content": ("tb_paas_client.api.user_controller_api", "UserControllerApi"), "share_entity_group": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), "share_entity_group_to_child_owner_user_group": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), - "share_entity_group_to_child_owner_user_group_v2": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), - "share_entity_group_to_child_owner_user_group_v2_with_http_info": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), - "share_entity_group_to_child_owner_user_group_v2_without_preload_content": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), "share_entity_group_to_child_owner_user_group_with_http_info": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), "share_entity_group_to_child_owner_user_group_without_preload_content": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), "share_entity_group_with_http_info": ("tb_paas_client.api.entity_group_controller_api", "EntityGroupControllerApi"), @@ -2176,6 +2194,9 @@ "terms_of_use_accepted": ("tb_paas_client.api.sign_up_controller_api", "SignUpControllerApi"), "terms_of_use_accepted_with_http_info": ("tb_paas_client.api.sign_up_controller_api", "SignUpControllerApi"), "terms_of_use_accepted_without_preload_content": ("tb_paas_client.api.sign_up_controller_api", "SignUpControllerApi"), + "test_alarm_rule_script": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "test_alarm_rule_script_with_http_info": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), + "test_alarm_rule_script_without_preload_content": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), "test_calculated_field_script": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "test_calculated_field_script_with_http_info": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "test_calculated_field_script_without_preload_content": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), @@ -2242,6 +2263,9 @@ "update_device_credentials": ("tb_paas_client.api.device_controller_api", "DeviceControllerApi"), "update_device_credentials_with_http_info": ("tb_paas_client.api.device_controller_api", "DeviceControllerApi"), "update_device_credentials_without_preload_content": ("tb_paas_client.api.device_controller_api", "DeviceControllerApi"), + "update_domain_oauth2_clients": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), + "update_domain_oauth2_clients_with_http_info": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), + "update_domain_oauth2_clients_without_preload_content": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), "update_image": ("tb_paas_client.api.image_controller_api", "ImageControllerApi"), "update_image_info": ("tb_paas_client.api.image_controller_api", "ImageControllerApi"), "update_image_info_with_http_info": ("tb_paas_client.api.image_controller_api", "ImageControllerApi"), @@ -2254,9 +2278,6 @@ "update_mobile_app_bundle_oauth2_clients": ("tb_paas_client.api.mobile_app_bundle_controller_api", "MobileAppBundleControllerApi"), "update_mobile_app_bundle_oauth2_clients_with_http_info": ("tb_paas_client.api.mobile_app_bundle_controller_api", "MobileAppBundleControllerApi"), "update_mobile_app_bundle_oauth2_clients_without_preload_content": ("tb_paas_client.api.mobile_app_bundle_controller_api", "MobileAppBundleControllerApi"), - "update_oauth2_clients": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), - "update_oauth2_clients_with_http_info": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), - "update_oauth2_clients_without_preload_content": ("tb_paas_client.api.domain_controller_api", "DomainControllerApi"), "update_resource_data": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), "update_resource_data_with_http_info": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), "update_resource_data_without_preload_content": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), @@ -2290,6 +2311,9 @@ "validate_calculated_field_reprocessing": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "validate_calculated_field_reprocessing_with_http_info": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "validate_calculated_field_reprocessing_without_preload_content": ("tb_paas_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), + "validate_solution": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "validate_solution_with_http_info": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "validate_solution_without_preload_content": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), "verify_and_save_two_fa_account_config": ("tb_paas_client.api.two_factor_auth_config_controller_api", "TwoFactorAuthConfigControllerApi"), "verify_and_save_two_fa_account_config_with_http_info": ("tb_paas_client.api.two_factor_auth_config_controller_api", "TwoFactorAuthConfigControllerApi"), "verify_and_save_two_fa_account_config_without_preload_content": ("tb_paas_client.api.two_factor_auth_config_controller_api", "TwoFactorAuthConfigControllerApi"), @@ -2303,6 +2327,7 @@ "ai_tool_controller": ("tb_paas_client.api.ai_tool_controller_api", "AiToolControllerApi"), "alarm_comment_controller": ("tb_paas_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), "alarm_controller": ("tb_paas_client.api.alarm_controller_api", "AlarmControllerApi"), + "alarm_rule_controller": ("tb_paas_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), "api_key_controller": ("tb_paas_client.api.api_key_controller_api", "ApiKeyControllerApi"), "asset_controller": ("tb_paas_client.api.asset_controller_api", "AssetControllerApi"), "asset_profile_controller": ("tb_paas_client.api.asset_profile_controller_api", "AssetProfileControllerApi"), @@ -2365,6 +2390,7 @@ "self_registration_controller": ("tb_paas_client.api.self_registration_controller_api", "SelfRegistrationControllerApi"), "sign_up_controller": ("tb_paas_client.api.sign_up_controller_api", "SignUpControllerApi"), "solution_controller": ("tb_paas_client.api.solution_controller_api", "SolutionControllerApi"), + "solution_export_import_controller": ("tb_paas_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), "subscription_controller": ("tb_paas_client.api.subscription_controller_api", "SubscriptionControllerApi"), "tb_resource_controller": ("tb_paas_client.api.tb_resource_controller_api", "TbResourceControllerApi"), "telemetry_controller": ("tb_paas_client.api.telemetry_controller_api", "TelemetryControllerApi"), diff --git a/paas/tb_paas_client/_retry.py b/paas/tb_paas_client/_retry.py index f7c1727b..f64729df 100644 --- a/paas/tb_paas_client/_retry.py +++ b/paas/tb_paas_client/_retry.py @@ -24,6 +24,7 @@ - After exhausting retries, returns the last 429 response (no exception raised) - Drains response body before each retry to avoid connection pool exhaustion """ + import logging import random import time @@ -36,7 +37,9 @@ class _RetryingRESTClient(RESTClientObject): """RESTClientObject subclass that transparently retries HTTP 429 responses.""" - def __init__(self, configuration, max_retries: int, initial_delay_ms: int, max_delay_ms: int) -> None: + def __init__( + self, configuration, max_retries: int, initial_delay_ms: int, max_delay_ms: int + ) -> None: """ Initialise the retrying REST client. @@ -54,7 +57,9 @@ def __init__(self, configuration, max_retries: int, initial_delay_ms: int, max_d # Public API # ------------------------------------------------------------------ - def request(self, method, url, headers=None, body=None, post_params=None, _request_timeout=None): + def request( + self, method, url, headers=None, body=None, post_params=None, _request_timeout=None + ): """Make an HTTP request, retrying up to max_retries times on 429. All arguments are forwarded verbatim to RESTClientObject.request(). @@ -64,7 +69,8 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque returned — callers are responsible for inspecting the status code. """ response = super().request( - method, url, + method, + url, headers=headers, body=body, post_params=post_params, @@ -89,7 +95,8 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque time.sleep(delay_s) response = super().request( - method, url, + method, + url, headers=headers, body=body, post_params=post_params, diff --git a/paas/tb_paas_client/api/__init__.py b/paas/tb_paas_client/api/__init__.py index eff20b50..7316e836 100644 --- a/paas/tb_paas_client/api/__init__.py +++ b/paas/tb_paas_client/api/__init__.py @@ -24,6 +24,7 @@ "AiToolControllerApi", "AlarmCommentControllerApi", "AlarmControllerApi", + "AlarmRuleControllerApi", "ApiKeyControllerApi", "AssetControllerApi", "AssetProfileControllerApi", @@ -86,6 +87,7 @@ "SelfRegistrationControllerApi", "SignUpControllerApi", "SolutionControllerApi", + "SolutionExportImportControllerApi", "SubscriptionControllerApi", "TbResourceControllerApi", "TelemetryControllerApi", @@ -113,6 +115,7 @@ from tb_paas_client.api.ai_tool_controller_api import AiToolControllerApi from tb_paas_client.api.alarm_comment_controller_api import AlarmCommentControllerApi from tb_paas_client.api.alarm_controller_api import AlarmControllerApi + from tb_paas_client.api.alarm_rule_controller_api import AlarmRuleControllerApi from tb_paas_client.api.api_key_controller_api import ApiKeyControllerApi from tb_paas_client.api.asset_controller_api import AssetControllerApi from tb_paas_client.api.asset_profile_controller_api import AssetProfileControllerApi @@ -175,6 +178,7 @@ from tb_paas_client.api.self_registration_controller_api import SelfRegistrationControllerApi from tb_paas_client.api.sign_up_controller_api import SignUpControllerApi from tb_paas_client.api.solution_controller_api import SolutionControllerApi + from tb_paas_client.api.solution_export_import_controller_api import SolutionExportImportControllerApi from tb_paas_client.api.subscription_controller_api import SubscriptionControllerApi from tb_paas_client.api.tb_resource_controller_api import TbResourceControllerApi from tb_paas_client.api.telemetry_controller_api import TelemetryControllerApi @@ -201,6 +205,7 @@ "AiToolControllerApi": "tb_paas_client.api.ai_tool_controller_api", "AlarmCommentControllerApi": "tb_paas_client.api.alarm_comment_controller_api", "AlarmControllerApi": "tb_paas_client.api.alarm_controller_api", + "AlarmRuleControllerApi": "tb_paas_client.api.alarm_rule_controller_api", "ApiKeyControllerApi": "tb_paas_client.api.api_key_controller_api", "AssetControllerApi": "tb_paas_client.api.asset_controller_api", "AssetProfileControllerApi": "tb_paas_client.api.asset_profile_controller_api", @@ -263,6 +268,7 @@ "SelfRegistrationControllerApi": "tb_paas_client.api.self_registration_controller_api", "SignUpControllerApi": "tb_paas_client.api.sign_up_controller_api", "SolutionControllerApi": "tb_paas_client.api.solution_controller_api", + "SolutionExportImportControllerApi": "tb_paas_client.api.solution_export_import_controller_api", "SubscriptionControllerApi": "tb_paas_client.api.subscription_controller_api", "TbResourceControllerApi": "tb_paas_client.api.tb_resource_controller_api", "TelemetryControllerApi": "tb_paas_client.api.telemetry_controller_api", diff --git a/paas/tb_paas_client/api/ai_solution_controller_api.py b/paas/tb_paas_client/api/ai_solution_controller_api.py index 6adbf64c..3904912e 100644 --- a/paas/tb_paas_client/api/ai_solution_controller_api.py +++ b/paas/tb_paas_client/api/ai_solution_controller_api.py @@ -1209,7 +1209,7 @@ def _delete_solution_serialize( @validate_call - def export_solution( + def get_solution( self, solution_id: UUID, _request_timeout: Union[ @@ -1225,7 +1225,7 @@ def export_solution( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """exportSolution + """getSolution :param solution_id: (required) @@ -1252,7 +1252,7 @@ def export_solution( :return: Returns the result object. """ # noqa: E501 - _param = self._export_solution_serialize( + _param = self._get_solution_serialize( solution_id=solution_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1280,7 +1280,7 @@ def export_solution( @validate_call - def export_solution_with_http_info( + def get_solution_with_http_info( self, solution_id: UUID, _request_timeout: Union[ @@ -1296,7 +1296,7 @@ def export_solution_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """exportSolution + """getSolution :param solution_id: (required) @@ -1323,7 +1323,7 @@ def export_solution_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._export_solution_serialize( + _param = self._get_solution_serialize( solution_id=solution_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1351,7 +1351,7 @@ def export_solution_with_http_info( @validate_call - def export_solution_without_preload_content( + def get_solution_without_preload_content( self, solution_id: UUID, _request_timeout: Union[ @@ -1367,7 +1367,7 @@ def export_solution_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """exportSolution + """getSolution :param solution_id: (required) @@ -1394,7 +1394,7 @@ def export_solution_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._export_solution_serialize( + _param = self._get_solution_serialize( solution_id=solution_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1417,7 +1417,7 @@ def export_solution_without_preload_content( return response_data.response - def _export_solution_serialize( + def _get_solution_serialize( self, solution_id, _request_auth, @@ -1466,7 +1466,7 @@ def _export_solution_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/api/ai/solution/{solutionId}/export', + resource_path='/api/ai/solution/{solutionId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1483,9 +1483,8 @@ def _export_solution_serialize( @validate_call - def get_solution( + def get_solutions( self, - solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1499,11 +1498,9 @@ def get_solution( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """getSolution + """getSolutions - :param solution_id: (required) - :type solution_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1526,8 +1523,7 @@ def get_solution( :return: Returns the result object. """ # noqa: E501 - _param = self._get_solution_serialize( - solution_id=solution_id, + _param = self._get_solutions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1554,9 +1550,8 @@ def get_solution( @validate_call - def get_solution_with_http_info( + def get_solutions_with_http_info( self, - solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1570,11 +1565,9 @@ def get_solution_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """getSolution + """getSolutions - :param solution_id: (required) - :type solution_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1597,8 +1590,7 @@ def get_solution_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_solution_serialize( - solution_id=solution_id, + _param = self._get_solutions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1625,9 +1617,8 @@ def get_solution_with_http_info( @validate_call - def get_solution_without_preload_content( + def get_solutions_without_preload_content( self, - solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1641,11 +1632,9 @@ def get_solution_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """getSolution + """getSolutions - :param solution_id: (required) - :type solution_id: UUID :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1668,8 +1657,7 @@ def get_solution_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_solution_serialize( - solution_id=solution_id, + _param = self._get_solutions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1691,269 +1679,7 @@ def get_solution_without_preload_content( return response_data.response - def _get_solution_serialize( - self, - solution_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if solution_id is not None: - _path_params['solutionId'] = solution_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyForm', - 'HttpLoginForm' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/api/ai/solution/{solutionId}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_solutions( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """getSolutions - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_solutions_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_solutions_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """getSolutions - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_solutions_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_solutions_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """getSolutions - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_solutions_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_solutions_serialize( + def _get_solutions_serialize( self, _request_auth, _content_type, @@ -2015,293 +1741,6 @@ def _get_solutions_serialize( - @validate_call - def import_solution( - self, - body: Optional[Any], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """importSolution - - - :param body: (required) - :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._import_solution_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def import_solution_with_http_info( - self, - body: Optional[Any], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """importSolution - - - :param body: (required) - :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._import_solution_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def import_solution_without_preload_content( - self, - body: Optional[Any], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """importSolution - - - :param body: (required) - :type body: object - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._import_solution_serialize( - body=body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _import_solution_serialize( - self, - body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if body is not None: - _body_params = body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyForm', - 'HttpLoginForm' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/ai/solution/import', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def install_solution( self, diff --git a/paas/tb_paas_client/api/alarm_rule_controller_api.py b/paas/tb_paas_client/api/alarm_rule_controller_api.py new file mode 100644 index 00000000..7d812603 --- /dev/null +++ b/paas/tb_paas_client/api/alarm_rule_controller_api.py @@ -0,0 +1,2559 @@ +# +# 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. +# +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. + + The version of the OpenAPI document: 4.3.1.2PAAS + Contact: info@thingsboard.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Any, List, Optional +from typing_extensions import Annotated +from uuid import UUID +from tb_paas_client.models.alarm_rule_definition import AlarmRuleDefinition +from tb_paas_client.models.entity_type import EntityType +from tb_paas_client.models.page_data_alarm_rule_definition import PageDataAlarmRuleDefinition +from tb_paas_client.models.page_data_alarm_rule_definition_info import PageDataAlarmRuleDefinitionInfo +from tb_paas_client.models.page_data_string import PageDataString + +from tb_paas_client.api_client import ApiClient, RequestSerialized +from tb_paas_client.api_response import ApiResponse +from tb_paas_client.rest import RESTResponseType + + +class AlarmRuleControllerApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def delete_alarm_rule( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete Alarm Rule (deleteAlarmRule) + + Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alarm_rule_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_alarm_rule_with_http_info( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete Alarm Rule (deleteAlarmRule) + + Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alarm_rule_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_alarm_rule_without_preload_content( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Alarm Rule (deleteAlarmRule) + + Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_alarm_rule_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_alarm_rule_serialize( + self, + alarm_rule_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if alarm_rule_id is not None: + _path_params['alarmRuleId'] = alarm_rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/alarm/rule/{alarmRuleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_alarm_rule_by_id( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlarmRuleDefinition: + """Get Alarm Rule (getAlarmRuleById) + + Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rule_by_id_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_alarm_rule_by_id_with_http_info( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlarmRuleDefinition]: + """Get Alarm Rule (getAlarmRuleById) + + Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rule_by_id_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_alarm_rule_by_id_without_preload_content( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Alarm Rule (getAlarmRuleById) + + Fetch the Alarm Rule object based on the provided Alarm Rule Id. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rule_by_id_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_alarm_rule_by_id_serialize( + self, + alarm_rule_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if alarm_rule_id is not None: + _path_params['alarmRuleId'] = alarm_rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/alarm/rule/{alarmRuleId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_alarm_rule_names( + self, + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PageDataString: + """Get alarm rule names (getAlarmRuleNames) + + Fetch the list of alarm rule names. Available for users with 'TENANT_ADMIN' authority. + + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rule_names_serialize( + page_size=page_size, + page=page, + text_search=text_search, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataString", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_alarm_rule_names_with_http_info( + self, + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PageDataString]: + """Get alarm rule names (getAlarmRuleNames) + + Fetch the list of alarm rule names. Available for users with 'TENANT_ADMIN' authority. + + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rule_names_serialize( + page_size=page_size, + page=page, + text_search=text_search, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataString", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_alarm_rule_names_without_preload_content( + self, + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get alarm rule names (getAlarmRuleNames) + + Fetch the list of alarm rule names. Available for users with 'TENANT_ADMIN' authority. + + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rule_names_serialize( + page_size=page_size, + page=page, + text_search=text_search, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataString", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_alarm_rule_names_serialize( + self, + page_size, + page, + text_search, + sort_order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page is not None: + + _query_params.append(('page', page)) + + if text_search is not None: + + _query_params.append(('textSearch', text_search)) + + if sort_order is not None: + + _query_params.append(('sortOrder', sort_order)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/alarm/rules/names', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_alarm_rules( + self, + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + entity_type: Annotated[Optional[EntityType], Field(description="Entity type filter. If not specified, alarm rules for all supported entity types will be returned.")] = None, + entities: Annotated[Optional[List[UUID]], Field(description="Entities filter. If not specified, alarm rules for entity type filter will be returned.")] = None, + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PageDataAlarmRuleDefinitionInfo: + """Get alarm rules (getAlarmRules) + + Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. + + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param entity_type: Entity type filter. If not specified, alarm rules for all supported entity types will be returned. + :type entity_type: EntityType + :param entities: Entities filter. If not specified, alarm rules for entity type filter will be returned. + :type entities: List[UUID] + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_property: Property of entity to sort by + :type sort_property: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rules_serialize( + page_size=page_size, + page=page, + entity_type=entity_type, + entities=entities, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataAlarmRuleDefinitionInfo", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_alarm_rules_with_http_info( + self, + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + entity_type: Annotated[Optional[EntityType], Field(description="Entity type filter. If not specified, alarm rules for all supported entity types will be returned.")] = None, + entities: Annotated[Optional[List[UUID]], Field(description="Entities filter. If not specified, alarm rules for entity type filter will be returned.")] = None, + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PageDataAlarmRuleDefinitionInfo]: + """Get alarm rules (getAlarmRules) + + Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. + + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param entity_type: Entity type filter. If not specified, alarm rules for all supported entity types will be returned. + :type entity_type: EntityType + :param entities: Entities filter. If not specified, alarm rules for entity type filter will be returned. + :type entities: List[UUID] + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_property: Property of entity to sort by + :type sort_property: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rules_serialize( + page_size=page_size, + page=page, + entity_type=entity_type, + entities=entities, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataAlarmRuleDefinitionInfo", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_alarm_rules_without_preload_content( + self, + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + entity_type: Annotated[Optional[EntityType], Field(description="Entity type filter. If not specified, alarm rules for all supported entity types will be returned.")] = None, + entities: Annotated[Optional[List[UUID]], Field(description="Entities filter. If not specified, alarm rules for entity type filter will be returned.")] = None, + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get alarm rules (getAlarmRules) + + Fetch tenant alarm rules based on the filter. Available for users with 'TENANT_ADMIN' authority. + + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param entity_type: Entity type filter. If not specified, alarm rules for all supported entity types will be returned. + :type entity_type: EntityType + :param entities: Entities filter. If not specified, alarm rules for entity type filter will be returned. + :type entities: List[UUID] + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_property: Property of entity to sort by + :type sort_property: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rules_serialize( + page_size=page_size, + page=page, + entity_type=entity_type, + entities=entities, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataAlarmRuleDefinitionInfo", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_alarm_rules_serialize( + self, + page_size, + page, + entity_type, + entities, + text_search, + sort_property, + sort_order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'entities': 'multi', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page is not None: + + _query_params.append(('page', page)) + + if entity_type is not None: + + _query_params.append(('entityType', entity_type.value)) + + if entities is not None: + + _query_params.append(('entities', entities)) + + if text_search is not None: + + _query_params.append(('textSearch', text_search)) + + if sort_property is not None: + + _query_params.append(('sortProperty', sort_property)) + + if sort_order is not None: + + _query_params.append(('sortOrder', sort_order)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/alarm/rules', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_alarm_rules_by_entity_id( + self, + entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], + entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PageDataAlarmRuleDefinition: + """Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) + + Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + + :param entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :type entity_type: str + :param entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :type entity_id: str + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_property: Property of entity to sort by + :type sort_property: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rules_by_entity_id_serialize( + entity_type=entity_type, + entity_id=entity_id, + page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataAlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_alarm_rules_by_entity_id_with_http_info( + self, + entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], + entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PageDataAlarmRuleDefinition]: + """Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) + + Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + + :param entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :type entity_type: str + :param entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :type entity_id: str + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_property: Property of entity to sort by + :type sort_property: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rules_by_entity_id_serialize( + entity_type=entity_type, + entity_id=entity_id, + page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataAlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_alarm_rules_by_entity_id_without_preload_content( + self, + entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], + entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], + page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], + page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], + text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = None, + sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = None, + sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Alarm Rules by Entity Id (getAlarmRulesByEntityId) + + Fetch the Alarm Rules based on the provided Entity Id. Available for users with 'TENANT_ADMIN' authority. + + :param entity_type: A string value representing the entity type. For example, 'DEVICE' (required) + :type entity_type: str + :param entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) + :type entity_id: str + :param page_size: Maximum amount of entities in a one page (required) + :type page_size: int + :param page: Sequence number of page starting from 0 (required) + :type page: int + :param text_search: The case insensitive 'substring' filter based on the calculated field name. + :type text_search: str + :param sort_property: Property of entity to sort by + :type sort_property: str + :param sort_order: Sort order. ASC (ASCENDING) or DESC (DESCENDING) + :type sort_order: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_alarm_rules_by_entity_id_serialize( + entity_type=entity_type, + entity_id=entity_id, + page_size=page_size, + page=page, + text_search=text_search, + sort_property=sort_property, + sort_order=sort_order, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PageDataAlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_alarm_rules_by_entity_id_serialize( + self, + entity_type, + entity_id, + page_size, + page, + text_search, + sort_property, + sort_order, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if entity_type is not None: + _path_params['entityType'] = entity_type + if entity_id is not None: + _path_params['entityId'] = entity_id + # process the query parameters + if page_size is not None: + + _query_params.append(('pageSize', page_size)) + + if page is not None: + + _query_params.append(('page', page)) + + if text_search is not None: + + _query_params.append(('textSearch', text_search)) + + if sort_property is not None: + + _query_params.append(('sortProperty', sort_property)) + + if sort_order is not None: + + _query_params.append(('sortOrder', sort_order)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/alarm/rules/{entityType}/{entityId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_latest_alarm_rule_debug_event( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) + + Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_latest_alarm_rule_debug_event_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_latest_alarm_rule_debug_event_with_http_info( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) + + Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_latest_alarm_rule_debug_event_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_latest_alarm_rule_debug_event_without_preload_content( + self, + alarm_rule_id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent) + + Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_id: (required) + :type alarm_rule_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_latest_alarm_rule_debug_event_serialize( + alarm_rule_id=alarm_rule_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_latest_alarm_rule_debug_event_serialize( + self, + alarm_rule_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if alarm_rule_id is not None: + _path_params['alarmRuleId'] = alarm_rule_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/alarm/rule/{alarmRuleId}/debug', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def save_alarm_rule( + self, + alarm_rule_definition: Annotated[AlarmRuleDefinition, Field(description="A JSON value representing the alarm rule.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AlarmRuleDefinition: + """Create Or Update Alarm Rule (saveAlarmRule) + + Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_definition: A JSON value representing the alarm rule. (required) + :type alarm_rule_definition: AlarmRuleDefinition + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._save_alarm_rule_serialize( + alarm_rule_definition=alarm_rule_definition, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def save_alarm_rule_with_http_info( + self, + alarm_rule_definition: Annotated[AlarmRuleDefinition, Field(description="A JSON value representing the alarm rule.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AlarmRuleDefinition]: + """Create Or Update Alarm Rule (saveAlarmRule) + + Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_definition: A JSON value representing the alarm rule. (required) + :type alarm_rule_definition: AlarmRuleDefinition + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._save_alarm_rule_serialize( + alarm_rule_definition=alarm_rule_definition, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def save_alarm_rule_without_preload_content( + self, + alarm_rule_definition: Annotated[AlarmRuleDefinition, Field(description="A JSON value representing the alarm rule.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Or Update Alarm Rule (saveAlarmRule) + + Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. Available for users with 'TENANT_ADMIN' authority. + + :param alarm_rule_definition: A JSON value representing the alarm rule. (required) + :type alarm_rule_definition: AlarmRuleDefinition + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._save_alarm_rule_serialize( + alarm_rule_definition=alarm_rule_definition, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AlarmRuleDefinition", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _save_alarm_rule_serialize( + self, + alarm_rule_definition, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if alarm_rule_definition is not None: + _body_params = alarm_rule_definition + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/alarm/rule', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def test_alarm_rule_script( + self, + body: Annotated[Optional[Any], Field(description="Test alarm rule TBEL condition expression. The expression must return a boolean value.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Test alarm rule TBEL expression (testAlarmRuleScript) + + Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + + :param body: Test alarm rule TBEL condition expression. The expression must return a boolean value. (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_alarm_rule_script_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_alarm_rule_script_with_http_info( + self, + body: Annotated[Optional[Any], Field(description="Test alarm rule TBEL condition expression. The expression must return a boolean value.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Test alarm rule TBEL expression (testAlarmRuleScript) + + Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + + :param body: Test alarm rule TBEL condition expression. The expression must return a boolean value. (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_alarm_rule_script_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_alarm_rule_script_without_preload_content( + self, + body: Annotated[Optional[Any], Field(description="Test alarm rule TBEL condition expression. The expression must return a boolean value.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Test alarm rule TBEL expression (testAlarmRuleScript) + + Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: ```json { \"expression\": \"return temperature > 50;\", \"arguments\": { \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 } } } ``` Expected result JSON contains \"output\" and \"error\". Available for users with 'TENANT_ADMIN' authority. + + :param body: Test alarm rule TBEL condition expression. The expression must return a boolean value. (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_alarm_rule_script_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_alarm_rule_script_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/alarm/rule/testScript', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/paas/tb_paas_client/api/custom_menu_controller_api.py b/paas/tb_paas_client/api/custom_menu_controller_api.py index a0a2c427..5b3d07f1 100644 --- a/paas/tb_paas_client/api/custom_menu_controller_api.py +++ b/paas/tb_paas_client/api/custom_menu_controller_api.py @@ -697,7 +697,7 @@ def get_custom_menu( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> CustomMenuConfig: """Get end-user Custom Menu configuration (getCustomMenu) Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration. @@ -735,7 +735,7 @@ def get_custom_menu( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "CustomMenuConfig", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -769,7 +769,7 @@ def get_custom_menu_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[CustomMenuConfig]: """Get end-user Custom Menu configuration (getCustomMenu) Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration. @@ -807,7 +807,7 @@ def get_custom_menu_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "CustomMenuConfig", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -879,7 +879,7 @@ def get_custom_menu_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "CustomMenuConfig", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", diff --git a/paas/tb_paas_client/api/dashboard_controller_api.py b/paas/tb_paas_client/api/dashboard_controller_api.py index 0adfc319..0ff3e81d 100644 --- a/paas/tb_paas_client/api/dashboard_controller_api.py +++ b/paas/tb_paas_client/api/dashboard_controller_api.py @@ -36,6 +36,7 @@ from typing_extensions import Annotated from tb_paas_client.models.dashboard import Dashboard from tb_paas_client.models.dashboard_info import DashboardInfo +from tb_paas_client.models.home_dashboard import HomeDashboard from tb_paas_client.models.home_dashboard_info import HomeDashboardInfo from tb_paas_client.models.page_data_dashboard_info import PageDataDashboardInfo @@ -1666,7 +1667,7 @@ def get_dashboard_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> Dashboard: """Get Dashboard (getDashboardById) Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases). Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -1710,7 +1711,7 @@ def get_dashboard_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Dashboard", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -1746,7 +1747,7 @@ def get_dashboard_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[Dashboard]: """Get Dashboard (getDashboardById) Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases). Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -1790,7 +1791,7 @@ def get_dashboard_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Dashboard", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -1870,7 +1871,7 @@ def get_dashboard_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "Dashboard", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -2892,7 +2893,7 @@ def get_home_dashboard( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> HomeDashboard: """Get Home Dashboard (getHomeDashboard) Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases). Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -2930,7 +2931,7 @@ def get_home_dashboard( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "HomeDashboard", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -2964,7 +2965,7 @@ def get_home_dashboard_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[HomeDashboard]: """Get Home Dashboard (getHomeDashboard) Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases). Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -3002,7 +3003,7 @@ def get_home_dashboard_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "HomeDashboard", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -3074,7 +3075,7 @@ def get_home_dashboard_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "HomeDashboard", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", diff --git a/paas/tb_paas_client/api/device_profile_controller_api.py b/paas/tb_paas_client/api/device_profile_controller_api.py index 0902f0e9..152894bd 100644 --- a/paas/tb_paas_client/api/device_profile_controller_api.py +++ b/paas/tb_paas_client/api/device_profile_controller_api.py @@ -3015,7 +3015,7 @@ def save_device_profile( ) -> DeviceProfile: """Create Or Update Device Profile (saveDeviceProfile) - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. :param device_profile: (required) :type device_profile: DeviceProfile @@ -3087,7 +3087,7 @@ def save_device_profile_with_http_info( ) -> ApiResponse[DeviceProfile]: """Create Or Update Device Profile (saveDeviceProfile) - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. :param device_profile: (required) :type device_profile: DeviceProfile @@ -3159,7 +3159,7 @@ def save_device_profile_without_preload_content( ) -> RESTResponseType: """Create Or Update Device Profile (saveDeviceProfile) - Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"alarms\":[ ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"alarms\":[ { \"id\":\"2492b935-1226-59e9-8615-17d8978a4f93\", \"alarmType\":\"Temperature Alarm\", \"clearRule\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"LESS\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"propagate\":false, \"createRules\":{ \"MAJOR\":{ \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] }, \"condition\":{ \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"COMPLEX\", \"operation\":\"OR\", \"predicates\":[ { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"LESS_OR_EQUAL\" }, { \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":30.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" } ] }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"WARNING\":{ \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" }, \"condition\":{ \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":null } }, \"condition\":[ { \"key\":{ \"key\":\"tempConstant\", \"type\":\"CONSTANT\" }, \"value\":30, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":0.0, \"dynamicValue\":{ \"inherit\":false, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempThreshold\" } }, \"operation\":\"EQUAL\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null }, \"CRITICAL\":{ \"schedule\":null, \"condition\":{ \"spec\":{ \"type\":\"SIMPLE\" }, \"condition\":[ { \"key\":{ \"key\":\"temperature\", \"type\":\"TIME_SERIES\" }, \"value\":null, \"predicate\":{ \"type\":\"NUMERIC\", \"value\":{ \"userValue\":null, \"defaultValue\":50.0, \"dynamicValue\":null }, \"operation\":\"GREATER\" }, \"valueType\":\"NUMERIC\" } ] }, \"dashboardId\":null, \"alarmDetails\":null } }, \"propagateRelationTypes\":null } ], \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration: # Alarm Schedule Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note, ```json \"schedule\": null ``` means alarm rule is active all the time. **'daysOfWeek'** field represents Monday as 1, Tuesday as 2 and so on. **'startsOn'** and **'endsOn'** fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). **'enabled'** flag specifies if item in a custom rule is active for specific day of the week: ## Specific Time Schedule ```json { \"schedule\":{ \"type\":\"SPECIFIC_TIME\", \"endsOn\":64800000, \"startsOn\":43200000, \"timezone\":\"Europe/Kiev\", \"daysOfWeek\":[ 1, 3, 5 ] } } ``` ## Custom Schedule ```json { \"schedule\":{ \"type\":\"CUSTOM\", \"items\":[ { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":1 }, { \"endsOn\":64800000, \"enabled\":true, \"startsOn\":43200000, \"dayOfWeek\":2 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":3 }, { \"endsOn\":57600000, \"enabled\":true, \"startsOn\":36000000, \"dayOfWeek\":4 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":5 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":6 }, { \"endsOn\":0, \"enabled\":false, \"startsOn\":0, \"dayOfWeek\":7 } ], \"timezone\":\"Europe/Kiev\" } } ``` # Alarm condition type (**'spec'**) Alarm condition type can be either simple, duration, or repeating. For example, 5 times in a row or during 5 minutes. Note, **'userValue'** field is not used and reserved for future usage, **'dynamicValue'** is used for condition appliance by using the value of the **'sourceAttribute'** or else **'defaultValue'** is used (if **'sourceAttribute'** is absent). **'sourceType'** of the **'sourceAttribute'** can be: * 'CURRENT_DEVICE'; * 'CURRENT_CUSTOMER'; * 'CURRENT_TENANT'. **'sourceAttribute'** can be inherited from the owner if **'inherit'** is set to true (for CURRENT_DEVICE and CURRENT_CUSTOMER). ## Repeating alarm condition ```json { \"spec\":{ \"type\":\"REPEATING\", \"predicate\":{ \"userValue\":null, \"defaultValue\":5, \"dynamicValue\":{ \"inherit\":true, \"sourceType\":\"CURRENT_DEVICE\", \"sourceAttribute\":\"tempAttr\" } } } } ``` ## Duration alarm condition ```json { \"spec\":{ \"type\":\"DURATION\", \"unit\":\"MINUTES\", \"predicate\":{ \"userValue\":null, \"defaultValue\":30, \"dynamicValue\":null } } } ``` **'unit'** can be: * 'SECONDS'; * 'MINUTES'; * 'HOURS'; * 'DAYS'. # Key Filters Key filter objects are created under the **'condition'** array. They allow you to define complex logical expressions over entity field, attribute, latest time series value or constant. The filter is defined using 'key', 'valueType', 'value' (refers to the value of the 'CONSTANT' alarm filter key type) and 'predicate' objects. Let's review each object: ## Alarm Filter Key Filter Key defines either entity field, attribute, telemetry or constant. It is a JSON object that consists the key name and type. The following filter key types are supported: * 'ATTRIBUTE' - used for attributes values; * 'TIME_SERIES' - used for time series values; * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; * 'CONSTANT' - constant value specified. Let's review the example: ```json { \"type\": \"TIME_SERIES\", \"key\": \"temperature\" } ``` ## Value Type and Operations Provides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL; * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; ## Filter Predicate Filter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key. Simple predicate example to check 'value < 100': ```json { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 100, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ``` Complex predicate example, to check 'value < 10 or value > 20': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 20, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ``` More complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': ```json { \"type\": \"COMPLEX\", \"operation\": \"OR\", \"predicates\": [ { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 10, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"type\": \"COMPLEX\", \"operation\": \"AND\", \"predicates\": [ { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 50, \"dynamicValue\": null }, \"type\": \"NUMERIC\" }, { \"operation\": \"LESS\", \"value\": { \"userValue\": null, \"defaultValue\": 60, \"dynamicValue\": null }, \"type\": \"NUMERIC\" } ] } ] } ``` You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or device. See example below: ```json { \"operation\": \"GREATER\", \"value\": { \"userValue\": null, \"defaultValue\": 0, \"dynamicValue\": { \"inherit\": false, \"sourceType\": \"CURRENT_TENANT\", \"sourceAttribute\": \"temperatureThreshold\" } }, \"type\": \"NUMERIC\" } ``` Note that you may use 'CURRENT_DEVICE', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source. The 'sourceAttribute' can be inherited from the owner of the specified 'sourceType' if 'inherit' is set to true. # Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. + Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant. # Device profile data definition Device profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"DISABLED\", \"provisionDeviceSecret\":null }, \"transportConfiguration\":{ \"type\":\"DEFAULT\" } } ``` ```json { \"configuration\":{ \"type\":\"DEFAULT\" }, \"provisionConfiguration\":{ \"type\":\"ALLOW_CREATE_NEW_DEVICES\", \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\" }, \"transportConfiguration\":{ \"type\":\"MQTT\", \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\", \"deviceAttributesTopic\":\"v1/devices/me/attributes\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"PROTOBUF\", \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\", \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\", \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\", \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\" } } } ``` Let's review some specific objects examples related to the device profile configuration:# Provision Configuration There are 3 types of device provision configuration for the device profile: * 'DISABLED'; * 'ALLOW_CREATE_NEW_DEVICES'; * 'CHECK_PRE_PROVISIONED_DEVICES'. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details. # Transport Configuration 5 transport configuration types are available: * 'DEFAULT'; * 'MQTT'; * 'LWM2M'; * 'COAP'; * 'SNMP'. Default type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types. See another example of COAP transport configuration below: ```json { \"type\":\"COAP\", \"clientSettings\":{ \"edrxCycle\":null, \"powerMode\":\"DRX\", \"psmActivityTimer\":null, \"pagingTransmissionWindow\":null }, \"coapDeviceTypeConfiguration\":{ \"coapDeviceType\":\"DEFAULT\", \"transportPayloadTypeConfiguration\":{ \"transportPayloadType\":\"JSON\" } } } ```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. Available for users with 'TENANT_ADMIN' authority. :param device_profile: (required) :type device_profile: DeviceProfile diff --git a/paas/tb_paas_client/api/domain_controller_api.py b/paas/tb_paas_client/api/domain_controller_api.py index f1f305bb..0b147c09 100644 --- a/paas/tb_paas_client/api/domain_controller_api.py +++ b/paas/tb_paas_client/api/domain_controller_api.py @@ -35,6 +35,7 @@ from typing import List, Optional from typing_extensions import Annotated from uuid import UUID +from tb_paas_client.models.cloud_domain_info import CloudDomainInfo from tb_paas_client.models.domain import Domain from tb_paas_client.models.domain_info import DomainInfo from tb_paas_client.models.page_data_domain_info import PageDataDomainInfo @@ -350,7 +351,7 @@ def get_cloud_domain_info_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DomainInfo: + ) -> CloudDomainInfo: """Get Domain info by Id (getCloudDomainInfoById) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -388,7 +389,7 @@ def get_cloud_domain_info_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DomainInfo", + '200': "CloudDomainInfo", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -422,7 +423,7 @@ def get_cloud_domain_info_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DomainInfo]: + ) -> ApiResponse[CloudDomainInfo]: """Get Domain info by Id (getCloudDomainInfoById) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -460,7 +461,7 @@ def get_cloud_domain_info_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DomainInfo", + '200': "CloudDomainInfo", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -532,7 +533,7 @@ def get_cloud_domain_info_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DomainInfo", + '200': "CloudDomainInfo", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -1544,7 +1545,7 @@ def _save_domain_serialize( @validate_call - def update_oauth2_clients( + def update_domain_oauth2_clients( self, id: UUID, request_body: List[UUID], @@ -1561,7 +1562,7 @@ def update_oauth2_clients( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Update oauth2 clients (updateOauth2Clients) + """Update oauth2 clients (updateDomainOauth2Clients) Update oauth2 clients for the specified domain. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -1591,7 +1592,7 @@ def update_oauth2_clients( :return: Returns the result object. """ # noqa: E501 - _param = self._update_oauth2_clients_serialize( + _param = self._update_domain_oauth2_clients_serialize( id=id, request_body=request_body, _request_auth=_request_auth, @@ -1620,7 +1621,7 @@ def update_oauth2_clients( @validate_call - def update_oauth2_clients_with_http_info( + def update_domain_oauth2_clients_with_http_info( self, id: UUID, request_body: List[UUID], @@ -1637,7 +1638,7 @@ def update_oauth2_clients_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Update oauth2 clients (updateOauth2Clients) + """Update oauth2 clients (updateDomainOauth2Clients) Update oauth2 clients for the specified domain. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -1667,7 +1668,7 @@ def update_oauth2_clients_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_oauth2_clients_serialize( + _param = self._update_domain_oauth2_clients_serialize( id=id, request_body=request_body, _request_auth=_request_auth, @@ -1696,7 +1697,7 @@ def update_oauth2_clients_with_http_info( @validate_call - def update_oauth2_clients_without_preload_content( + def update_domain_oauth2_clients_without_preload_content( self, id: UUID, request_body: List[UUID], @@ -1713,7 +1714,7 @@ def update_oauth2_clients_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update oauth2 clients (updateOauth2Clients) + """Update oauth2 clients (updateDomainOauth2Clients) Update oauth2 clients for the specified domain. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -1743,7 +1744,7 @@ def update_oauth2_clients_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_oauth2_clients_serialize( + _param = self._update_domain_oauth2_clients_serialize( id=id, request_body=request_body, _request_auth=_request_auth, @@ -1767,7 +1768,7 @@ def update_oauth2_clients_without_preload_content( return response_data.response - def _update_oauth2_clients_serialize( + def _update_domain_oauth2_clients_serialize( self, id, request_body, diff --git a/paas/tb_paas_client/api/entity_group_controller_api.py b/paas/tb_paas_client/api/entity_group_controller_api.py index 9eb1bdbe..6211aa6b 100644 --- a/paas/tb_paas_client/api/entity_group_controller_api.py +++ b/paas/tb_paas_client/api/entity_group_controller_api.py @@ -34,7 +34,6 @@ from pydantic import Field, StrictBool, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from uuid import UUID from tb_paas_client.models.entity_group import EntityGroup from tb_paas_client.models.entity_group_id import EntityGroupId from tb_paas_client.models.entity_group_info import EntityGroupInfo @@ -10988,311 +10987,6 @@ def _share_entity_group_to_child_owner_user_group_serialize( - @validate_call - def share_entity_group_to_child_owner_user_group_v2( - self, - entity_group_id: Annotated[UUID, Field(description="A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - share_group_request: ShareGroupRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroupV2) - - Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. - - :param entity_group_id: A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :type entity_group_id: UUID - :param share_group_request: (required) - :type share_group_request: ShareGroupRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._share_entity_group_to_child_owner_user_group_v2_serialize( - entity_group_id=entity_group_id, - share_group_request=share_group_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def share_entity_group_to_child_owner_user_group_v2_with_http_info( - self, - entity_group_id: Annotated[UUID, Field(description="A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - share_group_request: ShareGroupRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroupV2) - - Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. - - :param entity_group_id: A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :type entity_group_id: UUID - :param share_group_request: (required) - :type share_group_request: ShareGroupRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._share_entity_group_to_child_owner_user_group_v2_serialize( - entity_group_id=entity_group_id, - share_group_request=share_group_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def share_entity_group_to_child_owner_user_group_v2_without_preload_content( - self, - entity_group_id: Annotated[UUID, Field(description="A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - share_group_request: ShareGroupRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroupV2) - - Share the entity group with specified user group using specified role. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group. - - :param entity_group_id: A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) - :type entity_group_id: UUID - :param share_group_request: (required) - :type share_group_request: ShareGroupRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._share_entity_group_to_child_owner_user_group_v2_serialize( - entity_group_id=entity_group_id, - share_group_request=share_group_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '400': "ThingsboardErrorResponse", - '401': "ThingsboardErrorResponse", - '403': "ThingsboardErrorResponse", - '404': "ThingsboardErrorResponse", - '429': "ThingsboardErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _share_entity_group_to_child_owner_user_group_v2_serialize( - self, - entity_group_id, - share_group_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if entity_group_id is not None: - _path_params['entityGroupId'] = entity_group_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if share_group_request is not None: - _body_params = share_group_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'ApiKeyForm', - 'HttpLoginForm' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/api/v2/entityGroup/{entityGroupId}/share', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def unassign_entity_group_from_edge( self, diff --git a/paas/tb_paas_client/api/mail_config_template_controller_api.py b/paas/tb_paas_client/api/mail_config_template_controller_api.py index 8f7a36b7..bebf1f3f 100644 --- a/paas/tb_paas_client/api/mail_config_template_controller_api.py +++ b/paas/tb_paas_client/api/mail_config_template_controller_api.py @@ -52,7 +52,7 @@ def __init__(self, api_client=None) -> None: @validate_call - def get_client_registration_templates( + def get_mail_config_templates( self, _request_timeout: Union[ None, @@ -67,7 +67,7 @@ def get_client_registration_templates( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> object: - """Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + """Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Mail configuration template is set of default smtp settings for mail server that specific provider supports @@ -93,7 +93,7 @@ def get_client_registration_templates( :return: Returns the result object. """ # noqa: E501 - _param = self._get_client_registration_templates_serialize( + _param = self._get_mail_config_templates_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -120,7 +120,7 @@ def get_client_registration_templates( @validate_call - def get_client_registration_templates_with_http_info( + def get_mail_config_templates_with_http_info( self, _request_timeout: Union[ None, @@ -135,7 +135,7 @@ def get_client_registration_templates_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[object]: - """Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + """Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Mail configuration template is set of default smtp settings for mail server that specific provider supports @@ -161,7 +161,7 @@ def get_client_registration_templates_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_client_registration_templates_serialize( + _param = self._get_mail_config_templates_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -188,7 +188,7 @@ def get_client_registration_templates_with_http_info( @validate_call - def get_client_registration_templates_without_preload_content( + def get_mail_config_templates_without_preload_content( self, _request_timeout: Union[ None, @@ -203,7 +203,7 @@ def get_client_registration_templates_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. + """Get the list of all OAuth2 client registration templates (getMailConfigTemplates) Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Mail configuration template is set of default smtp settings for mail server that specific provider supports @@ -229,7 +229,7 @@ def get_client_registration_templates_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_client_registration_templates_serialize( + _param = self._get_mail_config_templates_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -251,7 +251,7 @@ def get_client_registration_templates_without_preload_content( return response_data.response - def _get_client_registration_templates_serialize( + def _get_mail_config_templates_serialize( self, _request_auth, _content_type, diff --git a/paas/tb_paas_client/api/ota_package_controller_api.py b/paas/tb_paas_client/api/ota_package_controller_api.py index d34f61a8..e535d150 100644 --- a/paas/tb_paas_client/api/ota_package_controller_api.py +++ b/paas/tb_paas_client/api/ota_package_controller_api.py @@ -1890,7 +1890,7 @@ def _get_ota_packages_serialize( @validate_call - def get_ota_packages_by_device_profile_id_and_type( + def get_ota_packages_by_device_profile_and_type( self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], @@ -1912,7 +1912,7 @@ def get_ota_packages_by_device_profile_id_and_type( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> PageDataOtaPackageInfo: - """Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) + """Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileAndType) Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -1952,7 +1952,7 @@ def get_ota_packages_by_device_profile_id_and_type( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ota_packages_by_device_profile_id_and_type_serialize( + _param = self._get_ota_packages_by_device_profile_and_type_serialize( device_profile_id=device_profile_id, type=type, page_size=page_size, @@ -1986,7 +1986,7 @@ def get_ota_packages_by_device_profile_id_and_type( @validate_call - def get_ota_packages_by_device_profile_id_and_type_with_http_info( + def get_ota_packages_by_device_profile_and_type_with_http_info( self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], @@ -2008,7 +2008,7 @@ def get_ota_packages_by_device_profile_id_and_type_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[PageDataOtaPackageInfo]: - """Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) + """Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileAndType) Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -2048,7 +2048,7 @@ def get_ota_packages_by_device_profile_id_and_type_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ota_packages_by_device_profile_id_and_type_serialize( + _param = self._get_ota_packages_by_device_profile_and_type_serialize( device_profile_id=device_profile_id, type=type, page_size=page_size, @@ -2082,7 +2082,7 @@ def get_ota_packages_by_device_profile_id_and_type_with_http_info( @validate_call - def get_ota_packages_by_device_profile_id_and_type_without_preload_content( + def get_ota_packages_by_device_profile_and_type_without_preload_content( self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], @@ -2104,7 +2104,7 @@ def get_ota_packages_by_device_profile_id_and_type_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileIdAndType) + """Get OTA Package Infos by Device Profile and Type (getOtaPackagesByDeviceProfileAndType) Returns a page of OTA Package Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. @@ -2144,7 +2144,7 @@ def get_ota_packages_by_device_profile_id_and_type_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_ota_packages_by_device_profile_id_and_type_serialize( + _param = self._get_ota_packages_by_device_profile_and_type_serialize( device_profile_id=device_profile_id, type=type, page_size=page_size, @@ -2173,7 +2173,7 @@ def get_ota_packages_by_device_profile_id_and_type_without_preload_content( return response_data.response - def _get_ota_packages_by_device_profile_id_and_type_serialize( + def _get_ota_packages_by_device_profile_and_type_serialize( self, device_profile_id, type, diff --git a/paas/tb_paas_client/api/rpc_v1_controller_api.py b/paas/tb_paas_client/api/rpc_v1_controller_api.py index 851b23d3..ac657385 100644 --- a/paas/tb_paas_client/api/rpc_v1_controller_api.py +++ b/paas/tb_paas_client/api/rpc_v1_controller_api.py @@ -56,7 +56,7 @@ def __init__(self, api_client=None) -> None: def handle_one_way_device_rpc_request_v1( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -76,7 +76,7 @@ def handle_one_way_device_rpc_request_v1( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -132,7 +132,7 @@ def handle_one_way_device_rpc_request_v1( def handle_one_way_device_rpc_request_v1_with_http_info( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -152,7 +152,7 @@ def handle_one_way_device_rpc_request_v1_with_http_info( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -208,7 +208,7 @@ def handle_one_way_device_rpc_request_v1_with_http_info( def handle_one_way_device_rpc_request_v1_without_preload_content( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -228,7 +228,7 @@ def handle_one_way_device_rpc_request_v1_without_preload_content( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -326,7 +326,7 @@ def _handle_one_way_device_rpc_request_v1_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -361,7 +361,7 @@ def _handle_one_way_device_rpc_request_v1_serialize( def handle_two_way_device_rpc_request_v1( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -381,7 +381,7 @@ def handle_two_way_device_rpc_request_v1( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -437,7 +437,7 @@ def handle_two_way_device_rpc_request_v1( def handle_two_way_device_rpc_request_v1_with_http_info( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -457,7 +457,7 @@ def handle_two_way_device_rpc_request_v1_with_http_info( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -513,7 +513,7 @@ def handle_two_way_device_rpc_request_v1_with_http_info( def handle_two_way_device_rpc_request_v1_without_preload_content( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -533,7 +533,7 @@ def handle_two_way_device_rpc_request_v1_without_preload_content( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -631,7 +631,7 @@ def _handle_two_way_device_rpc_request_v1_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) diff --git a/paas/tb_paas_client/api/rpc_v2_controller_api.py b/paas/tb_paas_client/api/rpc_v2_controller_api.py index 17624b15..366c5bcc 100644 --- a/paas/tb_paas_client/api/rpc_v2_controller_api.py +++ b/paas/tb_paas_client/api/rpc_v2_controller_api.py @@ -991,7 +991,7 @@ def _get_persisted_rpc_by_device_serialize( def handle_one_way_device_rpc_request_v2( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1011,7 +1011,7 @@ def handle_one_way_device_rpc_request_v2( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1069,7 +1069,7 @@ def handle_one_way_device_rpc_request_v2( def handle_one_way_device_rpc_request_v2_with_http_info( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1089,7 +1089,7 @@ def handle_one_way_device_rpc_request_v2_with_http_info( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1147,7 +1147,7 @@ def handle_one_way_device_rpc_request_v2_with_http_info( def handle_one_way_device_rpc_request_v2_without_preload_content( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1167,7 +1167,7 @@ def handle_one_way_device_rpc_request_v2_without_preload_content( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1267,7 +1267,7 @@ def _handle_one_way_device_rpc_request_v2_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -1302,7 +1302,7 @@ def _handle_one_way_device_rpc_request_v2_serialize( def handle_two_way_device_rpc_request_v2( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1322,7 +1322,7 @@ def handle_two_way_device_rpc_request_v2( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1380,7 +1380,7 @@ def handle_two_way_device_rpc_request_v2( def handle_two_way_device_rpc_request_v2_with_http_info( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1400,7 +1400,7 @@ def handle_two_way_device_rpc_request_v2_with_http_info( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1458,7 +1458,7 @@ def handle_two_way_device_rpc_request_v2_with_http_info( def handle_two_way_device_rpc_request_v2_without_preload_content( self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1478,7 +1478,7 @@ def handle_two_way_device_rpc_request_v2_without_preload_content( :param device_id: A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type device_id: str - :param body: (required) + :param body: A JSON object representing the RPC request. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1578,7 +1578,7 @@ def _handle_two_way_device_rpc_request_v2_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) diff --git a/paas/tb_paas_client/api/rule_engine_controller_api.py b/paas/tb_paas_client/api/rule_engine_controller_api.py index 55881101..59a7774d 100644 --- a/paas/tb_paas_client/api/rule_engine_controller_api.py +++ b/paas/tb_paas_client/api/rule_engine_controller_api.py @@ -57,7 +57,7 @@ def handle_rule_engine_request_for_entity( self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -79,7 +79,7 @@ def handle_rule_engine_request_for_entity( :type entity_type: str :param entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type entity_id: str - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -137,7 +137,7 @@ def handle_rule_engine_request_for_entity_with_http_info( self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -159,7 +159,7 @@ def handle_rule_engine_request_for_entity_with_http_info( :type entity_type: str :param entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type entity_id: str - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -217,7 +217,7 @@ def handle_rule_engine_request_for_entity_without_preload_content( self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -239,7 +239,7 @@ def handle_rule_engine_request_for_entity_without_preload_content( :type entity_type: str :param entity_id: A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' (required) :type entity_id: str - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -341,7 +341,7 @@ def _handle_rule_engine_request_for_entity_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -379,7 +379,7 @@ def handle_rule_engine_request_for_entity_with_queue_and_timeout( entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -405,7 +405,7 @@ def handle_rule_engine_request_for_entity_with_queue_and_timeout( :type queue_name: str :param timeout: Timeout to process the request in milliseconds (required) :type timeout: int - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -467,7 +467,7 @@ def handle_rule_engine_request_for_entity_with_queue_and_timeout_with_http_info( entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -493,7 +493,7 @@ def handle_rule_engine_request_for_entity_with_queue_and_timeout_with_http_info( :type queue_name: str :param timeout: Timeout to process the request in milliseconds (required) :type timeout: int - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -555,7 +555,7 @@ def handle_rule_engine_request_for_entity_with_queue_and_timeout_without_preload entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -581,7 +581,7 @@ def handle_rule_engine_request_for_entity_with_queue_and_timeout_without_preload :type queue_name: str :param timeout: Timeout to process the request in milliseconds (required) :type timeout: int - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -691,7 +691,7 @@ def _handle_rule_engine_request_for_entity_with_queue_and_timeout_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -728,7 +728,7 @@ def handle_rule_engine_request_for_entity_with_timeout( entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -752,7 +752,7 @@ def handle_rule_engine_request_for_entity_with_timeout( :type entity_id: str :param timeout: Timeout to process the request in milliseconds (required) :type timeout: int - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -812,7 +812,7 @@ def handle_rule_engine_request_for_entity_with_timeout_with_http_info( entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -836,7 +836,7 @@ def handle_rule_engine_request_for_entity_with_timeout_with_http_info( :type entity_id: str :param timeout: Timeout to process the request in milliseconds (required) :type timeout: int - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -896,7 +896,7 @@ def handle_rule_engine_request_for_entity_with_timeout_without_preload_content( entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -920,7 +920,7 @@ def handle_rule_engine_request_for_entity_with_timeout_without_preload_content( :type entity_id: str :param timeout: Timeout to process the request in milliseconds (required) :type timeout: int - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1026,7 +1026,7 @@ def _handle_rule_engine_request_for_entity_with_timeout_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -1060,7 +1060,7 @@ def _handle_rule_engine_request_for_entity_with_timeout_serialize( @validate_call def handle_rule_engine_request_for_user( self, - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1078,7 +1078,7 @@ def handle_rule_engine_request_for_user( Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1132,7 +1132,7 @@ def handle_rule_engine_request_for_user( @validate_call def handle_rule_engine_request_for_user_with_http_info( self, - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1150,7 +1150,7 @@ def handle_rule_engine_request_for_user_with_http_info( Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1204,7 +1204,7 @@ def handle_rule_engine_request_for_user_with_http_info( @validate_call def handle_rule_engine_request_for_user_without_preload_content( self, - body: StrictStr, + body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1222,7 +1222,7 @@ def handle_rule_engine_request_for_user_without_preload_content( Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields: * **'serviceId'** to identify the platform server that received the request; * **'requestUUID'** to identify the request and route possible response from the Rule Engine; Use **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities). - :param body: (required) + :param body: A JSON object representing the message. (required) :type body: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1316,7 +1316,7 @@ def _handle_rule_engine_request_for_user_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) diff --git a/paas/tb_paas_client/api/solution_export_import_controller_api.py b/paas/tb_paas_client/api/solution_export_import_controller_api.py new file mode 100644 index 00000000..063e7eee --- /dev/null +++ b/paas/tb_paas_client/api/solution_export_import_controller_api.py @@ -0,0 +1,927 @@ +# +# 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. +# +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. + + The version of the OpenAPI document: 4.3.1.2PAAS + Contact: info@thingsboard.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field +from typing_extensions import Annotated +from tb_paas_client.models.solution_data import SolutionData +from tb_paas_client.models.solution_export_request import SolutionExportRequest +from tb_paas_client.models.solution_export_response import SolutionExportResponse +from tb_paas_client.models.solution_import_result import SolutionImportResult +from tb_paas_client.models.solution_validation_result import SolutionValidationResult + +from tb_paas_client.api_client import ApiClient, RequestSerialized +from tb_paas_client.api_response import ApiResponse +from tb_paas_client.rest import RESTResponseType + + +class SolutionExportImportControllerApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def export_solution( + self, + solution_export_request: Annotated[SolutionExportRequest, Field(description="Export request with entity IDs and optional settings.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SolutionExportResponse: + """Export Solution (exportSolution) + + Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + :param solution_export_request: Export request with entity IDs and optional settings. (required) + :type solution_export_request: SolutionExportRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_solution_serialize( + solution_export_request=solution_export_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionExportResponse", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def export_solution_with_http_info( + self, + solution_export_request: Annotated[SolutionExportRequest, Field(description="Export request with entity IDs and optional settings.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SolutionExportResponse]: + """Export Solution (exportSolution) + + Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + :param solution_export_request: Export request with entity IDs and optional settings. (required) + :type solution_export_request: SolutionExportRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_solution_serialize( + solution_export_request=solution_export_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionExportResponse", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def export_solution_without_preload_content( + self, + solution_export_request: Annotated[SolutionExportRequest, Field(description="Export request with entity IDs and optional settings.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Export Solution (exportSolution) + + Exports a set of entities as a portable solution package. The request specifies entity IDs to include and optional export settings (relations, attributes, credentials). All specified entities must belong to the current tenant. The response contains the solution data (entities grouped by type) and any dependency warnings (e.g. when an exported device profile references a rule chain that was not included in the export). The solution data can later be imported into the same or a different tenant via the import endpoint. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + :param solution_export_request: Export request with entity IDs and optional settings. (required) + :type solution_export_request: SolutionExportRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._export_solution_serialize( + solution_export_request=solution_export_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionExportResponse", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _export_solution_serialize( + self, + solution_export_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if solution_export_request is not None: + _body_params = solution_export_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/solution/export', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def import_solution( + self, + solution_data: Annotated[SolutionData, Field(description="Solution data exported via the export endpoint.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SolutionImportResult: + """Import Solution (importSolution) + + Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + :param solution_data: Solution data exported via the export endpoint. (required) + :type solution_data: SolutionData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_solution_serialize( + solution_data=solution_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionImportResult", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def import_solution_with_http_info( + self, + solution_data: Annotated[SolutionData, Field(description="Solution data exported via the export endpoint.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SolutionImportResult]: + """Import Solution (importSolution) + + Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + :param solution_data: Solution data exported via the export endpoint. (required) + :type solution_data: SolutionData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_solution_serialize( + solution_data=solution_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionImportResult", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def import_solution_without_preload_content( + self, + solution_data: Annotated[SolutionData, Field(description="Solution data exported via the export endpoint.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Import Solution (importSolution) + + Imports a solution package into the current tenant. Before importing, the endpoint checks for name conflicts with existing entities in the tenant. If name conflicts are detected, the import is rejected with HTTP 409 (Conflict). The import is transactional — if any entity fails to import, all changes are rolled back (all-or-nothing). Entities are imported in dependency order with a two-pass resolution for circular references (e.g. rule chains referencing each other). Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL WRITE permission. + + :param solution_data: Solution data exported via the export endpoint. (required) + :type solution_data: SolutionData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._import_solution_serialize( + solution_data=solution_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionImportResult", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _import_solution_serialize( + self, + solution_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if solution_data is not None: + _body_params = solution_data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/solution/import', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def validate_solution( + self, + solution_data: Annotated[SolutionData, Field(description="Solution data to validate.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SolutionValidationResult: + """Validate Solution (validateSolution) + + Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + + :param solution_data: Solution data to validate. (required) + :type solution_data: SolutionData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_solution_serialize( + solution_data=solution_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionValidationResult", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def validate_solution_with_http_info( + self, + solution_data: Annotated[SolutionData, Field(description="Solution data to validate.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SolutionValidationResult]: + """Validate Solution (validateSolution) + + Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + + :param solution_data: Solution data to validate. (required) + :type solution_data: SolutionData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_solution_serialize( + solution_data=solution_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionValidationResult", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def validate_solution_without_preload_content( + self, + solution_data: Annotated[SolutionData, Field(description="Solution data to validate.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Validate Solution (validateSolution) + + Performs a dry-run validation of a solution without modifying any data. Detects duplicate entities within the solution, identifies name conflicts with existing entities in the current tenant, and reports missing dependency references (e.g. a device profile referencing an absent rule chain). The result indicates whether the solution is safe to import (valid=true) and lists any conflicts or warnings. Available for users with 'TENANT_ADMIN' authority. Requires VERSION_CONTROL READ permission. + + :param solution_data: Solution data to validate. (required) + :type solution_data: SolutionData + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._validate_solution_serialize( + solution_data=solution_data, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SolutionValidationResult", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _validate_solution_serialize( + self, + solution_data, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if solution_data is not None: + _body_params = solution_data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/solution/validate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/paas/tb_paas_client/api/telemetry_controller_api.py b/paas/tb_paas_client/api/telemetry_controller_api.py index ee005259..7082e207 100644 --- a/paas/tb_paas_client/api/telemetry_controller_api.py +++ b/paas/tb_paas_client/api/telemetry_controller_api.py @@ -4144,7 +4144,7 @@ def _save_device_attributes_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -4482,7 +4482,7 @@ def _save_entity_attributes_v1_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -4820,7 +4820,7 @@ def _save_entity_attributes_v2_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -5158,7 +5158,7 @@ def _save_entity_telemetry_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) @@ -5511,7 +5511,7 @@ def _save_entity_telemetry_with_ttl_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'text/plain' ] ) ) diff --git a/paas/tb_paas_client/api/translation_controller_api.py b/paas/tb_paas_client/api/translation_controller_api.py index adae1cd5..03edf4db 100644 --- a/paas/tb_paas_client/api/translation_controller_api.py +++ b/paas/tb_paas_client/api/translation_controller_api.py @@ -873,7 +873,7 @@ def get_full_translation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: + ) -> object: """Get end-user all-to-one translation (getFullTranslation) Fetch the end-user translation for specified locale. The result is the merge of user custom translation, system language translation and default locale translation. @@ -917,7 +917,7 @@ def get_full_translation( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "object", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -953,7 +953,7 @@ def get_full_translation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: + ) -> ApiResponse[object]: """Get end-user all-to-one translation (getFullTranslation) Fetch the end-user translation for specified locale. The result is the merge of user custom translation, system language translation and default locale translation. @@ -997,7 +997,7 @@ def get_full_translation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "object", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", @@ -1077,7 +1077,7 @@ def get_full_translation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "object", '400': "ThingsboardErrorResponse", '401': "ThingsboardErrorResponse", '403': "ThingsboardErrorResponse", diff --git a/paas/tb_paas_client/client.py b/paas/tb_paas_client/client.py index 95f1c260..27502cc0 100644 --- a/paas/tb_paas_client/client.py +++ b/paas/tb_paas_client/client.py @@ -24,13 +24,15 @@ - _RetryingRESTClient for transparent HTTP 429 retry with exponential backoff - __getattr__ delegation to per-controller API classes via _CONTROLLER_MAP """ + import importlib + +from ._auth import _AuthManager +from ._controller_map import _CONTROLLER_ATTR_MAP, _CONTROLLER_MAP +from ._retry import _RetryingRESTClient from .api_client import ApiClient from .configuration import Configuration from .models.login_request import LoginRequest -from ._auth import _AuthManager -from ._retry import _RetryingRESTClient -from ._controller_map import _CONTROLLER_MAP, _CONTROLLER_ATTR_MAP class ThingsboardClient: @@ -120,6 +122,7 @@ def __init__( # JWT eager login if username is not None: from .api.login_endpoint_api import LoginEndpointApi + login_api = LoginEndpointApi(api_client) response = login_api.login(LoginRequest(username=username, password=password)) auth_manager.on_login(username, password, response.token, response.refresh_token) @@ -171,9 +174,7 @@ def __getattr__(self, name: str): controller = self._get_or_create_controller(cls_name, module_path) return getattr(controller, name) - raise AttributeError( - f"'{type(self).__name__}' object has no attribute {name!r}" - ) + raise AttributeError(f"'{type(self).__name__}' object has no attribute {name!r}") # ------------------------------------------------------------------ # Token accessors diff --git a/paas/tb_paas_client/client.pyi b/paas/tb_paas_client/client.pyi index 189d3f76..f3bd085f 100644 --- a/paas/tb_paas_client/client.pyi +++ b/paas/tb_paas_client/client.pyi @@ -28,6 +28,7 @@ from tb_paas_client.api.ai_solution_controller_api import AiSolutionControllerAp from tb_paas_client.api.ai_tool_controller_api import AiToolControllerApi from tb_paas_client.api.alarm_comment_controller_api import AlarmCommentControllerApi from tb_paas_client.api.alarm_controller_api import AlarmControllerApi +from tb_paas_client.api.alarm_rule_controller_api import AlarmRuleControllerApi from tb_paas_client.api.api_key_controller_api import ApiKeyControllerApi from tb_paas_client.api.asset_controller_api import AssetControllerApi from tb_paas_client.api.asset_profile_controller_api import AssetProfileControllerApi @@ -90,6 +91,7 @@ from tb_paas_client.api.secret_controller_api import SecretControllerApi from tb_paas_client.api.self_registration_controller_api import SelfRegistrationControllerApi from tb_paas_client.api.sign_up_controller_api import SignUpControllerApi from tb_paas_client.api.solution_controller_api import SolutionControllerApi +from tb_paas_client.api.solution_export_import_controller_api import SolutionExportImportControllerApi from tb_paas_client.api.subscription_controller_api import SubscriptionControllerApi from tb_paas_client.api.tb_resource_controller_api import TbResourceControllerApi from tb_paas_client.api.telemetry_controller_api import TelemetryControllerApi @@ -310,10 +312,6 @@ class ThingsboardClient: def delete_solution_with_http_info(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... def delete_solution_without_preload_content(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _delete_solution_serialize(self, solution_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def export_solution(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... - def export_solution_with_http_info(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... - def export_solution_without_preload_content(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _export_solution_serialize(self, solution_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def get_solution(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... def get_solution_with_http_info(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... def get_solution_without_preload_content(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... @@ -322,10 +320,6 @@ class ThingsboardClient: def get_solutions_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... def get_solutions_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_solutions_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def import_solution(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... - def import_solution_with_http_info(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... - def import_solution_without_preload_content(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _import_solution_serialize(self, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def install_solution(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... def install_solution_with_http_info(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... def install_solution_without_preload_content(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... @@ -427,6 +421,42 @@ class ThingsboardClient: def unassign_alarm_without_preload_content(self, alarm_id: Annotated[StrictStr, Field(description="A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _unassign_alarm_serialize(self, alarm_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- AlarmRuleControllerApi --- + @property + def alarm_rule_controller(self) -> AlarmRuleControllerApi: ... + def delete_alarm_rule(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... + def delete_alarm_rule_with_http_info(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def delete_alarm_rule_without_preload_content(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _delete_alarm_rule_serialize(self, alarm_rule_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_alarm_rule_by_id(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> AlarmRuleDefinition: ... + def get_alarm_rule_by_id_with_http_info(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[AlarmRuleDefinition]: ... + def get_alarm_rule_by_id_without_preload_content(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_alarm_rule_by_id_serialize(self, alarm_rule_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_alarm_rule_names(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataString: ... + def get_alarm_rule_names_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataString]: ... + def get_alarm_rule_names_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_alarm_rule_names_serialize(self, page_size, page, text_search, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_alarm_rules(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], entity_type: Annotated[Optional[EntityType], Field(description="Entity type filter. If not specified, alarm rules for all supported entity types will be returned.")] = ..., entities: Annotated[Optional[List[UUID]], Field(description="Entities filter. If not specified, alarm rules for entity type filter will be returned.")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataAlarmRuleDefinitionInfo: ... + def get_alarm_rules_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], entity_type: Annotated[Optional[EntityType], Field(description="Entity type filter. If not specified, alarm rules for all supported entity types will be returned.")] = ..., entities: Annotated[Optional[List[UUID]], Field(description="Entities filter. If not specified, alarm rules for entity type filter will be returned.")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataAlarmRuleDefinitionInfo]: ... + def get_alarm_rules_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], entity_type: Annotated[Optional[EntityType], Field(description="Entity type filter. If not specified, alarm rules for all supported entity types will be returned.")] = ..., entities: Annotated[Optional[List[UUID]], Field(description="Entities filter. If not specified, alarm rules for entity type filter will be returned.")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_alarm_rules_serialize(self, page_size, page, entity_type, entities, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_alarm_rules_by_entity_id(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataAlarmRuleDefinition: ... + def get_alarm_rules_by_entity_id_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataAlarmRuleDefinition]: ... + def get_alarm_rules_by_entity_id_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the calculated field name.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_alarm_rules_by_entity_id_serialize(self, entity_type, entity_id, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_latest_alarm_rule_debug_event(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def get_latest_alarm_rule_debug_event_with_http_info(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def get_latest_alarm_rule_debug_event_without_preload_content(self, alarm_rule_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_latest_alarm_rule_debug_event_serialize(self, alarm_rule_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def save_alarm_rule(self, alarm_rule_definition: Annotated[AlarmRuleDefinition, Field(description="A JSON value representing the alarm rule.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> AlarmRuleDefinition: ... + def save_alarm_rule_with_http_info(self, alarm_rule_definition: Annotated[AlarmRuleDefinition, Field(description="A JSON value representing the alarm rule.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[AlarmRuleDefinition]: ... + def save_alarm_rule_without_preload_content(self, alarm_rule_definition: Annotated[AlarmRuleDefinition, Field(description="A JSON value representing the alarm rule.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _save_alarm_rule_serialize(self, alarm_rule_definition, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def test_alarm_rule_script(self, body: Annotated[Optional[Any], Field(description="Test alarm rule TBEL condition expression. The expression must return a boolean value.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def test_alarm_rule_script_with_http_info(self, body: Annotated[Optional[Any], Field(description="Test alarm rule TBEL condition expression. The expression must return a boolean value.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def test_alarm_rule_script_without_preload_content(self, body: Annotated[Optional[Any], Field(description="Test alarm rule TBEL condition expression. The expression must return a boolean value.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _test_alarm_rule_script_serialize(self, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- ApiKeyControllerApi --- @property def api_key_controller(self) -> ApiKeyControllerApi: ... @@ -870,8 +900,8 @@ class ThingsboardClient: def delete_custom_menu_with_http_info(self, custom_menu_id: Annotated[UUID, Field(description="A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], force: Annotated[Optional[StrictBool], Field(description="Force set to true will unassign menu before deletion")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[CustomMenuDeleteResult]: ... def delete_custom_menu_without_preload_content(self, custom_menu_id: Annotated[UUID, Field(description="A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], force: Annotated[Optional[StrictBool], Field(description="Force set to true will unassign menu before deletion")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _delete_custom_menu_serialize(self, custom_menu_id, force, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_custom_menu(self, if_none_match: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... - def get_custom_menu_with_http_info(self, if_none_match: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def get_custom_menu(self, if_none_match: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> CustomMenuConfig: ... + def get_custom_menu_with_http_info(self, if_none_match: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[CustomMenuConfig]: ... def get_custom_menu_without_preload_content(self, if_none_match: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_custom_menu_serialize(self, if_none_match, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def get_custom_menu_assignee_list(self, custom_menu_id: Annotated[UUID, Field(description="A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> List[EntityInfo]: ... @@ -1014,8 +1044,8 @@ class ThingsboardClient: def get_customer_home_dashboard_info_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[HomeDashboardInfo]: ... def get_customer_home_dashboard_info_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_customer_home_dashboard_info_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_dashboard_by_id(self, dashboard_id: Annotated[StrictStr, Field(description="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], include_resources: Annotated[Optional[StrictBool], Field(description="Export used resources and replace resource links with resource metadata")] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... - def get_dashboard_by_id_with_http_info(self, dashboard_id: Annotated[StrictStr, Field(description="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], include_resources: Annotated[Optional[StrictBool], Field(description="Export used resources and replace resource links with resource metadata")] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def get_dashboard_by_id(self, dashboard_id: Annotated[StrictStr, Field(description="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], include_resources: Annotated[Optional[StrictBool], Field(description="Export used resources and replace resource links with resource metadata")] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> Dashboard: ... + def get_dashboard_by_id_with_http_info(self, dashboard_id: Annotated[StrictStr, Field(description="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], include_resources: Annotated[Optional[StrictBool], Field(description="Export used resources and replace resource links with resource metadata")] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[Dashboard]: ... def get_dashboard_by_id_without_preload_content(self, dashboard_id: Annotated[StrictStr, Field(description="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], include_resources: Annotated[Optional[StrictBool], Field(description="Export used resources and replace resource links with resource metadata")] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_dashboard_by_id_serialize(self, dashboard_id, include_resources, accept_encoding, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def get_dashboard_info_by_id(self, dashboard_id: Annotated[StrictStr, Field(description="A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> DashboardInfo: ... @@ -1030,8 +1060,8 @@ class ThingsboardClient: def get_dashboards_by_ids_with_http_info(self, dashboard_ids: Annotated[List[StrictStr], Field(description="A list of dashboard ids, separated by comma ','")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[List[DashboardInfo]]: ... def get_dashboards_by_ids_without_preload_content(self, dashboard_ids: Annotated[List[StrictStr], Field(description="A list of dashboard ids, separated by comma ','")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_dashboards_by_ids_serialize(self, dashboard_ids, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_home_dashboard(self, accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... - def get_home_dashboard_with_http_info(self, accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def get_home_dashboard(self, accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> HomeDashboard: ... + def get_home_dashboard_with_http_info(self, accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[HomeDashboard]: ... def get_home_dashboard_without_preload_content(self, accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_home_dashboard_serialize(self, accept_encoding, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def get_home_dashboard_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> HomeDashboardInfo: ... @@ -1278,8 +1308,8 @@ class ThingsboardClient: def delete_domain_with_http_info(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... def delete_domain_without_preload_content(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _delete_domain_serialize(self, id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_cloud_domain_info_by_id(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> DomainInfo: ... - def get_cloud_domain_info_by_id_with_http_info(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[DomainInfo]: ... + def get_cloud_domain_info_by_id(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> CloudDomainInfo: ... + def get_cloud_domain_info_by_id_with_http_info(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[CloudDomainInfo]: ... def get_cloud_domain_info_by_id_without_preload_content(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_cloud_domain_info_by_id_serialize(self, id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def get_domain_info_by_id(self, id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> DomainInfo: ... @@ -1294,10 +1324,10 @@ class ThingsboardClient: def save_domain_with_http_info(self, domain: Domain, oauth2_client_ids: Annotated[Optional[List[StrictStr]], Field(description="A list of oauth2 client registration ids, separated by comma ','")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[Domain]: ... def save_domain_without_preload_content(self, domain: Domain, oauth2_client_ids: Annotated[Optional[List[StrictStr]], Field(description="A list of oauth2 client registration ids, separated by comma ','")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _save_domain_serialize(self, domain, oauth2_client_ids, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def update_oauth2_clients(self, id: UUID, request_body: List[UUID], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... - def update_oauth2_clients_with_http_info(self, id: UUID, request_body: List[UUID], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... - def update_oauth2_clients_without_preload_content(self, id: UUID, request_body: List[UUID], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _update_oauth2_clients_serialize(self, id, request_body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def update_domain_oauth2_clients(self, id: UUID, request_body: List[UUID], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... + def update_domain_oauth2_clients_with_http_info(self, id: UUID, request_body: List[UUID], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def update_domain_oauth2_clients_without_preload_content(self, id: UUID, request_body: List[UUID], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _update_domain_oauth2_clients_serialize(self, id, request_body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... # --- EdgeControllerApi --- @property @@ -1602,10 +1632,6 @@ class ThingsboardClient: def share_entity_group_to_child_owner_user_group_with_http_info(self, entity_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], user_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], role_id: Annotated[StrictStr, Field(description="A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... def share_entity_group_to_child_owner_user_group_without_preload_content(self, entity_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], user_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], role_id: Annotated[StrictStr, Field(description="A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _share_entity_group_to_child_owner_user_group_serialize(self, entity_group_id, user_group_id, role_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def share_entity_group_to_child_owner_user_group_v2(self, entity_group_id: Annotated[UUID, Field(description="A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], share_group_request: ShareGroupRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... - def share_entity_group_to_child_owner_user_group_v2_with_http_info(self, entity_group_id: Annotated[UUID, Field(description="A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], share_group_request: ShareGroupRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... - def share_entity_group_to_child_owner_user_group_v2_without_preload_content(self, entity_group_id: Annotated[UUID, Field(description="A uuid value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], share_group_request: ShareGroupRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _share_entity_group_to_child_owner_user_group_v2_serialize(self, entity_group_id, share_group_request, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def unassign_entity_group_from_edge(self, edge_id: Annotated[StrictStr, Field(description="A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], group_type: Annotated[StrictStr, Field(description="EntityGroup type")], entity_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> EntityGroup: ... def unassign_entity_group_from_edge_with_http_info(self, edge_id: Annotated[StrictStr, Field(description="A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], group_type: Annotated[StrictStr, Field(description="EntityGroup type")], entity_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[EntityGroup]: ... def unassign_entity_group_from_edge_without_preload_content(self, edge_id: Annotated[StrictStr, Field(description="A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], group_type: Annotated[StrictStr, Field(description="EntityGroup type")], entity_group_id: Annotated[StrictStr, Field(description="A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... @@ -1982,10 +2008,10 @@ class ThingsboardClient: # --- MailConfigTemplateControllerApi --- @property def mail_config_template_controller(self) -> MailConfigTemplateControllerApi: ... - def get_client_registration_templates(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... - def get_client_registration_templates_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... - def get_client_registration_templates_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _get_client_registration_templates_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_mail_config_templates(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def get_mail_config_templates_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def get_mail_config_templates_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_mail_config_templates_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... # --- MobileAppBundleControllerApi --- @property @@ -2270,10 +2296,10 @@ class ThingsboardClient: def get_ota_packages_with_http_info(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataOtaPackageInfo]: ... def get_ota_packages_without_preload_content(self, page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_ota_packages_serialize(self, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_ota_packages_by_device_profile_id_and_type(self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataOtaPackageInfo: ... - def get_ota_packages_by_device_profile_id_and_type_with_http_info(self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataOtaPackageInfo]: ... - def get_ota_packages_by_device_profile_id_and_type_without_preload_content(self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... - def _get_ota_packages_by_device_profile_id_and_type_serialize(self, device_profile_id, type, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_ota_packages_by_device_profile_and_type(self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> PageDataOtaPackageInfo: ... + def get_ota_packages_by_device_profile_and_type_with_http_info(self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[PageDataOtaPackageInfo]: ... + def get_ota_packages_by_device_profile_and_type_without_preload_content(self, device_profile_id: Annotated[StrictStr, Field(description="A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], type: Annotated[StrictStr, Field(description="OTA Package type.")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], text_search: Annotated[Optional[StrictStr], Field(description="The case insensitive 'substring' filter based on the ota package title.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_ota_packages_by_device_profile_and_type_serialize(self, device_profile_id, type, page_size, page, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def save_ota_package_data(self, ota_package_id: Annotated[StrictStr, Field(description="A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], checksum_algorithm: Annotated[StrictStr, Field(description="OTA Package checksum algorithm.")], file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="OTA Package data.")], checksum: Annotated[Optional[StrictStr], Field(description="OTA Package checksum. For example, '0xd87f7e0c'")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> OtaPackageInfo: ... def save_ota_package_data_with_http_info(self, ota_package_id: Annotated[StrictStr, Field(description="A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], checksum_algorithm: Annotated[StrictStr, Field(description="OTA Package checksum algorithm.")], file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="OTA Package data.")], checksum: Annotated[Optional[StrictStr], Field(description="OTA Package checksum. For example, '0xd87f7e0c'")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[OtaPackageInfo]: ... def save_ota_package_data_without_preload_content(self, ota_package_id: Annotated[StrictStr, Field(description="A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], checksum_algorithm: Annotated[StrictStr, Field(description="OTA Package checksum algorithm.")], file: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="OTA Package data.")], checksum: Annotated[Optional[StrictStr], Field(description="OTA Package checksum. For example, '0xd87f7e0c'")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... @@ -2458,13 +2484,13 @@ class ThingsboardClient: # --- RpcV1ControllerApi --- @property def rpc_v1_controller(self) -> RpcV1ControllerApi: ... - def handle_one_way_device_rpc_request_v1(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_one_way_device_rpc_request_v1_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_one_way_device_rpc_request_v1_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_one_way_device_rpc_request_v1(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_one_way_device_rpc_request_v1_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_one_way_device_rpc_request_v1_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_one_way_device_rpc_request_v1_serialize(self, device_id, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def handle_two_way_device_rpc_request_v1(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_two_way_device_rpc_request_v1_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_two_way_device_rpc_request_v1_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_two_way_device_rpc_request_v1(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_two_way_device_rpc_request_v1_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_two_way_device_rpc_request_v1_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_two_way_device_rpc_request_v1_serialize(self, device_id, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... # --- RpcV2ControllerApi --- @@ -2482,13 +2508,13 @@ class ThingsboardClient: def get_persisted_rpc_by_device_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], rpc_status: Annotated[Optional[StrictStr], Field(description="Status of the RPC")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="Not implemented. Leave empty.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... def get_persisted_rpc_by_device_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], page_size: Annotated[StrictInt, Field(description="Maximum amount of entities in a one page")], page: Annotated[StrictInt, Field(description="Sequence number of page starting from 0")], rpc_status: Annotated[Optional[StrictStr], Field(description="Status of the RPC")] = ..., text_search: Annotated[Optional[StrictStr], Field(description="Not implemented. Leave empty.")] = ..., sort_property: Annotated[Optional[StrictStr], Field(description="Property of entity to sort by")] = ..., sort_order: Annotated[Optional[StrictStr], Field(description="Sort order. ASC (ASCENDING) or DESC (DESCENDING)")] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_persisted_rpc_by_device_serialize(self, device_id, page_size, page, rpc_status, text_search, sort_property, sort_order, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def handle_one_way_device_rpc_request_v2(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_one_way_device_rpc_request_v2_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_one_way_device_rpc_request_v2_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_one_way_device_rpc_request_v2(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_one_way_device_rpc_request_v2_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_one_way_device_rpc_request_v2_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_one_way_device_rpc_request_v2_serialize(self, device_id, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def handle_two_way_device_rpc_request_v2(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_two_way_device_rpc_request_v2_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_two_way_device_rpc_request_v2_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_two_way_device_rpc_request_v2(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_two_way_device_rpc_request_v2_with_http_info(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_two_way_device_rpc_request_v2_without_preload_content(self, device_id: Annotated[StrictStr, Field(description="A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the RPC request.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_two_way_device_rpc_request_v2_serialize(self, device_id, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... # --- RuleChainControllerApi --- @@ -2590,21 +2616,21 @@ class ThingsboardClient: # --- RuleEngineControllerApi --- @property def rule_engine_controller(self) -> RuleEngineControllerApi: ... - def handle_rule_engine_request_for_entity(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_rule_engine_request_for_entity_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_rule_engine_request_for_entity_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_rule_engine_request_for_entity(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_rule_engine_request_for_entity_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_rule_engine_request_for_entity_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_rule_engine_request_for_entity_serialize(self, entity_type, entity_id, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def handle_rule_engine_request_for_entity_with_queue_and_timeout(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_rule_engine_request_for_entity_with_queue_and_timeout_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_rule_engine_request_for_entity_with_queue_and_timeout_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_rule_engine_request_for_entity_with_queue_and_timeout(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_rule_engine_request_for_entity_with_queue_and_timeout_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_rule_engine_request_for_entity_with_queue_and_timeout_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], queue_name: Annotated[StrictStr, Field(description="Queue name to process the request in the rule engine")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_rule_engine_request_for_entity_with_queue_and_timeout_serialize(self, entity_type, entity_id, queue_name, timeout, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def handle_rule_engine_request_for_entity_with_timeout(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_rule_engine_request_for_entity_with_timeout_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_rule_engine_request_for_entity_with_timeout_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_rule_engine_request_for_entity_with_timeout(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_rule_engine_request_for_entity_with_timeout_with_http_info(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_rule_engine_request_for_entity_with_timeout_without_preload_content(self, entity_type: Annotated[StrictStr, Field(description="A string value representing the entity type. For example, 'DEVICE'")], entity_id: Annotated[StrictStr, Field(description="A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], timeout: Annotated[StrictInt, Field(description="Timeout to process the request in milliseconds")], body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_rule_engine_request_for_entity_with_timeout_serialize(self, entity_type, entity_id, timeout, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def handle_rule_engine_request_for_user(self, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... - def handle_rule_engine_request_for_user_with_http_info(self, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... - def handle_rule_engine_request_for_user_without_preload_content(self, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def handle_rule_engine_request_for_user(self, body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> str: ... + def handle_rule_engine_request_for_user_with_http_info(self, body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[str]: ... + def handle_rule_engine_request_for_user_without_preload_content(self, body: Annotated[StrictStr, Field(description="A JSON object representing the message.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _handle_rule_engine_request_for_user_serialize(self, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... # --- SchedulerEventControllerApi --- @@ -2831,6 +2857,22 @@ class ThingsboardClient: def uninstall_solution_template_without_preload_content(self, solution_template_id: Annotated[StrictStr, Field(description="A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _uninstall_solution_template_serialize(self, solution_template_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- SolutionExportImportControllerApi --- + @property + def solution_export_import_controller(self) -> SolutionExportImportControllerApi: ... + def export_solution(self, solution_export_request: Annotated[SolutionExportRequest, Field(description="Export request with entity IDs and optional settings.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> SolutionExportResponse: ... + def export_solution_with_http_info(self, solution_export_request: Annotated[SolutionExportRequest, Field(description="Export request with entity IDs and optional settings.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[SolutionExportResponse]: ... + def export_solution_without_preload_content(self, solution_export_request: Annotated[SolutionExportRequest, Field(description="Export request with entity IDs and optional settings.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _export_solution_serialize(self, solution_export_request, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def import_solution(self, solution_data: Annotated[SolutionData, Field(description="Solution data exported via the export endpoint.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> SolutionImportResult: ... + def import_solution_with_http_info(self, solution_data: Annotated[SolutionData, Field(description="Solution data exported via the export endpoint.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[SolutionImportResult]: ... + def import_solution_without_preload_content(self, solution_data: Annotated[SolutionData, Field(description="Solution data exported via the export endpoint.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _import_solution_serialize(self, solution_data, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def validate_solution(self, solution_data: Annotated[SolutionData, Field(description="Solution data to validate.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> SolutionValidationResult: ... + def validate_solution_with_http_info(self, solution_data: Annotated[SolutionData, Field(description="Solution data to validate.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[SolutionValidationResult]: ... + def validate_solution_without_preload_content(self, solution_data: Annotated[SolutionData, Field(description="Solution data to validate.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _validate_solution_serialize(self, solution_data, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- SubscriptionControllerApi --- @property def subscription_controller(self) -> SubscriptionControllerApi: ... @@ -3090,8 +3132,8 @@ class ThingsboardClient: def get_available_locales_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... def get_available_locales_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_available_locales_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... - def get_full_translation(self, locale_code: Annotated[StrictStr, Field(description="Locale code (e.g. 'en_US').")], if_none_match: Optional[StrictStr] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... - def get_full_translation_with_http_info(self, locale_code: Annotated[StrictStr, Field(description="Locale code (e.g. 'en_US').")], if_none_match: Optional[StrictStr] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def get_full_translation(self, locale_code: Annotated[StrictStr, Field(description="Locale code (e.g. 'en_US').")], if_none_match: Optional[StrictStr] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def get_full_translation_with_http_info(self, locale_code: Annotated[StrictStr, Field(description="Locale code (e.g. 'en_US').")], if_none_match: Optional[StrictStr] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... def get_full_translation_without_preload_content(self, locale_code: Annotated[StrictStr, Field(description="Locale code (e.g. 'en_US').")], if_none_match: Optional[StrictStr] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _get_full_translation_serialize(self, locale_code, if_none_match, accept_encoding, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... def get_login_page_translation(self, locale_code: Annotated[StrictStr, Field(description="Locale code (e.g. 'en_US').")], if_none_match: Optional[StrictStr] = ..., accept_encoding: Optional[StrictStr] = ..., _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... diff --git a/paas/tb_paas_client/models/__init__.py b/paas/tb_paas_client/models/__init__.py index fb8babf4..598a45b0 100644 --- a/paas/tb_paas_client/models/__init__.py +++ b/paas/tb_paas_client/models/__init__.py @@ -36,7 +36,7 @@ "Aggregation", "AggregationConfiguration", "AggregationParams", - "AiChatModelConfigObject", + "AiChatModelConfig", "AiModel", "AiModelConfig", "AiModelExportData", @@ -57,10 +57,7 @@ "AlarmCondition", "AlarmConditionExpression", "AlarmConditionFilter", - "AlarmConditionFilterKey", - "AlarmConditionKeyType", - "AlarmConditionSpec", - "AlarmConditionValueAlarmRuleSchedule", + "AlarmConditionValueAlarmSchedule", "AlarmConditionValueBoolean", "AlarmConditionValueDouble", "AlarmConditionValueInteger", @@ -75,25 +72,18 @@ "AlarmInfo", "AlarmNotificationRuleTriggerConfig", "AlarmRule", - "AlarmRuleAnyTimeSchedule", "AlarmRuleBooleanFilterPredicate", + "AlarmRuleBooleanOperation", "AlarmRuleComplexFilterPredicate", - "AlarmRuleCondition", - "AlarmRuleConditionFilter", - "AlarmRuleCustomTimeSchedule", - "AlarmRuleCustomTimeScheduleItem", + "AlarmRuleComplexOperation", "AlarmRuleDefinition", - "AlarmRuleDurationCondition", + "AlarmRuleDefinitionInfo", "AlarmRuleKeyFilterPredicate", - "AlarmRuleNoDataFilterPredicate", "AlarmRuleNumericFilterPredicate", - "AlarmRuleRepeatingCondition", - "AlarmRuleSchedule", - "AlarmRuleSimpleCondition", - "AlarmRuleSpecificTimeSchedule", + "AlarmRuleNumericOperation", "AlarmRuleStringFilterPredicate", + "AlarmRuleStringOperation", "AlarmSchedule", - "AlarmScheduleType", "AlarmSearchStatus", "AlarmSeverity", "AlarmStatus", @@ -204,6 +194,8 @@ "ClaimRequest", "ClearRule", "ClientAttributesQueryingSnmpCommunicationConfig", + "CloudDomainId", + "CloudDomainInfo", "CoapDeviceProfileTransportConfiguration", "CoapDeviceTransportConfiguration", "CoapDeviceTypeConfiguration", @@ -293,7 +285,6 @@ "DeviceId", "DeviceInfo", "DeviceProfile", - "DeviceProfileAlarm", "DeviceProfileConfiguration", "DeviceProfileData", "DeviceProfileExportData", @@ -320,11 +311,9 @@ "DummyJobResult", "DummyTaskFailure", "DummyTaskResult", - "DurationAlarmConditionSpec", + "DurationAlarmCondition", "DynamicValueBoolean", "DynamicValueDouble", - "DynamicValueInteger", - "DynamicValueLong", "DynamicValueSourceType", "DynamicValueString", "Edge", @@ -370,13 +359,13 @@ "EntityDataQuery", "EntityDataSortOrder", "EntityExportData", + "EntityExportSettings", "EntityFilter", "EntityGroup", "EntityGroupExportData", "EntityGroupFilter", "EntityGroupId", "EntityGroupInfo", - "EntityGroupInfoOwnerIdsInner", "EntityGroupListFilter", "EntityGroupNameFilter", "EntityId", @@ -424,8 +413,6 @@ "Filter", "FilterPredicateValueBoolean", "FilterPredicateValueDouble", - "FilterPredicateValueInteger", - "FilterPredicateValueLong", "FilterPredicateValueString", "FixedTimeWindow", "Font", @@ -447,6 +434,7 @@ "Heading", "HeadingComponent", "History", + "HomeDashboard", "HomeDashboardInfo", "HomeDashboardParams", "HomeMenuItem", @@ -536,6 +524,7 @@ "NameConflictPolicy", "NewPlatformVersionNotificationRuleTriggerConfig", "NewPlatformVersionRecipientsConfig", + "NoDataFilterPredicate", "NoSecLwM2MBootstrapServerCredential", "NodeConnectionInfo", "Notification", @@ -603,6 +592,8 @@ "PageDataAlarmCommentInfo", "PageDataAlarmData", "PageDataAlarmInfo", + "PageDataAlarmRuleDefinition", + "PageDataAlarmRuleDefinitionInfo", "PageDataApiKeyInfo", "PageDataAsset", "PageDataAssetInfo", @@ -709,7 +700,7 @@ "RelationTypeGroup", "RelationsQueryFilter", "RelationsSearchParameters", - "RepeatingAlarmConditionSpec", + "RepeatingAlarmCondition", "Report", "ReportBarChartSettings", "ReportBarChartWithLabelsSettings", @@ -760,7 +751,6 @@ "RuleChainId", "RuleChainImportResult", "RuleChainMetaData", - "RuleChainNote", "RuleChainOutputLabelsUsage", "RuleChainType", "RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig", @@ -795,8 +785,8 @@ "SignUpRequest", "SignUpResult", "SignUpSelfRegistrationParams", + "SimpleAlarmCondition", "SimpleAlarmConditionExpression", - "SimpleAlarmConditionSpec", "SimpleCalculatedFieldConfiguration", "SimpleEntity", "SingleEntityFilter", @@ -819,9 +809,14 @@ "SnmpDeviceTransportConfiguration", "SnmpMapping", "SnmpProtocolVersion", + "SolutionData", + "SolutionExportRequest", + "SolutionExportResponse", + "SolutionImportResult", "SolutionInstallResponse", "SolutionStep", "SolutionTemplateLevel", + "SolutionValidationResult", "SpecificTimeSchedule", "SplitViewComponent", "StarredDashboardInfo", @@ -847,6 +842,7 @@ "SystemAdministratorsFilter", "SystemInfo", "SystemInfoData", + "TableSortDirection", "TableSortOrder", "TaskProcessingFailureNotificationRuleTriggerConfig", "TaskProcessingFailureRecipientsConfig", @@ -1009,7 +1005,7 @@ from tb_paas_client.models.aggregation import Aggregation from tb_paas_client.models.aggregation_configuration import AggregationConfiguration from tb_paas_client.models.aggregation_params import AggregationParams - from tb_paas_client.models.ai_chat_model_config_object import AiChatModelConfigObject + from tb_paas_client.models.ai_chat_model_config import AiChatModelConfig from tb_paas_client.models.ai_model import AiModel from tb_paas_client.models.ai_model_config import AiModelConfig from tb_paas_client.models.ai_model_export_data import AiModelExportData @@ -1030,10 +1026,7 @@ from tb_paas_client.models.alarm_condition import AlarmCondition from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression from tb_paas_client.models.alarm_condition_filter import AlarmConditionFilter - from tb_paas_client.models.alarm_condition_filter_key import AlarmConditionFilterKey - from tb_paas_client.models.alarm_condition_key_type import AlarmConditionKeyType - from tb_paas_client.models.alarm_condition_spec import AlarmConditionSpec - from tb_paas_client.models.alarm_condition_value_alarm_rule_schedule import AlarmConditionValueAlarmRuleSchedule + from tb_paas_client.models.alarm_condition_value_alarm_schedule import AlarmConditionValueAlarmSchedule from tb_paas_client.models.alarm_condition_value_boolean import AlarmConditionValueBoolean from tb_paas_client.models.alarm_condition_value_double import AlarmConditionValueDouble from tb_paas_client.models.alarm_condition_value_integer import AlarmConditionValueInteger @@ -1048,25 +1041,18 @@ from tb_paas_client.models.alarm_info import AlarmInfo from tb_paas_client.models.alarm_notification_rule_trigger_config import AlarmNotificationRuleTriggerConfig from tb_paas_client.models.alarm_rule import AlarmRule - from tb_paas_client.models.alarm_rule_any_time_schedule import AlarmRuleAnyTimeSchedule from tb_paas_client.models.alarm_rule_boolean_filter_predicate import AlarmRuleBooleanFilterPredicate + from tb_paas_client.models.alarm_rule_boolean_operation import AlarmRuleBooleanOperation from tb_paas_client.models.alarm_rule_complex_filter_predicate import AlarmRuleComplexFilterPredicate - from tb_paas_client.models.alarm_rule_condition import AlarmRuleCondition - from tb_paas_client.models.alarm_rule_condition_filter import AlarmRuleConditionFilter - from tb_paas_client.models.alarm_rule_custom_time_schedule import AlarmRuleCustomTimeSchedule - from tb_paas_client.models.alarm_rule_custom_time_schedule_item import AlarmRuleCustomTimeScheduleItem + from tb_paas_client.models.alarm_rule_complex_operation import AlarmRuleComplexOperation from tb_paas_client.models.alarm_rule_definition import AlarmRuleDefinition - from tb_paas_client.models.alarm_rule_duration_condition import AlarmRuleDurationCondition + from tb_paas_client.models.alarm_rule_definition_info import AlarmRuleDefinitionInfo from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate - from tb_paas_client.models.alarm_rule_no_data_filter_predicate import AlarmRuleNoDataFilterPredicate from tb_paas_client.models.alarm_rule_numeric_filter_predicate import AlarmRuleNumericFilterPredicate - from tb_paas_client.models.alarm_rule_repeating_condition import AlarmRuleRepeatingCondition - from tb_paas_client.models.alarm_rule_schedule import AlarmRuleSchedule - from tb_paas_client.models.alarm_rule_simple_condition import AlarmRuleSimpleCondition - from tb_paas_client.models.alarm_rule_specific_time_schedule import AlarmRuleSpecificTimeSchedule + from tb_paas_client.models.alarm_rule_numeric_operation import AlarmRuleNumericOperation from tb_paas_client.models.alarm_rule_string_filter_predicate import AlarmRuleStringFilterPredicate + from tb_paas_client.models.alarm_rule_string_operation import AlarmRuleStringOperation from tb_paas_client.models.alarm_schedule import AlarmSchedule - from tb_paas_client.models.alarm_schedule_type import AlarmScheduleType from tb_paas_client.models.alarm_search_status import AlarmSearchStatus from tb_paas_client.models.alarm_severity import AlarmSeverity from tb_paas_client.models.alarm_status import AlarmStatus @@ -1177,6 +1163,8 @@ from tb_paas_client.models.claim_request import ClaimRequest from tb_paas_client.models.clear_rule import ClearRule from tb_paas_client.models.client_attributes_querying_snmp_communication_config import ClientAttributesQueryingSnmpCommunicationConfig + from tb_paas_client.models.cloud_domain_id import CloudDomainId + from tb_paas_client.models.cloud_domain_info import CloudDomainInfo from tb_paas_client.models.coap_device_profile_transport_configuration import CoapDeviceProfileTransportConfiguration from tb_paas_client.models.coap_device_transport_configuration import CoapDeviceTransportConfiguration from tb_paas_client.models.coap_device_type_configuration import CoapDeviceTypeConfiguration @@ -1266,7 +1254,6 @@ from tb_paas_client.models.device_id import DeviceId from tb_paas_client.models.device_info import DeviceInfo from tb_paas_client.models.device_profile import DeviceProfile - from tb_paas_client.models.device_profile_alarm import DeviceProfileAlarm from tb_paas_client.models.device_profile_configuration import DeviceProfileConfiguration from tb_paas_client.models.device_profile_data import DeviceProfileData from tb_paas_client.models.device_profile_export_data import DeviceProfileExportData @@ -1293,11 +1280,9 @@ from tb_paas_client.models.dummy_job_result import DummyJobResult from tb_paas_client.models.dummy_task_failure import DummyTaskFailure from tb_paas_client.models.dummy_task_result import DummyTaskResult - from tb_paas_client.models.duration_alarm_condition_spec import DurationAlarmConditionSpec + from tb_paas_client.models.duration_alarm_condition import DurationAlarmCondition from tb_paas_client.models.dynamic_value_boolean import DynamicValueBoolean from tb_paas_client.models.dynamic_value_double import DynamicValueDouble - from tb_paas_client.models.dynamic_value_integer import DynamicValueInteger - from tb_paas_client.models.dynamic_value_long import DynamicValueLong from tb_paas_client.models.dynamic_value_source_type import DynamicValueSourceType from tb_paas_client.models.dynamic_value_string import DynamicValueString from tb_paas_client.models.edge import Edge @@ -1343,13 +1328,13 @@ from tb_paas_client.models.entity_data_query import EntityDataQuery from tb_paas_client.models.entity_data_sort_order import EntityDataSortOrder from tb_paas_client.models.entity_export_data import EntityExportData + from tb_paas_client.models.entity_export_settings import EntityExportSettings from tb_paas_client.models.entity_filter import EntityFilter from tb_paas_client.models.entity_group import EntityGroup from tb_paas_client.models.entity_group_export_data import EntityGroupExportData from tb_paas_client.models.entity_group_filter import EntityGroupFilter from tb_paas_client.models.entity_group_id import EntityGroupId from tb_paas_client.models.entity_group_info import EntityGroupInfo - from tb_paas_client.models.entity_group_info_owner_ids_inner import EntityGroupInfoOwnerIdsInner from tb_paas_client.models.entity_group_list_filter import EntityGroupListFilter from tb_paas_client.models.entity_group_name_filter import EntityGroupNameFilter from tb_paas_client.models.entity_id import EntityId @@ -1397,8 +1382,6 @@ from tb_paas_client.models.filter import Filter from tb_paas_client.models.filter_predicate_value_boolean import FilterPredicateValueBoolean from tb_paas_client.models.filter_predicate_value_double import FilterPredicateValueDouble - from tb_paas_client.models.filter_predicate_value_integer import FilterPredicateValueInteger - from tb_paas_client.models.filter_predicate_value_long import FilterPredicateValueLong from tb_paas_client.models.filter_predicate_value_string import FilterPredicateValueString from tb_paas_client.models.fixed_time_window import FixedTimeWindow from tb_paas_client.models.font import Font @@ -1420,6 +1403,7 @@ from tb_paas_client.models.heading import Heading from tb_paas_client.models.heading_component import HeadingComponent from tb_paas_client.models.history import History + from tb_paas_client.models.home_dashboard import HomeDashboard from tb_paas_client.models.home_dashboard_info import HomeDashboardInfo from tb_paas_client.models.home_dashboard_params import HomeDashboardParams from tb_paas_client.models.home_menu_item import HomeMenuItem @@ -1509,6 +1493,7 @@ from tb_paas_client.models.name_conflict_policy import NameConflictPolicy from tb_paas_client.models.new_platform_version_notification_rule_trigger_config import NewPlatformVersionNotificationRuleTriggerConfig from tb_paas_client.models.new_platform_version_recipients_config import NewPlatformVersionRecipientsConfig + from tb_paas_client.models.no_data_filter_predicate import NoDataFilterPredicate from tb_paas_client.models.no_sec_lw_m2_m_bootstrap_server_credential import NoSecLwM2MBootstrapServerCredential from tb_paas_client.models.node_connection_info import NodeConnectionInfo from tb_paas_client.models.notification import Notification @@ -1576,6 +1561,8 @@ from tb_paas_client.models.page_data_alarm_comment_info import PageDataAlarmCommentInfo from tb_paas_client.models.page_data_alarm_data import PageDataAlarmData from tb_paas_client.models.page_data_alarm_info import PageDataAlarmInfo + from tb_paas_client.models.page_data_alarm_rule_definition import PageDataAlarmRuleDefinition + from tb_paas_client.models.page_data_alarm_rule_definition_info import PageDataAlarmRuleDefinitionInfo from tb_paas_client.models.page_data_api_key_info import PageDataApiKeyInfo from tb_paas_client.models.page_data_asset import PageDataAsset from tb_paas_client.models.page_data_asset_info import PageDataAssetInfo @@ -1682,7 +1669,7 @@ from tb_paas_client.models.relation_type_group import RelationTypeGroup from tb_paas_client.models.relations_query_filter import RelationsQueryFilter from tb_paas_client.models.relations_search_parameters import RelationsSearchParameters - from tb_paas_client.models.repeating_alarm_condition_spec import RepeatingAlarmConditionSpec + from tb_paas_client.models.repeating_alarm_condition import RepeatingAlarmCondition from tb_paas_client.models.report import Report from tb_paas_client.models.report_bar_chart_settings import ReportBarChartSettings from tb_paas_client.models.report_bar_chart_with_labels_settings import ReportBarChartWithLabelsSettings @@ -1733,7 +1720,6 @@ from tb_paas_client.models.rule_chain_id import RuleChainId from tb_paas_client.models.rule_chain_import_result import RuleChainImportResult from tb_paas_client.models.rule_chain_meta_data import RuleChainMetaData - from tb_paas_client.models.rule_chain_note import RuleChainNote from tb_paas_client.models.rule_chain_output_labels_usage import RuleChainOutputLabelsUsage from tb_paas_client.models.rule_chain_type import RuleChainType from tb_paas_client.models.rule_engine_component_lifecycle_event_notification_rule_trigger_config import RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig @@ -1768,8 +1754,8 @@ from tb_paas_client.models.sign_up_request import SignUpRequest from tb_paas_client.models.sign_up_result import SignUpResult from tb_paas_client.models.sign_up_self_registration_params import SignUpSelfRegistrationParams + from tb_paas_client.models.simple_alarm_condition import SimpleAlarmCondition from tb_paas_client.models.simple_alarm_condition_expression import SimpleAlarmConditionExpression - from tb_paas_client.models.simple_alarm_condition_spec import SimpleAlarmConditionSpec from tb_paas_client.models.simple_calculated_field_configuration import SimpleCalculatedFieldConfiguration from tb_paas_client.models.simple_entity import SimpleEntity from tb_paas_client.models.single_entity_filter import SingleEntityFilter @@ -1792,9 +1778,14 @@ from tb_paas_client.models.snmp_device_transport_configuration import SnmpDeviceTransportConfiguration from tb_paas_client.models.snmp_mapping import SnmpMapping from tb_paas_client.models.snmp_protocol_version import SnmpProtocolVersion + from tb_paas_client.models.solution_data import SolutionData + from tb_paas_client.models.solution_export_request import SolutionExportRequest + from tb_paas_client.models.solution_export_response import SolutionExportResponse + from tb_paas_client.models.solution_import_result import SolutionImportResult from tb_paas_client.models.solution_install_response import SolutionInstallResponse from tb_paas_client.models.solution_step import SolutionStep from tb_paas_client.models.solution_template_level import SolutionTemplateLevel + from tb_paas_client.models.solution_validation_result import SolutionValidationResult from tb_paas_client.models.specific_time_schedule import SpecificTimeSchedule from tb_paas_client.models.split_view_component import SplitViewComponent from tb_paas_client.models.starred_dashboard_info import StarredDashboardInfo @@ -1820,6 +1811,7 @@ from tb_paas_client.models.system_administrators_filter import SystemAdministratorsFilter from tb_paas_client.models.system_info import SystemInfo from tb_paas_client.models.system_info_data import SystemInfoData + from tb_paas_client.models.table_sort_direction import TableSortDirection from tb_paas_client.models.table_sort_order import TableSortOrder from tb_paas_client.models.task_processing_failure_notification_rule_trigger_config import TaskProcessingFailureNotificationRuleTriggerConfig from tb_paas_client.models.task_processing_failure_recipients_config import TaskProcessingFailureRecipientsConfig @@ -1981,7 +1973,7 @@ "Aggregation": "tb_paas_client.models.aggregation", "AggregationConfiguration": "tb_paas_client.models.aggregation_configuration", "AggregationParams": "tb_paas_client.models.aggregation_params", - "AiChatModelConfigObject": "tb_paas_client.models.ai_chat_model_config_object", + "AiChatModelConfig": "tb_paas_client.models.ai_chat_model_config", "AiModel": "tb_paas_client.models.ai_model", "AiModelConfig": "tb_paas_client.models.ai_model_config", "AiModelExportData": "tb_paas_client.models.ai_model_export_data", @@ -2002,10 +1994,7 @@ "AlarmCondition": "tb_paas_client.models.alarm_condition", "AlarmConditionExpression": "tb_paas_client.models.alarm_condition_expression", "AlarmConditionFilter": "tb_paas_client.models.alarm_condition_filter", - "AlarmConditionFilterKey": "tb_paas_client.models.alarm_condition_filter_key", - "AlarmConditionKeyType": "tb_paas_client.models.alarm_condition_key_type", - "AlarmConditionSpec": "tb_paas_client.models.alarm_condition_spec", - "AlarmConditionValueAlarmRuleSchedule": "tb_paas_client.models.alarm_condition_value_alarm_rule_schedule", + "AlarmConditionValueAlarmSchedule": "tb_paas_client.models.alarm_condition_value_alarm_schedule", "AlarmConditionValueBoolean": "tb_paas_client.models.alarm_condition_value_boolean", "AlarmConditionValueDouble": "tb_paas_client.models.alarm_condition_value_double", "AlarmConditionValueInteger": "tb_paas_client.models.alarm_condition_value_integer", @@ -2020,25 +2009,18 @@ "AlarmInfo": "tb_paas_client.models.alarm_info", "AlarmNotificationRuleTriggerConfig": "tb_paas_client.models.alarm_notification_rule_trigger_config", "AlarmRule": "tb_paas_client.models.alarm_rule", - "AlarmRuleAnyTimeSchedule": "tb_paas_client.models.alarm_rule_any_time_schedule", "AlarmRuleBooleanFilterPredicate": "tb_paas_client.models.alarm_rule_boolean_filter_predicate", + "AlarmRuleBooleanOperation": "tb_paas_client.models.alarm_rule_boolean_operation", "AlarmRuleComplexFilterPredicate": "tb_paas_client.models.alarm_rule_complex_filter_predicate", - "AlarmRuleCondition": "tb_paas_client.models.alarm_rule_condition", - "AlarmRuleConditionFilter": "tb_paas_client.models.alarm_rule_condition_filter", - "AlarmRuleCustomTimeSchedule": "tb_paas_client.models.alarm_rule_custom_time_schedule", - "AlarmRuleCustomTimeScheduleItem": "tb_paas_client.models.alarm_rule_custom_time_schedule_item", + "AlarmRuleComplexOperation": "tb_paas_client.models.alarm_rule_complex_operation", "AlarmRuleDefinition": "tb_paas_client.models.alarm_rule_definition", - "AlarmRuleDurationCondition": "tb_paas_client.models.alarm_rule_duration_condition", + "AlarmRuleDefinitionInfo": "tb_paas_client.models.alarm_rule_definition_info", "AlarmRuleKeyFilterPredicate": "tb_paas_client.models.alarm_rule_key_filter_predicate", - "AlarmRuleNoDataFilterPredicate": "tb_paas_client.models.alarm_rule_no_data_filter_predicate", "AlarmRuleNumericFilterPredicate": "tb_paas_client.models.alarm_rule_numeric_filter_predicate", - "AlarmRuleRepeatingCondition": "tb_paas_client.models.alarm_rule_repeating_condition", - "AlarmRuleSchedule": "tb_paas_client.models.alarm_rule_schedule", - "AlarmRuleSimpleCondition": "tb_paas_client.models.alarm_rule_simple_condition", - "AlarmRuleSpecificTimeSchedule": "tb_paas_client.models.alarm_rule_specific_time_schedule", + "AlarmRuleNumericOperation": "tb_paas_client.models.alarm_rule_numeric_operation", "AlarmRuleStringFilterPredicate": "tb_paas_client.models.alarm_rule_string_filter_predicate", + "AlarmRuleStringOperation": "tb_paas_client.models.alarm_rule_string_operation", "AlarmSchedule": "tb_paas_client.models.alarm_schedule", - "AlarmScheduleType": "tb_paas_client.models.alarm_schedule_type", "AlarmSearchStatus": "tb_paas_client.models.alarm_search_status", "AlarmSeverity": "tb_paas_client.models.alarm_severity", "AlarmStatus": "tb_paas_client.models.alarm_status", @@ -2149,6 +2131,8 @@ "ClaimRequest": "tb_paas_client.models.claim_request", "ClearRule": "tb_paas_client.models.clear_rule", "ClientAttributesQueryingSnmpCommunicationConfig": "tb_paas_client.models.client_attributes_querying_snmp_communication_config", + "CloudDomainId": "tb_paas_client.models.cloud_domain_id", + "CloudDomainInfo": "tb_paas_client.models.cloud_domain_info", "CoapDeviceProfileTransportConfiguration": "tb_paas_client.models.coap_device_profile_transport_configuration", "CoapDeviceTransportConfiguration": "tb_paas_client.models.coap_device_transport_configuration", "CoapDeviceTypeConfiguration": "tb_paas_client.models.coap_device_type_configuration", @@ -2238,7 +2222,6 @@ "DeviceId": "tb_paas_client.models.device_id", "DeviceInfo": "tb_paas_client.models.device_info", "DeviceProfile": "tb_paas_client.models.device_profile", - "DeviceProfileAlarm": "tb_paas_client.models.device_profile_alarm", "DeviceProfileConfiguration": "tb_paas_client.models.device_profile_configuration", "DeviceProfileData": "tb_paas_client.models.device_profile_data", "DeviceProfileExportData": "tb_paas_client.models.device_profile_export_data", @@ -2265,11 +2248,9 @@ "DummyJobResult": "tb_paas_client.models.dummy_job_result", "DummyTaskFailure": "tb_paas_client.models.dummy_task_failure", "DummyTaskResult": "tb_paas_client.models.dummy_task_result", - "DurationAlarmConditionSpec": "tb_paas_client.models.duration_alarm_condition_spec", + "DurationAlarmCondition": "tb_paas_client.models.duration_alarm_condition", "DynamicValueBoolean": "tb_paas_client.models.dynamic_value_boolean", "DynamicValueDouble": "tb_paas_client.models.dynamic_value_double", - "DynamicValueInteger": "tb_paas_client.models.dynamic_value_integer", - "DynamicValueLong": "tb_paas_client.models.dynamic_value_long", "DynamicValueSourceType": "tb_paas_client.models.dynamic_value_source_type", "DynamicValueString": "tb_paas_client.models.dynamic_value_string", "Edge": "tb_paas_client.models.edge", @@ -2315,13 +2296,13 @@ "EntityDataQuery": "tb_paas_client.models.entity_data_query", "EntityDataSortOrder": "tb_paas_client.models.entity_data_sort_order", "EntityExportData": "tb_paas_client.models.entity_export_data", + "EntityExportSettings": "tb_paas_client.models.entity_export_settings", "EntityFilter": "tb_paas_client.models.entity_filter", "EntityGroup": "tb_paas_client.models.entity_group", "EntityGroupExportData": "tb_paas_client.models.entity_group_export_data", "EntityGroupFilter": "tb_paas_client.models.entity_group_filter", "EntityGroupId": "tb_paas_client.models.entity_group_id", "EntityGroupInfo": "tb_paas_client.models.entity_group_info", - "EntityGroupInfoOwnerIdsInner": "tb_paas_client.models.entity_group_info_owner_ids_inner", "EntityGroupListFilter": "tb_paas_client.models.entity_group_list_filter", "EntityGroupNameFilter": "tb_paas_client.models.entity_group_name_filter", "EntityId": "tb_paas_client.models.entity_id", @@ -2369,8 +2350,6 @@ "Filter": "tb_paas_client.models.filter", "FilterPredicateValueBoolean": "tb_paas_client.models.filter_predicate_value_boolean", "FilterPredicateValueDouble": "tb_paas_client.models.filter_predicate_value_double", - "FilterPredicateValueInteger": "tb_paas_client.models.filter_predicate_value_integer", - "FilterPredicateValueLong": "tb_paas_client.models.filter_predicate_value_long", "FilterPredicateValueString": "tb_paas_client.models.filter_predicate_value_string", "FixedTimeWindow": "tb_paas_client.models.fixed_time_window", "Font": "tb_paas_client.models.font", @@ -2392,6 +2371,7 @@ "Heading": "tb_paas_client.models.heading", "HeadingComponent": "tb_paas_client.models.heading_component", "History": "tb_paas_client.models.history", + "HomeDashboard": "tb_paas_client.models.home_dashboard", "HomeDashboardInfo": "tb_paas_client.models.home_dashboard_info", "HomeDashboardParams": "tb_paas_client.models.home_dashboard_params", "HomeMenuItem": "tb_paas_client.models.home_menu_item", @@ -2481,6 +2461,7 @@ "NameConflictPolicy": "tb_paas_client.models.name_conflict_policy", "NewPlatformVersionNotificationRuleTriggerConfig": "tb_paas_client.models.new_platform_version_notification_rule_trigger_config", "NewPlatformVersionRecipientsConfig": "tb_paas_client.models.new_platform_version_recipients_config", + "NoDataFilterPredicate": "tb_paas_client.models.no_data_filter_predicate", "NoSecLwM2MBootstrapServerCredential": "tb_paas_client.models.no_sec_lw_m2_m_bootstrap_server_credential", "NodeConnectionInfo": "tb_paas_client.models.node_connection_info", "Notification": "tb_paas_client.models.notification", @@ -2548,6 +2529,8 @@ "PageDataAlarmCommentInfo": "tb_paas_client.models.page_data_alarm_comment_info", "PageDataAlarmData": "tb_paas_client.models.page_data_alarm_data", "PageDataAlarmInfo": "tb_paas_client.models.page_data_alarm_info", + "PageDataAlarmRuleDefinition": "tb_paas_client.models.page_data_alarm_rule_definition", + "PageDataAlarmRuleDefinitionInfo": "tb_paas_client.models.page_data_alarm_rule_definition_info", "PageDataApiKeyInfo": "tb_paas_client.models.page_data_api_key_info", "PageDataAsset": "tb_paas_client.models.page_data_asset", "PageDataAssetInfo": "tb_paas_client.models.page_data_asset_info", @@ -2654,7 +2637,7 @@ "RelationTypeGroup": "tb_paas_client.models.relation_type_group", "RelationsQueryFilter": "tb_paas_client.models.relations_query_filter", "RelationsSearchParameters": "tb_paas_client.models.relations_search_parameters", - "RepeatingAlarmConditionSpec": "tb_paas_client.models.repeating_alarm_condition_spec", + "RepeatingAlarmCondition": "tb_paas_client.models.repeating_alarm_condition", "Report": "tb_paas_client.models.report", "ReportBarChartSettings": "tb_paas_client.models.report_bar_chart_settings", "ReportBarChartWithLabelsSettings": "tb_paas_client.models.report_bar_chart_with_labels_settings", @@ -2705,7 +2688,6 @@ "RuleChainId": "tb_paas_client.models.rule_chain_id", "RuleChainImportResult": "tb_paas_client.models.rule_chain_import_result", "RuleChainMetaData": "tb_paas_client.models.rule_chain_meta_data", - "RuleChainNote": "tb_paas_client.models.rule_chain_note", "RuleChainOutputLabelsUsage": "tb_paas_client.models.rule_chain_output_labels_usage", "RuleChainType": "tb_paas_client.models.rule_chain_type", "RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig": "tb_paas_client.models.rule_engine_component_lifecycle_event_notification_rule_trigger_config", @@ -2740,8 +2722,8 @@ "SignUpRequest": "tb_paas_client.models.sign_up_request", "SignUpResult": "tb_paas_client.models.sign_up_result", "SignUpSelfRegistrationParams": "tb_paas_client.models.sign_up_self_registration_params", + "SimpleAlarmCondition": "tb_paas_client.models.simple_alarm_condition", "SimpleAlarmConditionExpression": "tb_paas_client.models.simple_alarm_condition_expression", - "SimpleAlarmConditionSpec": "tb_paas_client.models.simple_alarm_condition_spec", "SimpleCalculatedFieldConfiguration": "tb_paas_client.models.simple_calculated_field_configuration", "SimpleEntity": "tb_paas_client.models.simple_entity", "SingleEntityFilter": "tb_paas_client.models.single_entity_filter", @@ -2764,9 +2746,14 @@ "SnmpDeviceTransportConfiguration": "tb_paas_client.models.snmp_device_transport_configuration", "SnmpMapping": "tb_paas_client.models.snmp_mapping", "SnmpProtocolVersion": "tb_paas_client.models.snmp_protocol_version", + "SolutionData": "tb_paas_client.models.solution_data", + "SolutionExportRequest": "tb_paas_client.models.solution_export_request", + "SolutionExportResponse": "tb_paas_client.models.solution_export_response", + "SolutionImportResult": "tb_paas_client.models.solution_import_result", "SolutionInstallResponse": "tb_paas_client.models.solution_install_response", "SolutionStep": "tb_paas_client.models.solution_step", "SolutionTemplateLevel": "tb_paas_client.models.solution_template_level", + "SolutionValidationResult": "tb_paas_client.models.solution_validation_result", "SpecificTimeSchedule": "tb_paas_client.models.specific_time_schedule", "SplitViewComponent": "tb_paas_client.models.split_view_component", "StarredDashboardInfo": "tb_paas_client.models.starred_dashboard_info", @@ -2792,6 +2779,7 @@ "SystemAdministratorsFilter": "tb_paas_client.models.system_administrators_filter", "SystemInfo": "tb_paas_client.models.system_info", "SystemInfoData": "tb_paas_client.models.system_info_data", + "TableSortDirection": "tb_paas_client.models.table_sort_direction", "TableSortOrder": "tb_paas_client.models.table_sort_order", "TaskProcessingFailureNotificationRuleTriggerConfig": "tb_paas_client.models.task_processing_failure_notification_rule_trigger_config", "TaskProcessingFailureRecipientsConfig": "tb_paas_client.models.task_processing_failure_recipients_config", diff --git a/paas/tb_paas_client/models/ai_chat_model_config_object.py b/paas/tb_paas_client/models/ai_chat_model_config.py similarity index 90% rename from paas/tb_paas_client/models/ai_chat_model_config_object.py rename to paas/tb_paas_client/models/ai_chat_model_config.py index d56985dd..bde5493f 100644 --- a/paas/tb_paas_client/models/ai_chat_model_config_object.py +++ b/paas/tb_paas_client/models/ai_chat_model_config.py @@ -27,9 +27,9 @@ from typing import Optional, Set from typing_extensions import Self -class AiChatModelConfigObject(BaseModel): +class AiChatModelConfig(BaseModel): """ - AiChatModelConfigObject + AiChatModelConfig """ # noqa: E501 model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") __properties: ClassVar[List[str]] = ["modelType"] @@ -57,7 +57,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AiChatModelConfigObject from a JSON string""" + """Create an instance of AiChatModelConfig from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,10 +69,8 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ - "model_type", ]) _dict = self.model_dump( @@ -84,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AiChatModelConfigObject from a dict""" + """Create an instance of AiChatModelConfig from a dict""" if obj is None: return None diff --git a/paas/tb_paas_client/models/ai_model.py b/paas/tb_paas_client/models/ai_model.py index 51dd0707..4dc32e8b 100644 --- a/paas/tb_paas_client/models/ai_model.py +++ b/paas/tb_paas_client/models/ai_model.py @@ -36,8 +36,8 @@ class AiModel(BaseModel): """ # noqa: E501 id: Optional[AiModelId] = None created_time: Optional[StrictInt] = Field(default=None, description="Entity creation timestamp in milliseconds since Unix epoch", serialization_alias="createdTime") - tenant_id: TenantId = Field(description="JSON object representing the ID of the tenant associated with this AI model", serialization_alias="tenantId") - version: StrictInt = Field(description="Version of the AI model record; increments automatically whenever the record is changed") + tenant_id: Optional[TenantId] = Field(default=None, description="JSON object representing the ID of the tenant associated with this AI model", serialization_alias="tenantId") + version: Optional[StrictInt] = Field(default=1, description="Version of the AI model record; increments automatically whenever the record is changed") name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Display name for this AI model configuration; not the technical model identifier") configuration: Optional[AiModelConfig] = Field(default=None, description="Configuration of the AI model") __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "version", "name", "configuration"] diff --git a/paas/tb_paas_client/models/alarm_calculated_field_configuration.py b/paas/tb_paas_client/models/alarm_calculated_field_configuration.py index 4082bbd5..0ce2a615 100644 --- a/paas/tb_paas_client/models/alarm_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/alarm_calculated_field_configuration.py @@ -23,7 +23,7 @@ from pydantic import ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_rule_definition import AlarmRuleDefinition +from tb_paas_client.models.alarm_rule import AlarmRule from tb_paas_client.models.argument import Argument from tb_paas_client.models.calculated_field_configuration import CalculatedFieldConfiguration from tb_paas_client.models.output import Output @@ -35,14 +35,14 @@ class AlarmCalculatedFieldConfiguration(CalculatedFieldConfiguration): AlarmCalculatedFieldConfiguration """ # noqa: E501 arguments: Dict[str, Argument] - clear_rule: Optional[AlarmRuleDefinition] = Field(default=None, serialization_alias="clearRule") - create_rules: Dict[str, AlarmRuleDefinition] = Field(serialization_alias="createRules") + create_rules: Dict[str, AlarmRule] = Field(serialization_alias="createRules") + clear_rule: Optional[AlarmRule] = Field(default=None, serialization_alias="clearRule") propagate: Optional[StrictBool] = None - propagate_relation_types: Optional[List[StrictStr]] = Field(default=None, serialization_alias="propagateRelationTypes") propagate_to_owner: Optional[StrictBool] = Field(default=None, serialization_alias="propagateToOwner") propagate_to_owner_hierarchy: Optional[StrictBool] = Field(default=None, serialization_alias="propagateToOwnerHierarchy") propagate_to_tenant: Optional[StrictBool] = Field(default=None, serialization_alias="propagateToTenant") - __properties: ClassVar[List[str]] = ["type", "output", "arguments", "clearRule", "createRules", "propagate", "propagateRelationTypes", "propagateToOwner", "propagateToOwnerHierarchy", "propagateToTenant"] + propagate_relation_types: Optional[List[StrictStr]] = Field(default=None, serialization_alias="propagateRelationTypes") + __properties: ClassVar[List[str]] = ["output", "type", "arguments", "createRules", "clearRule", "propagate", "propagateToOwner", "propagateToOwnerHierarchy", "propagateToTenant", "propagateRelationTypes"] model_config = ConfigDict( populate_by_name=True, @@ -98,9 +98,6 @@ def to_dict(self) -> Dict[str, Any]: if self.arguments[_key_arguments]: _field_dict[_key_arguments] = self.arguments[_key_arguments].to_dict() _dict['arguments'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of clear_rule - if self.clear_rule: - _dict['clearRule'] = self.clear_rule.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in create_rules (dict) _field_dict = {} if self.create_rules: @@ -108,6 +105,9 @@ def to_dict(self) -> Dict[str, Any]: if self.create_rules[_key_create_rules]: _field_dict[_key_create_rules] = self.create_rules[_key_create_rules].to_dict() _dict['createRules'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of clear_rule + if self.clear_rule: + _dict['clearRule'] = self.clear_rule.to_dict() return _dict @classmethod @@ -120,26 +120,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, + "type": obj.get("type"), "arguments": dict( (_k, Argument.from_dict(_v)) for _k, _v in obj["arguments"].items() ) if obj.get("arguments") is not None else None, - "clear_rule": AlarmRuleDefinition.from_dict(obj["clearRule"]) if obj.get("clearRule") is not None else None, "create_rules": dict( - (_k, AlarmRuleDefinition.from_dict(_v)) + (_k, AlarmRule.from_dict(_v)) for _k, _v in obj["createRules"].items() ) if obj.get("createRules") is not None else None, + "clear_rule": AlarmRule.from_dict(obj["clearRule"]) if obj.get("clearRule") is not None else None, "propagate": obj.get("propagate"), - "propagate_relation_types": obj.get("propagateRelationTypes"), "propagate_to_owner": obj.get("propagateToOwner"), "propagate_to_owner_hierarchy": obj.get("propagateToOwnerHierarchy"), - "propagate_to_tenant": obj.get("propagateToTenant") + "propagate_to_tenant": obj.get("propagateToTenant"), + "propagate_relation_types": obj.get("propagateRelationTypes") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_condition.py b/paas/tb_paas_client/models/alarm_condition.py index 6321eeab..cf72718f 100644 --- a/paas/tb_paas_client/models/alarm_condition.py +++ b/paas/tb_paas_client/models/alarm_condition.py @@ -21,20 +21,28 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_condition_filter import AlarmConditionFilter -from tb_paas_client.models.alarm_condition_spec import AlarmConditionSpec +from importlib import import_module +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression +from tb_paas_client.models.alarm_condition_value_alarm_schedule import AlarmConditionValueAlarmSchedule from typing import Optional, Set from typing_extensions import Self +from typing import TYPE_CHECKING +if TYPE_CHECKING: + from tb_paas_client.models.duration_alarm_condition import DurationAlarmCondition + from tb_paas_client.models.repeating_alarm_condition import RepeatingAlarmCondition + from tb_paas_client.models.simple_alarm_condition import SimpleAlarmCondition + class AlarmCondition(BaseModel): """ AlarmCondition """ # noqa: E501 - condition: Optional[List[AlarmConditionFilter]] = None - spec: Optional[AlarmConditionSpec] = Field(default=None, description="JSON object representing alarm condition type") - __properties: ClassVar[List[str]] = ["condition", "spec"] + expression: AlarmConditionExpression + schedule: Optional[AlarmConditionValueAlarmSchedule] = None + type: StrictStr + __properties: ClassVar[List[str]] = ["expression", "schedule", "type"] model_config = ConfigDict( populate_by_name=True, @@ -43,6 +51,23 @@ class AlarmCondition(BaseModel): ) + # JSON field name that stores the object type + __discriminator_property_name: ClassVar[str] = 'type' + + # discriminator mappings + __discriminator_value_class_map: ClassVar[Dict[str, str]] = { + 'DURATION': 'DurationAlarmCondition','REPEATING': 'RepeatingAlarmCondition','SIMPLE': 'SimpleAlarmCondition' + } + + @classmethod + def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: + """Returns the discriminator value (object type) of the data""" + discriminator_value = obj[cls.__discriminator_property_name] + if discriminator_value: + return cls.__discriminator_value_class_map.get(discriminator_value) + else: + return None + def to_str(self) -> str: """Returns the string representation of the model""" return pprint.pformat(self.model_dump(by_alias=False, mode='json')) @@ -58,7 +83,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: + def from_json(cls, json_str: str) -> Optional[Union[DurationAlarmCondition, RepeatingAlarmCondition, SimpleAlarmCondition]]: """Create an instance of AlarmCondition from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,31 +105,28 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in condition (list) - _items = [] - if self.condition: - for _item_condition in self.condition: - if _item_condition: - _items.append(_item_condition.to_dict()) - _dict['condition'] = _items - # override the default output from pydantic by calling `to_dict()` of spec - if self.spec: - _dict['spec'] = self.spec.to_dict() + # override the default output from pydantic by calling `to_dict()` of expression + if self.expression: + _dict['expression'] = self.expression.to_dict() + # override the default output from pydantic by calling `to_dict()` of schedule + if self.schedule: + _dict['schedule'] = self.schedule.to_dict() return _dict @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[DurationAlarmCondition, RepeatingAlarmCondition, SimpleAlarmCondition]]: """Create an instance of AlarmCondition from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "condition": [AlarmConditionFilter.from_dict(_item) for _item in obj["condition"]] if obj.get("condition") is not None else None, - "spec": AlarmConditionSpec.from_dict(obj["spec"]) if obj.get("spec") is not None else None - }) - return _obj + # look up the object type based on discriminator mapping + object_type = cls.get_discriminator_value(obj) + if object_type == 'DurationAlarmCondition': + return import_module("tb_paas_client.models.duration_alarm_condition").DurationAlarmCondition.from_dict(obj) + if object_type == 'RepeatingAlarmCondition': + return import_module("tb_paas_client.models.repeating_alarm_condition").RepeatingAlarmCondition.from_dict(obj) + if object_type == 'SimpleAlarmCondition': + return import_module("tb_paas_client.models.simple_alarm_condition").SimpleAlarmCondition.from_dict(obj) + + raise ValueError("AlarmCondition failed to lookup discriminator value from " + + json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + + ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) diff --git a/paas/tb_paas_client/models/alarm_condition_filter.py b/paas/tb_paas_client/models/alarm_condition_filter.py index ae2f0241..142ffb32 100644 --- a/paas/tb_paas_client/models/alarm_condition_filter.py +++ b/paas/tb_paas_client/models/alarm_condition_filter.py @@ -23,9 +23,10 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_condition_filter_key import AlarmConditionFilterKey +from typing_extensions import Annotated +from tb_paas_client.models.alarm_rule_complex_operation import AlarmRuleComplexOperation +from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate from tb_paas_client.models.entity_key_value_type import EntityKeyValueType -from tb_paas_client.models.key_filter_predicate import KeyFilterPredicate from typing import Optional, Set from typing_extensions import Self @@ -33,11 +34,11 @@ class AlarmConditionFilter(BaseModel): """ AlarmConditionFilter """ # noqa: E501 - value_type: Optional[EntityKeyValueType] = Field(default=None, description="String representation of the type of the value", serialization_alias="valueType") - key: Optional[AlarmConditionFilterKey] = Field(default=None, description="JSON object for specifying alarm condition by specific key") - predicate: Optional[KeyFilterPredicate] = Field(default=None, description="JSON object representing filter condition") - value: Optional[Any] = None - __properties: ClassVar[List[str]] = ["valueType", "key", "predicate", "value"] + argument: Annotated[str, Field(min_length=1, strict=True)] + value_type: EntityKeyValueType = Field(serialization_alias="valueType") + operation: Optional[AlarmRuleComplexOperation] = None + predicates: Annotated[List[AlarmRuleKeyFilterPredicate], Field(min_length=1)] + __properties: ClassVar[List[str]] = ["argument", "valueType", "operation", "predicates"] model_config = ConfigDict( populate_by_name=True, @@ -83,17 +84,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of key - if self.key: - _dict['key'] = self.key.to_dict() - # override the default output from pydantic by calling `to_dict()` of predicate - if self.predicate: - _dict['predicate'] = self.predicate.to_dict() - # set to None if value (nullable) is None - # and model_fields_set contains the field - if self.value is None and "value" in self.model_fields_set: - _dict['value'] = None - + # override the default output from pydantic by calling `to_dict()` of each item in predicates (list) + _items = [] + if self.predicates: + for _item_predicates in self.predicates: + if _item_predicates: + _items.append(_item_predicates.to_dict()) + _dict['predicates'] = _items return _dict @classmethod @@ -106,10 +103,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "argument": obj.get("argument"), "value_type": obj.get("valueType"), - "key": AlarmConditionFilterKey.from_dict(obj["key"]) if obj.get("key") is not None else None, - "predicate": KeyFilterPredicate.from_dict(obj["predicate"]) if obj.get("predicate") is not None else None, - "value": obj.get("value") + "operation": obj.get("operation"), + "predicates": [AlarmRuleKeyFilterPredicate.from_dict(_item) for _item in obj["predicates"]] if obj.get("predicates") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/alarm_condition_spec.py b/paas/tb_paas_client/models/alarm_condition_spec.py deleted file mode 100644 index a5922a82..00000000 --- a/paas/tb_paas_client/models/alarm_condition_spec.py +++ /dev/null @@ -1,122 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from importlib import import_module -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from tb_paas_client.models.duration_alarm_condition_spec import DurationAlarmConditionSpec - from tb_paas_client.models.repeating_alarm_condition_spec import RepeatingAlarmConditionSpec - from tb_paas_client.models.simple_alarm_condition_spec import SimpleAlarmConditionSpec - -class AlarmConditionSpec(BaseModel): - """ - Specification for alarm conditions - """ # noqa: E501 - type: StrictStr - __properties: ClassVar[List[str]] = ["type"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' - - # discriminator mappings - __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'DURATION': 'DurationAlarmConditionSpec','REPEATING': 'RepeatingAlarmConditionSpec','SIMPLE': 'SimpleAlarmConditionSpec' - } - - @classmethod - def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: - """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] - if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) - else: - return None - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Union[DurationAlarmConditionSpec, RepeatingAlarmConditionSpec, SimpleAlarmConditionSpec]]: - """Create an instance of AlarmConditionSpec from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[DurationAlarmConditionSpec, RepeatingAlarmConditionSpec, SimpleAlarmConditionSpec]]: - """Create an instance of AlarmConditionSpec from a dict""" - # look up the object type based on discriminator mapping - object_type = cls.get_discriminator_value(obj) - if object_type == 'DurationAlarmConditionSpec': - return import_module("tb_paas_client.models.duration_alarm_condition_spec").DurationAlarmConditionSpec.from_dict(obj) - if object_type == 'RepeatingAlarmConditionSpec': - return import_module("tb_paas_client.models.repeating_alarm_condition_spec").RepeatingAlarmConditionSpec.from_dict(obj) - if object_type == 'SimpleAlarmConditionSpec': - return import_module("tb_paas_client.models.simple_alarm_condition_spec").SimpleAlarmConditionSpec.from_dict(obj) - - raise ValueError("AlarmConditionSpec failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) - - diff --git a/paas/tb_paas_client/models/alarm_condition_value_alarm_rule_schedule.py b/paas/tb_paas_client/models/alarm_condition_value_alarm_schedule.py similarity index 81% rename from paas/tb_paas_client/models/alarm_condition_value_alarm_rule_schedule.py rename to paas/tb_paas_client/models/alarm_condition_value_alarm_schedule.py index 7f1b667c..fc837375 100644 --- a/paas/tb_paas_client/models/alarm_condition_value_alarm_rule_schedule.py +++ b/paas/tb_paas_client/models/alarm_condition_value_alarm_schedule.py @@ -23,17 +23,17 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_rule_schedule import AlarmRuleSchedule +from tb_paas_client.models.alarm_schedule import AlarmSchedule from typing import Optional, Set from typing_extensions import Self -class AlarmConditionValueAlarmRuleSchedule(BaseModel): +class AlarmConditionValueAlarmSchedule(BaseModel): """ - AlarmConditionValueAlarmRuleSchedule + AlarmConditionValueAlarmSchedule """ # noqa: E501 + static_value: Optional[AlarmSchedule] = Field(default=None, serialization_alias="staticValue") dynamic_value_argument: Optional[StrictStr] = Field(default=None, serialization_alias="dynamicValueArgument") - static_value: Optional[AlarmRuleSchedule] = Field(default=None, serialization_alias="staticValue") - __properties: ClassVar[List[str]] = ["dynamicValueArgument", "staticValue"] + __properties: ClassVar[List[str]] = ["staticValue", "dynamicValueArgument"] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmConditionValueAlarmRuleSchedule from a JSON string""" + """Create an instance of AlarmConditionValueAlarmSchedule from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmConditionValueAlarmRuleSchedule from a dict""" + """Create an instance of AlarmConditionValueAlarmSchedule from a dict""" if obj is None: return None @@ -94,8 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "dynamic_value_argument": obj.get("dynamicValueArgument"), - "static_value": AlarmRuleSchedule.from_dict(obj["staticValue"]) if obj.get("staticValue") is not None else None + "static_value": AlarmSchedule.from_dict(obj["staticValue"]) if obj.get("staticValue") is not None else None, + "dynamic_value_argument": obj.get("dynamicValueArgument") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule.py b/paas/tb_paas_client/models/alarm_rule.py index d373acf3..198cbe6a 100644 --- a/paas/tb_paas_client/models/alarm_rule.py +++ b/paas/tb_paas_client/models/alarm_rule.py @@ -24,7 +24,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.alarm_condition import AlarmCondition -from tb_paas_client.models.alarm_schedule import AlarmSchedule from tb_paas_client.models.dashboard_id import DashboardId from typing import Optional, Set from typing_extensions import Self @@ -33,11 +32,10 @@ class AlarmRule(BaseModel): """ AlarmRule """ # noqa: E501 - condition: Optional[AlarmCondition] = Field(default=None, description="JSON object representing the alarm rule condition") - alarm_details: Optional[StrictStr] = Field(default=None, description="String value representing the additional details for an alarm rule", serialization_alias="alarmDetails") - dashboard_id: Optional[DashboardId] = Field(default=None, description="JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application", serialization_alias="dashboardId") - schedule: Optional[AlarmSchedule] = Field(default=None, description="JSON object representing time interval during which the rule is active") - __properties: ClassVar[List[str]] = ["condition", "alarmDetails", "dashboardId", "schedule"] + condition: AlarmCondition + alarm_details: Optional[StrictStr] = Field(default=None, serialization_alias="alarmDetails") + dashboard_id: Optional[DashboardId] = Field(default=None, serialization_alias="dashboardId") + __properties: ClassVar[List[str]] = ["condition", "alarmDetails", "dashboardId"] model_config = ConfigDict( populate_by_name=True, @@ -89,9 +87,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of dashboard_id if self.dashboard_id: _dict['dashboardId'] = self.dashboard_id.to_dict() - # override the default output from pydantic by calling `to_dict()` of schedule - if self.schedule: - _dict['schedule'] = self.schedule.to_dict() return _dict @classmethod @@ -106,8 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "condition": AlarmCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, "alarm_details": obj.get("alarmDetails"), - "dashboard_id": DashboardId.from_dict(obj["dashboardId"]) if obj.get("dashboardId") is not None else None, - "schedule": AlarmSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None + "dashboard_id": DashboardId.from_dict(obj["dashboardId"]) if obj.get("dashboardId") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule_boolean_filter_predicate.py b/paas/tb_paas_client/models/alarm_rule_boolean_filter_predicate.py index 308d8917..49e29e56 100644 --- a/paas/tb_paas_client/models/alarm_rule_boolean_filter_predicate.py +++ b/paas/tb_paas_client/models/alarm_rule_boolean_filter_predicate.py @@ -24,8 +24,8 @@ from pydantic import ConfigDict from typing import Any, ClassVar, Dict, List from tb_paas_client.models.alarm_condition_value_boolean import AlarmConditionValueBoolean +from tb_paas_client.models.alarm_rule_boolean_operation import AlarmRuleBooleanOperation from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate -from tb_paas_client.models.boolean_operation import BooleanOperation from typing import Optional, Set from typing_extensions import Self @@ -33,7 +33,7 @@ class AlarmRuleBooleanFilterPredicate(AlarmRuleKeyFilterPredicate): """ AlarmRuleBooleanFilterPredicate """ # noqa: E501 - operation: BooleanOperation + operation: AlarmRuleBooleanOperation value: AlarmConditionValueBoolean __properties: ClassVar[List[str]] = ["type", "operation", "value"] diff --git a/paas/tb_paas_client/models/alarm_schedule_type.py b/paas/tb_paas_client/models/alarm_rule_boolean_operation.py similarity index 80% rename from paas/tb_paas_client/models/alarm_schedule_type.py rename to paas/tb_paas_client/models/alarm_rule_boolean_operation.py index a4baceea..c995ff00 100644 --- a/paas/tb_paas_client/models/alarm_schedule_type.py +++ b/paas/tb_paas_client/models/alarm_rule_boolean_operation.py @@ -22,21 +22,20 @@ from typing_extensions import Self -class AlarmScheduleType(str, Enum): +class AlarmRuleBooleanOperation(str, Enum): """ - AlarmScheduleType + AlarmRuleBooleanOperation """ """ allowed enum values """ - ANY_TIME = 'ANY_TIME' - SPECIFIC_TIME = 'SPECIFIC_TIME' - CUSTOM = 'CUSTOM' + EQUAL = 'EQUAL' + NOT_EQUAL = 'NOT_EQUAL' @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of AlarmScheduleType from a JSON string""" + """Create an instance of AlarmRuleBooleanOperation from a JSON string""" return cls(json.loads(json_str)) diff --git a/paas/tb_paas_client/models/alarm_rule_complex_filter_predicate.py b/paas/tb_paas_client/models/alarm_rule_complex_filter_predicate.py index d7e476dc..4c0de757 100644 --- a/paas/tb_paas_client/models/alarm_rule_complex_filter_predicate.py +++ b/paas/tb_paas_client/models/alarm_rule_complex_filter_predicate.py @@ -23,8 +23,8 @@ from pydantic import ConfigDict from typing import Any, ClassVar, Dict, List, Optional +from tb_paas_client.models.alarm_rule_complex_operation import AlarmRuleComplexOperation from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate -from tb_paas_client.models.complex_operation import ComplexOperation from typing import Optional, Set from typing_extensions import Self @@ -32,7 +32,7 @@ class AlarmRuleComplexFilterPredicate(AlarmRuleKeyFilterPredicate): """ AlarmRuleComplexFilterPredicate """ # noqa: E501 - operation: Optional[ComplexOperation] = None + operation: Optional[AlarmRuleComplexOperation] = None predicates: Optional[List[AlarmRuleKeyFilterPredicate]] = None __properties: ClassVar[List[str]] = ["type", "operation", "predicates"] diff --git a/paas/tb_paas_client/models/alarm_condition_key_type.py b/paas/tb_paas_client/models/alarm_rule_complex_operation.py similarity index 76% rename from paas/tb_paas_client/models/alarm_condition_key_type.py rename to paas/tb_paas_client/models/alarm_rule_complex_operation.py index 78db2814..4018f53d 100644 --- a/paas/tb_paas_client/models/alarm_condition_key_type.py +++ b/paas/tb_paas_client/models/alarm_rule_complex_operation.py @@ -22,22 +22,20 @@ from typing_extensions import Self -class AlarmConditionKeyType(str, Enum): +class AlarmRuleComplexOperation(str, Enum): """ - AlarmConditionKeyType + AlarmRuleComplexOperation """ """ allowed enum values """ - ATTRIBUTE = 'ATTRIBUTE' - TIME_SERIES = 'TIME_SERIES' - ENTITY_FIELD = 'ENTITY_FIELD' - CONSTANT = 'CONSTANT' + AND = 'AND' + OR = 'OR' @classmethod def from_json(cls, json_str: str) -> Self: - """Create an instance of AlarmConditionKeyType from a JSON string""" + """Create an instance of AlarmRuleComplexOperation from a JSON string""" return cls(json.loads(json_str)) diff --git a/paas/tb_paas_client/models/alarm_rule_condition.py b/paas/tb_paas_client/models/alarm_rule_condition.py deleted file mode 100644 index 12cb74ca..00000000 --- a/paas/tb_paas_client/models/alarm_rule_condition.py +++ /dev/null @@ -1,132 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from importlib import import_module -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression -from tb_paas_client.models.alarm_condition_value_alarm_rule_schedule import AlarmConditionValueAlarmRuleSchedule -from typing import Optional, Set -from typing_extensions import Self - -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from tb_paas_client.models.alarm_rule_duration_condition import AlarmRuleDurationCondition - from tb_paas_client.models.alarm_rule_repeating_condition import AlarmRuleRepeatingCondition - from tb_paas_client.models.alarm_rule_simple_condition import AlarmRuleSimpleCondition - -class AlarmRuleCondition(BaseModel): - """ - AlarmRuleCondition - """ # noqa: E501 - expression: AlarmConditionExpression - schedule: Optional[AlarmConditionValueAlarmRuleSchedule] = None - type: StrictStr - __properties: ClassVar[List[str]] = ["expression", "schedule", "type"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' - - # discriminator mappings - __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'DURATION': 'AlarmRuleDurationCondition','REPEATING': 'AlarmRuleRepeatingCondition','SIMPLE': 'AlarmRuleSimpleCondition' - } - - @classmethod - def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: - """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] - if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) - else: - return None - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Union[AlarmRuleDurationCondition, AlarmRuleRepeatingCondition, AlarmRuleSimpleCondition]]: - """Create an instance of AlarmRuleCondition from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of expression - if self.expression: - _dict['expression'] = self.expression.to_dict() - # override the default output from pydantic by calling `to_dict()` of schedule - if self.schedule: - _dict['schedule'] = self.schedule.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[AlarmRuleDurationCondition, AlarmRuleRepeatingCondition, AlarmRuleSimpleCondition]]: - """Create an instance of AlarmRuleCondition from a dict""" - # look up the object type based on discriminator mapping - object_type = cls.get_discriminator_value(obj) - if object_type == 'AlarmRuleDurationCondition': - return import_module("tb_paas_client.models.alarm_rule_duration_condition").AlarmRuleDurationCondition.from_dict(obj) - if object_type == 'AlarmRuleRepeatingCondition': - return import_module("tb_paas_client.models.alarm_rule_repeating_condition").AlarmRuleRepeatingCondition.from_dict(obj) - if object_type == 'AlarmRuleSimpleCondition': - return import_module("tb_paas_client.models.alarm_rule_simple_condition").AlarmRuleSimpleCondition.from_dict(obj) - - raise ValueError("AlarmRuleCondition failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) - - diff --git a/paas/tb_paas_client/models/alarm_rule_definition.py b/paas/tb_paas_client/models/alarm_rule_definition.py index ad241c29..2c2f5998 100644 --- a/paas/tb_paas_client/models/alarm_rule_definition.py +++ b/paas/tb_paas_client/models/alarm_rule_definition.py @@ -21,10 +21,13 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_rule_condition import AlarmRuleCondition -from tb_paas_client.models.dashboard_id import DashboardId +from tb_paas_client.models.alarm_calculated_field_configuration import AlarmCalculatedFieldConfiguration +from tb_paas_client.models.calculated_field_id import CalculatedFieldId +from tb_paas_client.models.debug_settings import DebugSettings +from tb_paas_client.models.entity_id import EntityId +from tb_paas_client.models.tenant_id import TenantId from typing import Optional, Set from typing_extensions import Self @@ -32,10 +35,18 @@ class AlarmRuleDefinition(BaseModel): """ AlarmRuleDefinition """ # noqa: E501 - alarm_details: Optional[StrictStr] = Field(default=None, serialization_alias="alarmDetails") - condition: AlarmRuleCondition - dashboard_id: Optional[DashboardId] = Field(default=None, serialization_alias="dashboardId") - __properties: ClassVar[List[str]] = ["alarmDetails", "condition", "dashboardId"] + id: Optional[CalculatedFieldId] = Field(default=None, description="JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error.") + created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the alarm rule creation, in milliseconds", serialization_alias="createdTime") + tenant_id: Optional[TenantId] = Field(default=None, serialization_alias="tenantId") + entity_id: Optional[EntityId] = Field(default=None, serialization_alias="entityId") + name: Optional[StrictStr] = Field(default=None, description="User defined name of the alarm rule.") + debug_settings: Optional[DebugSettings] = Field(default=None, description="Debug settings object.", serialization_alias="debugSettings") + configuration_version: Optional[StrictInt] = Field(default=None, description="Version of alarm rule configuration.", serialization_alias="configurationVersion") + configuration: AlarmCalculatedFieldConfiguration + version: Optional[StrictInt] = None + additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the alarm rule. May include: 'description' (string).", serialization_alias="additionalInfo") + debug_mode: Optional[StrictBool] = Field(default=None, serialization_alias="debugMode") + __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "entityId", "name", "debugSettings", "configurationVersion", "configuration", "version", "additionalInfo", "debugMode"] model_config = ConfigDict( populate_by_name=True, @@ -72,8 +83,10 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ + "created_time", ]) _dict = self.model_dump( @@ -81,12 +94,26 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of condition - if self.condition: - _dict['condition'] = self.condition.to_dict() - # override the default output from pydantic by calling `to_dict()` of dashboard_id - if self.dashboard_id: - _dict['dashboardId'] = self.dashboard_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of id + if self.id: + _dict['id'] = self.id.to_dict() + # override the default output from pydantic by calling `to_dict()` of tenant_id + if self.tenant_id: + _dict['tenantId'] = self.tenant_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of entity_id + if self.entity_id: + _dict['entityId'] = self.entity_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of debug_settings + if self.debug_settings: + _dict['debugSettings'] = self.debug_settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of configuration + if self.configuration: + _dict['configuration'] = self.configuration.to_dict() + # set to None if additional_info (nullable) is None + # and model_fields_set contains the field + if self.additional_info is None and "additional_info" in self.model_fields_set: + _dict['additionalInfo'] = None + return _dict @classmethod @@ -99,9 +126,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "alarm_details": obj.get("alarmDetails"), - "condition": AlarmRuleCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, - "dashboard_id": DashboardId.from_dict(obj["dashboardId"]) if obj.get("dashboardId") is not None else None + "id": CalculatedFieldId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "created_time": obj.get("createdTime"), + "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None, + "entity_id": EntityId.from_dict(obj["entityId"]) if obj.get("entityId") is not None else None, + "name": obj.get("name"), + "debug_settings": DebugSettings.from_dict(obj["debugSettings"]) if obj.get("debugSettings") is not None else None, + "configuration_version": obj.get("configurationVersion"), + "configuration": AlarmCalculatedFieldConfiguration.from_dict(obj["configuration"]) if obj.get("configuration") is not None else None, + "version": obj.get("version"), + "additional_info": obj.get("additionalInfo"), + "debug_mode": obj.get("debugMode") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule_definition_info.py b/paas/tb_paas_client/models/alarm_rule_definition_info.py new file mode 100644 index 00000000..e19bdde8 --- /dev/null +++ b/paas/tb_paas_client/models/alarm_rule_definition_info.py @@ -0,0 +1,145 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tb_paas_client.models.alarm_calculated_field_configuration import AlarmCalculatedFieldConfiguration +from tb_paas_client.models.calculated_field_id import CalculatedFieldId +from tb_paas_client.models.debug_settings import DebugSettings +from tb_paas_client.models.entity_id import EntityId +from tb_paas_client.models.tenant_id import TenantId +from typing import Optional, Set +from typing_extensions import Self + +class AlarmRuleDefinitionInfo(BaseModel): + """ + AlarmRuleDefinitionInfo + """ # noqa: E501 + id: Optional[CalculatedFieldId] = Field(default=None, description="JSON object with the Alarm Rule Id. Referencing non-existing Alarm Rule Id will cause error.") + created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the alarm rule creation, in milliseconds", serialization_alias="createdTime") + tenant_id: Optional[TenantId] = Field(default=None, serialization_alias="tenantId") + entity_id: Optional[EntityId] = Field(default=None, serialization_alias="entityId") + name: Optional[StrictStr] = Field(default=None, description="User defined name of the alarm rule.") + debug_settings: Optional[DebugSettings] = Field(default=None, description="Debug settings object.", serialization_alias="debugSettings") + configuration_version: Optional[StrictInt] = Field(default=None, description="Version of alarm rule configuration.", serialization_alias="configurationVersion") + configuration: AlarmCalculatedFieldConfiguration + version: Optional[StrictInt] = None + additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the alarm rule. May include: 'description' (string).", serialization_alias="additionalInfo") + entity_name: Optional[StrictStr] = Field(default=None, serialization_alias="entityName") + debug_mode: Optional[StrictBool] = Field(default=None, serialization_alias="debugMode") + __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "entityId", "name", "debugSettings", "configurationVersion", "configuration", "version", "additionalInfo", "entityName", "debugMode"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.model_dump(by_alias=False, mode='json')) + + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AlarmRuleDefinitionInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_time", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of id + if self.id: + _dict['id'] = self.id.to_dict() + # override the default output from pydantic by calling `to_dict()` of tenant_id + if self.tenant_id: + _dict['tenantId'] = self.tenant_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of entity_id + if self.entity_id: + _dict['entityId'] = self.entity_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of debug_settings + if self.debug_settings: + _dict['debugSettings'] = self.debug_settings.to_dict() + # override the default output from pydantic by calling `to_dict()` of configuration + if self.configuration: + _dict['configuration'] = self.configuration.to_dict() + # set to None if additional_info (nullable) is None + # and model_fields_set contains the field + if self.additional_info is None and "additional_info" in self.model_fields_set: + _dict['additionalInfo'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AlarmRuleDefinitionInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": CalculatedFieldId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "created_time": obj.get("createdTime"), + "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None, + "entity_id": EntityId.from_dict(obj["entityId"]) if obj.get("entityId") is not None else None, + "name": obj.get("name"), + "debug_settings": DebugSettings.from_dict(obj["debugSettings"]) if obj.get("debugSettings") is not None else None, + "configuration_version": obj.get("configurationVersion"), + "configuration": AlarmCalculatedFieldConfiguration.from_dict(obj["configuration"]) if obj.get("configuration") is not None else None, + "version": obj.get("version"), + "additional_info": obj.get("additionalInfo"), + "entity_name": obj.get("entityName"), + "debug_mode": obj.get("debugMode") + }) + return _obj + + diff --git a/paas/tb_paas_client/models/alarm_rule_key_filter_predicate.py b/paas/tb_paas_client/models/alarm_rule_key_filter_predicate.py index 5b4554ca..c1459007 100644 --- a/paas/tb_paas_client/models/alarm_rule_key_filter_predicate.py +++ b/paas/tb_paas_client/models/alarm_rule_key_filter_predicate.py @@ -31,7 +31,7 @@ if TYPE_CHECKING: from tb_paas_client.models.alarm_rule_boolean_filter_predicate import AlarmRuleBooleanFilterPredicate from tb_paas_client.models.alarm_rule_complex_filter_predicate import AlarmRuleComplexFilterPredicate - from tb_paas_client.models.alarm_rule_no_data_filter_predicate import AlarmRuleNoDataFilterPredicate + from tb_paas_client.models.no_data_filter_predicate import NoDataFilterPredicate from tb_paas_client.models.alarm_rule_numeric_filter_predicate import AlarmRuleNumericFilterPredicate from tb_paas_client.models.alarm_rule_string_filter_predicate import AlarmRuleStringFilterPredicate @@ -54,7 +54,7 @@ class AlarmRuleKeyFilterPredicate(BaseModel): # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'BOOLEAN': 'AlarmRuleBooleanFilterPredicate','COMPLEX': 'AlarmRuleComplexFilterPredicate','NO_DATA': 'AlarmRuleNoDataFilterPredicate','NUMERIC': 'AlarmRuleNumericFilterPredicate','STRING': 'AlarmRuleStringFilterPredicate' + 'BOOLEAN': 'AlarmRuleBooleanFilterPredicate','COMPLEX': 'AlarmRuleComplexFilterPredicate','NO_DATA': 'NoDataFilterPredicate','NUMERIC': 'AlarmRuleNumericFilterPredicate','STRING': 'AlarmRuleStringFilterPredicate' } @classmethod @@ -81,7 +81,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Optional[Union[AlarmRuleBooleanFilterPredicate, AlarmRuleComplexFilterPredicate, AlarmRuleNoDataFilterPredicate, AlarmRuleNumericFilterPredicate, AlarmRuleStringFilterPredicate]]: + def from_json(cls, json_str: str) -> Optional[Union[AlarmRuleBooleanFilterPredicate, AlarmRuleComplexFilterPredicate, NoDataFilterPredicate, AlarmRuleNumericFilterPredicate, AlarmRuleStringFilterPredicate]]: """Create an instance of AlarmRuleKeyFilterPredicate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -106,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[AlarmRuleBooleanFilterPredicate, AlarmRuleComplexFilterPredicate, AlarmRuleNoDataFilterPredicate, AlarmRuleNumericFilterPredicate, AlarmRuleStringFilterPredicate]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[AlarmRuleBooleanFilterPredicate, AlarmRuleComplexFilterPredicate, NoDataFilterPredicate, AlarmRuleNumericFilterPredicate, AlarmRuleStringFilterPredicate]]: """Create an instance of AlarmRuleKeyFilterPredicate from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) @@ -114,8 +114,8 @@ def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[AlarmRuleBooleanFilter return import_module("tb_paas_client.models.alarm_rule_boolean_filter_predicate").AlarmRuleBooleanFilterPredicate.from_dict(obj) if object_type == 'AlarmRuleComplexFilterPredicate': return import_module("tb_paas_client.models.alarm_rule_complex_filter_predicate").AlarmRuleComplexFilterPredicate.from_dict(obj) - if object_type == 'AlarmRuleNoDataFilterPredicate': - return import_module("tb_paas_client.models.alarm_rule_no_data_filter_predicate").AlarmRuleNoDataFilterPredicate.from_dict(obj) + if object_type == 'NoDataFilterPredicate': + return import_module("tb_paas_client.models.no_data_filter_predicate").NoDataFilterPredicate.from_dict(obj) if object_type == 'AlarmRuleNumericFilterPredicate': return import_module("tb_paas_client.models.alarm_rule_numeric_filter_predicate").AlarmRuleNumericFilterPredicate.from_dict(obj) if object_type == 'AlarmRuleStringFilterPredicate': diff --git a/paas/tb_paas_client/models/alarm_rule_numeric_filter_predicate.py b/paas/tb_paas_client/models/alarm_rule_numeric_filter_predicate.py index 7ad82a8c..d91683ea 100644 --- a/paas/tb_paas_client/models/alarm_rule_numeric_filter_predicate.py +++ b/paas/tb_paas_client/models/alarm_rule_numeric_filter_predicate.py @@ -25,7 +25,7 @@ from typing import Any, ClassVar, Dict, List from tb_paas_client.models.alarm_condition_value_double import AlarmConditionValueDouble from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate -from tb_paas_client.models.numeric_operation import NumericOperation +from tb_paas_client.models.alarm_rule_numeric_operation import AlarmRuleNumericOperation from typing import Optional, Set from typing_extensions import Self @@ -33,7 +33,7 @@ class AlarmRuleNumericFilterPredicate(AlarmRuleKeyFilterPredicate): """ AlarmRuleNumericFilterPredicate """ # noqa: E501 - operation: NumericOperation + operation: AlarmRuleNumericOperation value: AlarmConditionValueDouble __properties: ClassVar[List[str]] = ["type", "operation", "value"] diff --git a/paas/tb_paas_client/models/alarm_rule_numeric_operation.py b/paas/tb_paas_client/models/alarm_rule_numeric_operation.py new file mode 100644 index 00000000..ca818fb7 --- /dev/null +++ b/paas/tb_paas_client/models/alarm_rule_numeric_operation.py @@ -0,0 +1,45 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AlarmRuleNumericOperation(str, Enum): + """ + AlarmRuleNumericOperation + """ + + """ + allowed enum values + """ + EQUAL = 'EQUAL' + NOT_EQUAL = 'NOT_EQUAL' + GREATER = 'GREATER' + LESS = 'LESS' + GREATER_OR_EQUAL = 'GREATER_OR_EQUAL' + LESS_OR_EQUAL = 'LESS_OR_EQUAL' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlarmRuleNumericOperation from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/paas/tb_paas_client/models/alarm_rule_schedule.py b/paas/tb_paas_client/models/alarm_rule_schedule.py deleted file mode 100644 index 0366e81b..00000000 --- a/paas/tb_paas_client/models/alarm_rule_schedule.py +++ /dev/null @@ -1,122 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from importlib import import_module -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Union -from typing import Optional, Set -from typing_extensions import Self - -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from tb_paas_client.models.alarm_rule_any_time_schedule import AlarmRuleAnyTimeSchedule - from tb_paas_client.models.alarm_rule_custom_time_schedule import AlarmRuleCustomTimeSchedule - from tb_paas_client.models.alarm_rule_specific_time_schedule import AlarmRuleSpecificTimeSchedule - -class AlarmRuleSchedule(BaseModel): - """ - AlarmRuleSchedule - """ # noqa: E501 - type: StrictStr - __properties: ClassVar[List[str]] = ["type"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' - - # discriminator mappings - __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'ANY_TIME': 'AlarmRuleAnyTimeSchedule','CUSTOM': 'AlarmRuleCustomTimeSchedule','SPECIFIC_TIME': 'AlarmRuleSpecificTimeSchedule' - } - - @classmethod - def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: - """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] - if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) - else: - return None - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Union[AlarmRuleAnyTimeSchedule, AlarmRuleCustomTimeSchedule, AlarmRuleSpecificTimeSchedule]]: - """Create an instance of AlarmRuleSchedule from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[AlarmRuleAnyTimeSchedule, AlarmRuleCustomTimeSchedule, AlarmRuleSpecificTimeSchedule]]: - """Create an instance of AlarmRuleSchedule from a dict""" - # look up the object type based on discriminator mapping - object_type = cls.get_discriminator_value(obj) - if object_type == 'AlarmRuleAnyTimeSchedule': - return import_module("tb_paas_client.models.alarm_rule_any_time_schedule").AlarmRuleAnyTimeSchedule.from_dict(obj) - if object_type == 'AlarmRuleCustomTimeSchedule': - return import_module("tb_paas_client.models.alarm_rule_custom_time_schedule").AlarmRuleCustomTimeSchedule.from_dict(obj) - if object_type == 'AlarmRuleSpecificTimeSchedule': - return import_module("tb_paas_client.models.alarm_rule_specific_time_schedule").AlarmRuleSpecificTimeSchedule.from_dict(obj) - - raise ValueError("AlarmRuleSchedule failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) - - diff --git a/paas/tb_paas_client/models/alarm_rule_specific_time_schedule.py b/paas/tb_paas_client/models/alarm_rule_specific_time_schedule.py deleted file mode 100644 index da41938d..00000000 --- a/paas/tb_paas_client/models/alarm_rule_specific_time_schedule.py +++ /dev/null @@ -1,104 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_rule_schedule import AlarmRuleSchedule -from typing import Optional, Set -from typing_extensions import Self - -class AlarmRuleSpecificTimeSchedule(AlarmRuleSchedule): - """ - AlarmRuleSpecificTimeSchedule - """ # noqa: E501 - days_of_week: Optional[List[StrictInt]] = Field(default=None, serialization_alias="daysOfWeek") - ends_on: Optional[StrictInt] = Field(default=None, serialization_alias="endsOn") - starts_on: Optional[StrictInt] = Field(default=None, serialization_alias="startsOn") - timezone: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["type", "daysOfWeek", "endsOn", "startsOn", "timezone"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleSpecificTimeSchedule from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleSpecificTimeSchedule from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "days_of_week": obj.get("daysOfWeek"), - "ends_on": obj.get("endsOn"), - "starts_on": obj.get("startsOn"), - "timezone": obj.get("timezone") - }) - return _obj - - diff --git a/paas/tb_paas_client/models/alarm_rule_string_filter_predicate.py b/paas/tb_paas_client/models/alarm_rule_string_filter_predicate.py index 229ed75a..ca9635da 100644 --- a/paas/tb_paas_client/models/alarm_rule_string_filter_predicate.py +++ b/paas/tb_paas_client/models/alarm_rule_string_filter_predicate.py @@ -25,7 +25,7 @@ from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.alarm_condition_value_string import AlarmConditionValueString from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate -from tb_paas_client.models.string_operation import StringOperation +from tb_paas_client.models.alarm_rule_string_operation import AlarmRuleStringOperation from typing import Optional, Set from typing_extensions import Self @@ -33,10 +33,10 @@ class AlarmRuleStringFilterPredicate(AlarmRuleKeyFilterPredicate): """ AlarmRuleStringFilterPredicate """ # noqa: E501 - ignore_case: Optional[StrictBool] = Field(default=None, serialization_alias="ignoreCase") - operation: StringOperation + operation: AlarmRuleStringOperation value: AlarmConditionValueString - __properties: ClassVar[List[str]] = ["type", "ignoreCase", "operation", "value"] + ignore_case: Optional[StrictBool] = Field(default=None, serialization_alias="ignoreCase") + __properties: ClassVar[List[str]] = ["type", "operation", "value", "ignoreCase"] model_config = ConfigDict( populate_by_name=True, @@ -98,9 +98,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type"), - "ignore_case": obj.get("ignoreCase"), "operation": obj.get("operation"), - "value": AlarmConditionValueString.from_dict(obj["value"]) if obj.get("value") is not None else None + "value": AlarmConditionValueString.from_dict(obj["value"]) if obj.get("value") is not None else None, + "ignore_case": obj.get("ignoreCase") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule_string_operation.py b/paas/tb_paas_client/models/alarm_rule_string_operation.py new file mode 100644 index 00000000..087ecb4a --- /dev/null +++ b/paas/tb_paas_client/models/alarm_rule_string_operation.py @@ -0,0 +1,47 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AlarmRuleStringOperation(str, Enum): + """ + AlarmRuleStringOperation + """ + + """ + allowed enum values + """ + EQUAL = 'EQUAL' + NOT_EQUAL = 'NOT_EQUAL' + STARTS_WITH = 'STARTS_WITH' + ENDS_WITH = 'ENDS_WITH' + CONTAINS = 'CONTAINS' + NOT_CONTAINS = 'NOT_CONTAINS' + IN = 'IN' + NOT_IN = 'NOT_IN' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AlarmRuleStringOperation from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/paas/tb_paas_client/models/alarm_schedule.py b/paas/tb_paas_client/models/alarm_schedule.py index ccdec733..f8c52c0c 100644 --- a/paas/tb_paas_client/models/alarm_schedule.py +++ b/paas/tb_paas_client/models/alarm_schedule.py @@ -22,10 +22,8 @@ import json from importlib import import_module -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional, Union -from tb_paas_client.models.alarm_schedule_type import AlarmScheduleType -from tb_paas_client.models.dynamic_value_string import DynamicValueString +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self @@ -37,11 +35,10 @@ class AlarmSchedule(BaseModel): """ - Configuration for alarm schedule + AlarmSchedule """ # noqa: E501 - dynamic_value: Optional[DynamicValueString] = Field(default=None, serialization_alias="dynamicValue") - type: Optional[AlarmScheduleType] = None - __properties: ClassVar[List[str]] = ["dynamicValue", "type"] + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( populate_by_name=True, @@ -104,9 +101,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of dynamic_value - if self.dynamic_value: - _dict['dynamicValue'] = self.dynamic_value.to_dict() return _dict @classmethod diff --git a/paas/tb_paas_client/models/amazon_bedrock_chat_model_config.py b/paas/tb_paas_client/models/amazon_bedrock_chat_model_config.py index 588c0351..dc1038fe 100644 --- a/paas/tb_paas_client/models/amazon_bedrock_chat_model_config.py +++ b/paas/tb_paas_client/models/amazon_bedrock_chat_model_config.py @@ -34,7 +34,6 @@ class AmazonBedrockChatModelConfig(AiModelConfig): """ AmazonBedrockChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: AmazonBedrockProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -42,7 +41,8 @@ class AmazonBedrockChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -106,14 +106,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": AmazonBedrockProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), "top_p": obj.get("topP"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/anthropic_chat_model_config.py b/paas/tb_paas_client/models/anthropic_chat_model_config.py index 7d603734..56962d7f 100644 --- a/paas/tb_paas_client/models/anthropic_chat_model_config.py +++ b/paas/tb_paas_client/models/anthropic_chat_model_config.py @@ -34,7 +34,6 @@ class AnthropicChatModelConfig(AiModelConfig): """ AnthropicChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: AnthropicProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -43,7 +42,8 @@ class AnthropicChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "topK", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "topK", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -107,7 +107,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": AnthropicProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -115,7 +114,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "top_k": obj.get("topK"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/any_time_schedule.py b/paas/tb_paas_client/models/any_time_schedule.py index 150b1863..8af53c9d 100644 --- a/paas/tb_paas_client/models/any_time_schedule.py +++ b/paas/tb_paas_client/models/any_time_schedule.py @@ -24,8 +24,6 @@ from pydantic import ConfigDict from typing import Any, ClassVar, Dict, List from tb_paas_client.models.alarm_schedule import AlarmSchedule -from tb_paas_client.models.alarm_schedule_type import AlarmScheduleType -from tb_paas_client.models.dynamic_value_string import DynamicValueString from typing import Optional, Set from typing_extensions import Self @@ -33,7 +31,7 @@ class AnyTimeSchedule(AlarmSchedule): """ AnyTimeSchedule """ # noqa: E501 - __properties: ClassVar[List[str]] = ["dynamicValue", "type"] + __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( populate_by_name=True, @@ -79,9 +77,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of dynamic_value - if self.dynamic_value: - _dict['dynamicValue'] = self.dynamic_value.to_dict() return _dict @classmethod @@ -94,7 +89,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "dynamic_value": DynamicValueString.from_dict(obj["dynamicValue"]) if obj.get("dynamicValue") is not None else None, "type": obj.get("type") }) return _obj diff --git a/paas/tb_paas_client/models/asset_profile_info.py b/paas/tb_paas_client/models/asset_profile_info.py index 3b46bd60..cc3e07bf 100644 --- a/paas/tb_paas_client/models/asset_profile_info.py +++ b/paas/tb_paas_client/models/asset_profile_info.py @@ -23,8 +23,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from tb_paas_client.models.asset_profile_id import AssetProfileId from tb_paas_client.models.dashboard_id import DashboardId -from tb_paas_client.models.entity_id import EntityId from tb_paas_client.models.tenant_id import TenantId from typing import Optional, Set from typing_extensions import Self @@ -33,7 +33,7 @@ class AssetProfileInfo(BaseModel): """ AssetProfileInfo """ # noqa: E501 - id: Optional[EntityId] = Field(default=None, description="JSON object with the entity Id. ") + id: Optional[AssetProfileId] = Field(default=None, description="JSON object with the Asset Profile Id.") name: Optional[StrictStr] = Field(default=None, description="Entity Name") image: Optional[StrictStr] = Field(default=None, description="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. ") default_dashboard_id: Optional[DashboardId] = Field(default=None, description="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details.", serialization_alias="defaultDashboardId") @@ -105,7 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": EntityId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "id": AssetProfileId.from_dict(obj["id"]) if obj.get("id") is not None else None, "name": obj.get("name"), "image": obj.get("image"), "default_dashboard_id": DashboardId.from_dict(obj["defaultDashboardId"]) if obj.get("defaultDashboardId") is not None else None, diff --git a/paas/tb_paas_client/models/attributes_output.py b/paas/tb_paas_client/models/attributes_output.py index f981b21a..24e15cf1 100644 --- a/paas/tb_paas_client/models/attributes_output.py +++ b/paas/tb_paas_client/models/attributes_output.py @@ -34,7 +34,7 @@ class AttributesOutput(Output): AttributesOutput """ # noqa: E501 strategy: Optional[AttributesOutputStrategy] = None - __properties: ClassVar[List[str]] = ["name", "scope", "decimalsByDefault", "strategy", "type"] + __properties: ClassVar[List[str]] = ["decimalsByDefault", "name", "scope", "strategy", "type"] model_config = ConfigDict( populate_by_name=True, @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "decimals_by_default": obj.get("decimalsByDefault"), "name": obj.get("name"), "scope": obj.get("scope"), - "decimals_by_default": obj.get("decimalsByDefault"), "strategy": AttributesOutputStrategy.from_dict(obj["strategy"]) if obj.get("strategy") is not None else None, "type": obj.get("type") }) diff --git a/paas/tb_paas_client/models/available_entity_keys_v2.py b/paas/tb_paas_client/models/available_entity_keys_v2.py index a95712b1..13f23705 100644 --- a/paas/tb_paas_client/models/available_entity_keys_v2.py +++ b/paas/tb_paas_client/models/available_entity_keys_v2.py @@ -21,7 +21,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.entity_type import EntityType from tb_paas_client.models.key_info import KeyInfo @@ -32,10 +32,11 @@ class AvailableEntityKeysV2(BaseModel): """ Contains unique time series and attribute key names discovered from entities matching a query, optionally including a sample value for each key. """ # noqa: E501 + total_entities: StrictInt = Field(description="Total number of entities that matched the query filter.", serialization_alias="totalEntities") entity_types: List[EntityType] = Field(description="Set of entity types found among the matched entities.", serialization_alias="entityTypes") timeseries: Optional[List[KeyInfo]] = None attributes: Optional[Dict[str, List[KeyInfo]]] = Field(default=None, description="Map of attribute scope to the list of unique attribute keys available on the matched entities. Only scopes supported by the matched entity types are included. Omitted when attribute keys were not requested or when none of the requested scopes apply to the matched entity types.") - __properties: ClassVar[List[str]] = ["entityTypes", "timeseries", "attributes"] + __properties: ClassVar[List[str]] = ["totalEntities", "entityTypes", "timeseries", "attributes"] model_config = ConfigDict( populate_by_name=True, @@ -109,6 +110,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "total_entities": obj.get("totalEntities"), "entity_types": obj.get("entityTypes"), "timeseries": [KeyInfo.from_dict(_item) for _item in obj["timeseries"]] if obj.get("timeseries") is not None else None, "attributes": dict( diff --git a/paas/tb_paas_client/models/azure_open_ai_chat_model_config.py b/paas/tb_paas_client/models/azure_open_ai_chat_model_config.py index 5eb9d1ff..5a0018f2 100644 --- a/paas/tb_paas_client/models/azure_open_ai_chat_model_config.py +++ b/paas/tb_paas_client/models/azure_open_ai_chat_model_config.py @@ -34,7 +34,6 @@ class AzureOpenAiChatModelConfig(AiModelConfig): """ AzureOpenAiChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: AzureOpenAiProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -44,7 +43,8 @@ class AzureOpenAiChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -108,7 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": AzureOpenAiProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -117,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "presence_penalty": obj.get("presencePenalty"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/calculated_field_configuration.py b/paas/tb_paas_client/models/calculated_field_configuration.py index 6d2f4aef..db4fa8ee 100644 --- a/paas/tb_paas_client/models/calculated_field_configuration.py +++ b/paas/tb_paas_client/models/calculated_field_configuration.py @@ -42,9 +42,9 @@ class CalculatedFieldConfiguration(BaseModel): """ CalculatedFieldConfiguration """ # noqa: E501 - type: StrictStr output: Optional[Output] = None - __properties: ClassVar[List[str]] = ["type", "output"] + type: StrictStr + __properties: ClassVar[List[str]] = ["output", "type"] model_config = ConfigDict( populate_by_name=True, diff --git a/paas/tb_paas_client/models/cf_reprocessing_task_result.py b/paas/tb_paas_client/models/cf_reprocessing_task_result.py index f6f6450f..3036befd 100644 --- a/paas/tb_paas_client/models/cf_reprocessing_task_result.py +++ b/paas/tb_paas_client/models/cf_reprocessing_task_result.py @@ -33,7 +33,7 @@ class CfReprocessingTaskResult(TaskResult): CfReprocessingTaskResult """ # noqa: E501 failure: Optional[CfReprocessingTaskFailure] = None - __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "jobType", "failure"] + __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "error", "jobType", "failure"] model_config = ConfigDict( populate_by_name=True, @@ -98,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "success": obj.get("success"), "discarded": obj.get("discarded"), "finish_ts": obj.get("finishTs"), + "error": obj.get("error"), "job_type": obj.get("jobType"), "failure": CfReprocessingTaskFailure.from_dict(obj["failure"]) if obj.get("failure") is not None else None }) diff --git a/paas/tb_paas_client/models/alarm_rule_any_time_schedule.py b/paas/tb_paas_client/models/cloud_domain_id.py similarity index 80% rename from paas/tb_paas_client/models/alarm_rule_any_time_schedule.py rename to paas/tb_paas_client/models/cloud_domain_id.py index 86b23a6c..1f74277d 100644 --- a/paas/tb_paas_client/models/alarm_rule_any_time_schedule.py +++ b/paas/tb_paas_client/models/cloud_domain_id.py @@ -21,17 +21,18 @@ import re # noqa: F401 import json -from pydantic import ConfigDict +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from tb_paas_client.models.alarm_rule_schedule import AlarmRuleSchedule +from uuid import UUID from typing import Optional, Set from typing_extensions import Self -class AlarmRuleAnyTimeSchedule(AlarmRuleSchedule): +class CloudDomainId(BaseModel): """ - AlarmRuleAnyTimeSchedule + CloudDomainId """ # noqa: E501 - __properties: ClassVar[List[str]] = ["type"] + id: UUID = Field(description="string") + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -44,11 +45,15 @@ def to_str(self) -> str: """Returns the string representation of the model""" return pprint.pformat(self.model_dump(by_alias=False, mode='json')) + def get_id(self) -> str: + """Returns the entity ID as a string.""" + return str(self.id) + def __str__(self) -> str: - return self.to_str() + return str(self.id) def __repr__(self) -> str: - return self.to_str() + return f"{type(self).__name__}(id={str(self.id)!r})" def to_json(self) -> str: """Returns the JSON representation of the model using alias""" @@ -56,7 +61,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleAnyTimeSchedule from a JSON string""" + """Create an instance of CloudDomainId from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -81,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleAnyTimeSchedule from a dict""" + """Create an instance of CloudDomainId from a dict""" if obj is None: return None @@ -89,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type") + "id": obj.get("id") }) return _obj diff --git a/paas/tb_paas_client/models/cloud_domain_info.py b/paas/tb_paas_client/models/cloud_domain_info.py new file mode 100644 index 00000000..ac5098ca --- /dev/null +++ b/paas/tb_paas_client/models/cloud_domain_info.py @@ -0,0 +1,130 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tb_paas_client.models.acme_certificate_id import AcmeCertificateId +from tb_paas_client.models.certificate_info import CertificateInfo +from tb_paas_client.models.cloud_domain_id import CloudDomainId +from tb_paas_client.models.customer_id import CustomerId +from tb_paas_client.models.tenant_id import TenantId +from typing import Optional, Set +from typing_extensions import Self + +class CloudDomainInfo(BaseModel): + """ + CloudDomainInfo + """ # noqa: E501 + id: Optional[CloudDomainId] = None + created_time: Optional[StrictInt] = Field(default=None, description="Entity creation timestamp in milliseconds since Unix epoch", serialization_alias="createdTime") + tenant_id: Optional[TenantId] = Field(default=None, serialization_alias="tenantId") + customer_id: Optional[CustomerId] = Field(default=None, serialization_alias="customerId") + domain_name: Optional[StrictStr] = Field(default=None, serialization_alias="domainName") + acme_certificate_id: Optional[AcmeCertificateId] = Field(default=None, serialization_alias="acmeCertificateId") + certificate: Optional[CertificateInfo] = None + __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "customerId", "domainName", "acmeCertificateId", "certificate"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.model_dump(by_alias=False, mode='json')) + + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CloudDomainInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_time", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of id + if self.id: + _dict['id'] = self.id.to_dict() + # override the default output from pydantic by calling `to_dict()` of tenant_id + if self.tenant_id: + _dict['tenantId'] = self.tenant_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of customer_id + if self.customer_id: + _dict['customerId'] = self.customer_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of acme_certificate_id + if self.acme_certificate_id: + _dict['acmeCertificateId'] = self.acme_certificate_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of certificate + if self.certificate: + _dict['certificate'] = self.certificate.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CloudDomainInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": CloudDomainId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "created_time": obj.get("createdTime"), + "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None, + "customer_id": CustomerId.from_dict(obj["customerId"]) if obj.get("customerId") is not None else None, + "domain_name": obj.get("domainName"), + "acme_certificate_id": AcmeCertificateId.from_dict(obj["acmeCertificateId"]) if obj.get("acmeCertificateId") is not None else None, + "certificate": CertificateInfo.from_dict(obj["certificate"]) if obj.get("certificate") is not None else None + }) + return _obj + + diff --git a/paas/tb_paas_client/models/custom_menu_config.py b/paas/tb_paas_client/models/custom_menu_config.py index 8a0cd6fc..1bb88adb 100644 --- a/paas/tb_paas_client/models/custom_menu_config.py +++ b/paas/tb_paas_client/models/custom_menu_config.py @@ -29,7 +29,7 @@ class CustomMenuConfig(BaseModel): """ - A JSON value representing the custom menu configuration + CustomMenuConfig """ # noqa: E501 items: Optional[List[MenuItem]] = None __properties: ClassVar[List[str]] = ["items"] diff --git a/paas/tb_paas_client/models/custom_time_schedule.py b/paas/tb_paas_client/models/custom_time_schedule.py index 31eaa818..8a38483f 100644 --- a/paas/tb_paas_client/models/custom_time_schedule.py +++ b/paas/tb_paas_client/models/custom_time_schedule.py @@ -24,9 +24,7 @@ from pydantic import ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.alarm_schedule import AlarmSchedule -from tb_paas_client.models.alarm_schedule_type import AlarmScheduleType from tb_paas_client.models.custom_time_schedule_item import CustomTimeScheduleItem -from tb_paas_client.models.dynamic_value_string import DynamicValueString from typing import Optional, Set from typing_extensions import Self @@ -36,7 +34,7 @@ class CustomTimeSchedule(AlarmSchedule): """ # noqa: E501 timezone: Optional[StrictStr] = None items: Optional[List[CustomTimeScheduleItem]] = None - __properties: ClassVar[List[str]] = ["dynamicValue", "type", "timezone", "items"] + __properties: ClassVar[List[str]] = ["type", "timezone", "items"] model_config = ConfigDict( populate_by_name=True, @@ -82,9 +80,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of dynamic_value - if self.dynamic_value: - _dict['dynamicValue'] = self.dynamic_value.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in items (list) _items = [] if self.items: @@ -104,7 +99,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "dynamic_value": DynamicValueString.from_dict(obj["dynamicValue"]) if obj.get("dynamicValue") is not None else None, "type": obj.get("type"), "timezone": obj.get("timezone"), "items": [CustomTimeScheduleItem.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None diff --git a/paas/tb_paas_client/models/custom_time_schedule_item.py b/paas/tb_paas_client/models/custom_time_schedule_item.py index 0a12e0c0..b3835c54 100644 --- a/paas/tb_paas_client/models/custom_time_schedule_item.py +++ b/paas/tb_paas_client/models/custom_time_schedule_item.py @@ -30,11 +30,11 @@ class CustomTimeScheduleItem(BaseModel): """ CustomTimeScheduleItem """ # noqa: E501 - day_of_week: Optional[StrictInt] = Field(default=None, serialization_alias="dayOfWeek") enabled: Optional[StrictBool] = None - ends_on: Optional[StrictInt] = Field(default=None, serialization_alias="endsOn") + day_of_week: Optional[StrictInt] = Field(default=None, serialization_alias="dayOfWeek") starts_on: Optional[StrictInt] = Field(default=None, serialization_alias="startsOn") - __properties: ClassVar[List[str]] = ["dayOfWeek", "enabled", "endsOn", "startsOn"] + ends_on: Optional[StrictInt] = Field(default=None, serialization_alias="endsOn") + __properties: ClassVar[List[str]] = ["enabled", "dayOfWeek", "startsOn", "endsOn"] model_config = ConfigDict( populate_by_name=True, @@ -92,10 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "day_of_week": obj.get("dayOfWeek"), "enabled": obj.get("enabled"), - "ends_on": obj.get("endsOn"), - "starts_on": obj.get("startsOn") + "day_of_week": obj.get("dayOfWeek"), + "starts_on": obj.get("startsOn"), + "ends_on": obj.get("endsOn") }) return _obj diff --git a/paas/tb_paas_client/models/customer.py b/paas/tb_paas_client/models/customer.py index 340f4856..641d04b3 100644 --- a/paas/tb_paas_client/models/customer.py +++ b/paas/tb_paas_client/models/customer.py @@ -44,7 +44,7 @@ class Customer(BaseModel): address2: Optional[StrictStr] = Field(default=None, description="Address Line 2") zip: Optional[StrictStr] = Field(default=None, description="Zip code") phone: Optional[StrictStr] = Field(default=None, description="Phone number") - email: StrictStr = Field(description="Email") + email: Optional[StrictStr] = Field(default=None, description="Email") title: StrictStr = Field(description="Title of the customer") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") parent_customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with parent Customer Id", serialization_alias="parentCustomerId") diff --git a/paas/tb_paas_client/models/customer_info.py b/paas/tb_paas_client/models/customer_info.py index 6c412def..5d0ae389 100644 --- a/paas/tb_paas_client/models/customer_info.py +++ b/paas/tb_paas_client/models/customer_info.py @@ -45,7 +45,7 @@ class CustomerInfo(BaseModel): address2: Optional[StrictStr] = Field(default=None, description="Address Line 2") zip: Optional[StrictStr] = Field(default=None, description="Zip code") phone: Optional[StrictStr] = Field(default=None, description="Phone number") - email: StrictStr = Field(description="Email") + email: Optional[StrictStr] = Field(default=None, description="Email") title: StrictStr = Field(description="Title of the customer") tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") parent_customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with parent Customer Id", serialization_alias="parentCustomerId") diff --git a/paas/tb_paas_client/models/device.py b/paas/tb_paas_client/models/device.py index e1fdacac..743c223c 100644 --- a/paas/tb_paas_client/models/device.py +++ b/paas/tb_paas_client/models/device.py @@ -45,7 +45,7 @@ class Device(BaseModel): name: Optional[StrictStr] = Field(default=None, description="Unique Device Name in scope of Tenant") type: Optional[StrictStr] = Field(default=None, description="Device Profile Name") label: Optional[StrictStr] = Field(default=None, description="Label that may be used in widgets") - device_profile_id: DeviceProfileId = Field(description="JSON object with Device Profile Id.", serialization_alias="deviceProfileId") + device_profile_id: Optional[DeviceProfileId] = Field(default=None, description="JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used.", serialization_alias="deviceProfileId") device_data: Optional[DeviceData] = Field(default=None, description="JSON object with content specific to type of transport in the device profile.", serialization_alias="deviceData") firmware_id: Optional[OtaPackageId] = Field(default=None, description="JSON object with Ota Package Id.", serialization_alias="firmwareId") software_id: Optional[OtaPackageId] = Field(default=None, description="JSON object with Ota Package Id.", serialization_alias="softwareId") diff --git a/paas/tb_paas_client/models/device_info.py b/paas/tb_paas_client/models/device_info.py index 02c2a9f2..959c9bc9 100644 --- a/paas/tb_paas_client/models/device_info.py +++ b/paas/tb_paas_client/models/device_info.py @@ -46,7 +46,7 @@ class DeviceInfo(BaseModel): name: Optional[StrictStr] = Field(default=None, description="Unique Device Name in scope of Tenant") type: Optional[StrictStr] = Field(default=None, description="Device Profile Name") label: Optional[StrictStr] = Field(default=None, description="Label that may be used in widgets") - device_profile_id: DeviceProfileId = Field(description="JSON object with Device Profile Id.", serialization_alias="deviceProfileId") + device_profile_id: Optional[DeviceProfileId] = Field(default=None, description="JSON object with Device Profile Id. If not provided, the type will be used to determine the profile. If neither deviceProfileId nor type is specified, the default device profile will be used.", serialization_alias="deviceProfileId") device_data: Optional[DeviceData] = Field(default=None, description="JSON object with content specific to type of transport in the device profile.", serialization_alias="deviceData") firmware_id: Optional[OtaPackageId] = Field(default=None, description="JSON object with Ota Package Id.", serialization_alias="firmwareId") software_id: Optional[OtaPackageId] = Field(default=None, description="JSON object with Ota Package Id.", serialization_alias="softwareId") diff --git a/paas/tb_paas_client/models/device_profile_alarm.py b/paas/tb_paas_client/models/device_profile_alarm.py deleted file mode 100644 index 6bd1bde9..00000000 --- a/paas/tb_paas_client/models/device_profile_alarm.py +++ /dev/null @@ -1,128 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_rule import AlarmRule -from typing import Optional, Set -from typing_extensions import Self - -class DeviceProfileAlarm(BaseModel): - """ - DeviceProfileAlarm - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="String value representing the alarm rule id") - alarm_type: Optional[StrictStr] = Field(default=None, description="String value representing type of the alarm", serialization_alias="alarmType") - create_rules: Optional[Dict[str, AlarmRule]] = Field(default=None, description="Complex JSON object representing create alarm rules. The unique create alarm rule can be created for each alarm severity type. There can be 5 create alarm rules configured per a single alarm type. See method implementation notes and AlarmRule model for more details", serialization_alias="createRules") - clear_rule: Optional[AlarmRule] = Field(default=None, description="JSON object representing clear alarm rule", serialization_alias="clearRule") - propagate: Optional[StrictBool] = Field(default=None, description="Propagation flag to specify if alarm should be propagated to parent entities of alarm originator") - propagate_to_owner: Optional[StrictBool] = Field(default=None, description="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator", serialization_alias="propagateToOwner") - propagate_to_owner_hierarchy: Optional[StrictBool] = Field(default=None, description="Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) and all parent owners in the customer hierarchy", serialization_alias="propagateToOwnerHierarchy") - propagate_to_tenant: Optional[StrictBool] = Field(default=None, description="Propagation flag to specify if alarm should be propagated to the tenant entity", serialization_alias="propagateToTenant") - propagate_relation_types: Optional[List[StrictStr]] = Field(default=None, description="JSON array of relation types that should be used for propagation. By default, 'propagateRelationTypes' array is empty which means that the alarm will be propagated based on any relation type to parent entities. This parameter should be used only in case when 'propagate' parameter is set to true, otherwise, 'propagateRelationTypes' array will be ignored.", serialization_alias="propagateRelationTypes") - __properties: ClassVar[List[str]] = ["id", "alarmType", "createRules", "clearRule", "propagate", "propagateToOwner", "propagateToOwnerHierarchy", "propagateToTenant", "propagateRelationTypes"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DeviceProfileAlarm from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each value in create_rules (dict) - _field_dict = {} - if self.create_rules: - for _key_create_rules in self.create_rules: - if self.create_rules[_key_create_rules]: - _field_dict[_key_create_rules] = self.create_rules[_key_create_rules].to_dict() - _dict['createRules'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of clear_rule - if self.clear_rule: - _dict['clearRule'] = self.clear_rule.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DeviceProfileAlarm from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "alarm_type": obj.get("alarmType"), - "create_rules": dict( - (_k, AlarmRule.from_dict(_v)) - for _k, _v in obj["createRules"].items() - ) - if obj.get("createRules") is not None - else None, - "clear_rule": AlarmRule.from_dict(obj["clearRule"]) if obj.get("clearRule") is not None else None, - "propagate": obj.get("propagate"), - "propagate_to_owner": obj.get("propagateToOwner"), - "propagate_to_owner_hierarchy": obj.get("propagateToOwnerHierarchy"), - "propagate_to_tenant": obj.get("propagateToTenant"), - "propagate_relation_types": obj.get("propagateRelationTypes") - }) - return _obj - - diff --git a/paas/tb_paas_client/models/device_profile_data.py b/paas/tb_paas_client/models/device_profile_data.py index c919b497..1fa20da2 100644 --- a/paas/tb_paas_client/models/device_profile_data.py +++ b/paas/tb_paas_client/models/device_profile_data.py @@ -23,7 +23,6 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.device_profile_alarm import DeviceProfileAlarm from tb_paas_client.models.device_profile_configuration import DeviceProfileConfiguration from tb_paas_client.models.device_profile_provision_configuration import DeviceProfileProvisionConfiguration from tb_paas_client.models.device_profile_transport_configuration import DeviceProfileTransportConfiguration @@ -37,8 +36,7 @@ class DeviceProfileData(BaseModel): configuration: Optional[DeviceProfileConfiguration] = Field(default=None, description="JSON object of device profile configuration") transport_configuration: Optional[DeviceProfileTransportConfiguration] = Field(default=None, description="JSON object of device profile transport configuration", serialization_alias="transportConfiguration") provision_configuration: Optional[DeviceProfileProvisionConfiguration] = Field(default=None, description="JSON object of provisioning strategy type per device profile", serialization_alias="provisionConfiguration") - alarms: Optional[List[DeviceProfileAlarm]] = None - __properties: ClassVar[List[str]] = ["configuration", "transportConfiguration", "provisionConfiguration", "alarms"] + __properties: ClassVar[List[str]] = ["configuration", "transportConfiguration", "provisionConfiguration"] model_config = ConfigDict( populate_by_name=True, @@ -93,13 +91,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of provision_configuration if self.provision_configuration: _dict['provisionConfiguration'] = self.provision_configuration.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in alarms (list) - _items = [] - if self.alarms: - for _item_alarms in self.alarms: - if _item_alarms: - _items.append(_item_alarms.to_dict()) - _dict['alarms'] = _items return _dict @classmethod @@ -114,8 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "configuration": DeviceProfileConfiguration.from_dict(obj["configuration"]) if obj.get("configuration") is not None else None, "transport_configuration": DeviceProfileTransportConfiguration.from_dict(obj["transportConfiguration"]) if obj.get("transportConfiguration") is not None else None, - "provision_configuration": DeviceProfileProvisionConfiguration.from_dict(obj["provisionConfiguration"]) if obj.get("provisionConfiguration") is not None else None, - "alarms": [DeviceProfileAlarm.from_dict(_item) for _item in obj["alarms"]] if obj.get("alarms") is not None else None + "provision_configuration": DeviceProfileProvisionConfiguration.from_dict(obj["provisionConfiguration"]) if obj.get("provisionConfiguration") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/device_profile_info.py b/paas/tb_paas_client/models/device_profile_info.py index 2ac9416d..56d16833 100644 --- a/paas/tb_paas_client/models/device_profile_info.py +++ b/paas/tb_paas_client/models/device_profile_info.py @@ -24,9 +24,9 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.dashboard_id import DashboardId +from tb_paas_client.models.device_profile_id import DeviceProfileId from tb_paas_client.models.device_profile_type import DeviceProfileType from tb_paas_client.models.device_transport_type import DeviceTransportType -from tb_paas_client.models.entity_id import EntityId from tb_paas_client.models.tenant_id import TenantId from typing import Optional, Set from typing_extensions import Self @@ -35,7 +35,7 @@ class DeviceProfileInfo(BaseModel): """ DeviceProfileInfo """ # noqa: E501 - id: Optional[EntityId] = Field(default=None, description="JSON object with the entity Id. ") + id: Optional[DeviceProfileId] = Field(default=None, description="JSON object with the Device Profile Id.") name: Optional[StrictStr] = Field(default=None, description="Entity Name") image: Optional[StrictStr] = Field(default=None, description="Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. ") default_dashboard_id: Optional[DashboardId] = Field(default=None, description="Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.", serialization_alias="defaultDashboardId") @@ -109,7 +109,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": EntityId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "id": DeviceProfileId.from_dict(obj["id"]) if obj.get("id") is not None else None, "name": obj.get("name"), "image": obj.get("image"), "default_dashboard_id": DashboardId.from_dict(obj["defaultDashboardId"]) if obj.get("defaultDashboardId") is not None else None, diff --git a/paas/tb_paas_client/models/domain_info.py b/paas/tb_paas_client/models/domain_info.py index 43930007..a1caddc1 100644 --- a/paas/tb_paas_client/models/domain_info.py +++ b/paas/tb_paas_client/models/domain_info.py @@ -41,11 +41,11 @@ class DomainInfo(BaseModel): tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id", serialization_alias="tenantId") customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id", serialization_alias="customerId") name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Domain name. Cannot be empty") - oauth2_client_infos: Optional[List[OAuth2ClientInfo]] = Field(default=None, description="List of available oauth2 clients", serialization_alias="oauth2ClientInfos") oauth2_enabled: Optional[StrictBool] = Field(default=None, description="Whether OAuth2 settings are enabled or not", serialization_alias="oauth2Enabled") - owner_id: Optional[EntityId] = Field(default=None, description="JSON object with Customer or Tenant Id", serialization_alias="ownerId") propagate_to_edge: Optional[StrictBool] = Field(default=None, description="Whether OAuth2 settings are enabled on Edge or not", serialization_alias="propagateToEdge") - __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "customerId", "name", "oauth2ClientInfos", "oauth2Enabled", "ownerId", "propagateToEdge"] + oauth2_client_infos: Optional[List[OAuth2ClientInfo]] = Field(default=None, description="List of available oauth2 clients", serialization_alias="oauth2ClientInfos") + owner_id: Optional[EntityId] = Field(default=None, description="JSON object with Customer or Tenant Id", serialization_alias="ownerId") + __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "customerId", "name", "oauth2Enabled", "propagateToEdge", "oauth2ClientInfos", "ownerId"] model_config = ConfigDict( populate_by_name=True, @@ -131,10 +131,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None, "customer_id": CustomerId.from_dict(obj["customerId"]) if obj.get("customerId") is not None else None, "name": obj.get("name"), - "oauth2_client_infos": [OAuth2ClientInfo.from_dict(_item) for _item in obj["oauth2ClientInfos"]] if obj.get("oauth2ClientInfos") is not None else None, "oauth2_enabled": obj.get("oauth2Enabled"), - "owner_id": EntityId.from_dict(obj["ownerId"]) if obj.get("ownerId") is not None else None, - "propagate_to_edge": obj.get("propagateToEdge") + "propagate_to_edge": obj.get("propagateToEdge"), + "oauth2_client_infos": [OAuth2ClientInfo.from_dict(_item) for _item in obj["oauth2ClientInfos"]] if obj.get("oauth2ClientInfos") is not None else None, + "owner_id": EntityId.from_dict(obj["ownerId"]) if obj.get("ownerId") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/dummy_task_result.py b/paas/tb_paas_client/models/dummy_task_result.py index 63bb5464..b3e4fe1e 100644 --- a/paas/tb_paas_client/models/dummy_task_result.py +++ b/paas/tb_paas_client/models/dummy_task_result.py @@ -33,7 +33,7 @@ class DummyTaskResult(TaskResult): DummyTaskResult """ # noqa: E501 failure: Optional[DummyTaskFailure] = None - __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "jobType", "failure"] + __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "error", "jobType", "failure"] model_config = ConfigDict( populate_by_name=True, @@ -98,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "success": obj.get("success"), "discarded": obj.get("discarded"), "finish_ts": obj.get("finishTs"), + "error": obj.get("error"), "job_type": obj.get("jobType"), "failure": DummyTaskFailure.from_dict(obj["failure"]) if obj.get("failure") is not None else None }) diff --git a/paas/tb_paas_client/models/alarm_rule_duration_condition.py b/paas/tb_paas_client/models/duration_alarm_condition.py similarity index 86% rename from paas/tb_paas_client/models/alarm_rule_duration_condition.py rename to paas/tb_paas_client/models/duration_alarm_condition.py index a57095c0..3f218731 100644 --- a/paas/tb_paas_client/models/alarm_rule_duration_condition.py +++ b/paas/tb_paas_client/models/duration_alarm_condition.py @@ -23,17 +23,17 @@ from pydantic import ConfigDict from typing import Any, ClassVar, Dict, List +from tb_paas_client.models.alarm_condition import AlarmCondition from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression -from tb_paas_client.models.alarm_condition_value_alarm_rule_schedule import AlarmConditionValueAlarmRuleSchedule +from tb_paas_client.models.alarm_condition_value_alarm_schedule import AlarmConditionValueAlarmSchedule from tb_paas_client.models.alarm_condition_value_long import AlarmConditionValueLong -from tb_paas_client.models.alarm_rule_condition import AlarmRuleCondition from tb_paas_client.models.time_unit import TimeUnit from typing import Optional, Set from typing_extensions import Self -class AlarmRuleDurationCondition(AlarmRuleCondition): +class DurationAlarmCondition(AlarmCondition): """ - AlarmRuleDurationCondition + DurationAlarmCondition """ # noqa: E501 unit: TimeUnit value: AlarmConditionValueLong @@ -62,7 +62,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleDurationCondition from a JSON string""" + """Create an instance of DurationAlarmCondition from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -96,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleDurationCondition from a dict""" + """Create an instance of DurationAlarmCondition from a dict""" if obj is None: return None @@ -105,7 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "expression": AlarmConditionExpression.from_dict(obj["expression"]) if obj.get("expression") is not None else None, - "schedule": AlarmConditionValueAlarmRuleSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "schedule": AlarmConditionValueAlarmSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, "type": obj.get("type"), "unit": obj.get("unit"), "value": AlarmConditionValueLong.from_dict(obj["value"]) if obj.get("value") is not None else None diff --git a/paas/tb_paas_client/models/duration_alarm_condition_spec.py b/paas/tb_paas_client/models/duration_alarm_condition_spec.py deleted file mode 100644 index 7daa591a..00000000 --- a/paas/tb_paas_client/models/duration_alarm_condition_spec.py +++ /dev/null @@ -1,105 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_condition_spec import AlarmConditionSpec -from tb_paas_client.models.filter_predicate_value_long import FilterPredicateValueLong -from tb_paas_client.models.time_unit import TimeUnit -from typing import Optional, Set -from typing_extensions import Self - -class DurationAlarmConditionSpec(AlarmConditionSpec): - """ - Duration Alarm Condition Specification - """ # noqa: E501 - unit: Optional[TimeUnit] = Field(default=None, description="Duration time unit") - predicate: Optional[FilterPredicateValueLong] = Field(default=None, description="Duration predicate") - __properties: ClassVar[List[str]] = ["type", "unit", "predicate"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DurationAlarmConditionSpec from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of predicate - if self.predicate: - _dict['predicate'] = self.predicate.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DurationAlarmConditionSpec from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "unit": obj.get("unit"), - "predicate": FilterPredicateValueLong.from_dict(obj["predicate"]) if obj.get("predicate") is not None else None - }) - return _obj - - diff --git a/paas/tb_paas_client/models/dynamic_value_long.py b/paas/tb_paas_client/models/dynamic_value_long.py deleted file mode 100644 index 274f943f..00000000 --- a/paas/tb_paas_client/models/dynamic_value_long.py +++ /dev/null @@ -1,103 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.dynamic_value_source_type import DynamicValueSourceType -from typing import Optional, Set -from typing_extensions import Self - -class DynamicValueLong(BaseModel): - """ - DynamicValueLong - """ # noqa: E501 - resolved_value: Optional[StrictInt] = Field(default=None, serialization_alias="resolvedValue") - source_type: Optional[DynamicValueSourceType] = Field(default=None, serialization_alias="sourceType") - source_attribute: Optional[StrictStr] = Field(default=None, serialization_alias="sourceAttribute") - inherit: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["resolvedValue", "sourceType", "sourceAttribute", "inherit"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DynamicValueLong from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DynamicValueLong from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "resolved_value": obj.get("resolvedValue"), - "source_type": obj.get("sourceType"), - "source_attribute": obj.get("sourceAttribute"), - "inherit": obj.get("inherit") - }) - return _obj - - diff --git a/paas/tb_paas_client/models/entity_aggregation_calculated_field_configuration.py b/paas/tb_paas_client/models/entity_aggregation_calculated_field_configuration.py index bfee57d3..fcf9bb09 100644 --- a/paas/tb_paas_client/models/entity_aggregation_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/entity_aggregation_calculated_field_configuration.py @@ -37,11 +37,11 @@ class EntityAggregationCalculatedFieldConfiguration(CalculatedFieldConfiguration EntityAggregationCalculatedFieldConfiguration """ # noqa: E501 arguments: Dict[str, Argument] - interval: AggInterval metrics: Dict[str, AggMetric] - produce_intermediate_result: Optional[StrictBool] = Field(default=None, serialization_alias="produceIntermediateResult") + interval: AggInterval watermark: Optional[Watermark] = None - __properties: ClassVar[List[str]] = ["type", "output", "arguments", "interval", "metrics", "produceIntermediateResult", "watermark"] + produce_intermediate_result: Optional[StrictBool] = Field(default=None, serialization_alias="produceIntermediateResult") + __properties: ClassVar[List[str]] = ["output", "type", "arguments", "metrics", "interval", "watermark", "produceIntermediateResult"] model_config = ConfigDict( populate_by_name=True, @@ -97,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]: if self.arguments[_key_arguments]: _field_dict[_key_arguments] = self.arguments[_key_arguments].to_dict() _dict['arguments'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of interval - if self.interval: - _dict['interval'] = self.interval.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in metrics (dict) _field_dict = {} if self.metrics: @@ -107,6 +104,9 @@ def to_dict(self) -> Dict[str, Any]: if self.metrics[_key_metrics]: _field_dict[_key_metrics] = self.metrics[_key_metrics].to_dict() _dict['metrics'] = _field_dict + # override the default output from pydantic by calling `to_dict()` of interval + if self.interval: + _dict['interval'] = self.interval.to_dict() # override the default output from pydantic by calling `to_dict()` of watermark if self.watermark: _dict['watermark'] = self.watermark.to_dict() @@ -122,23 +122,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, + "type": obj.get("type"), "arguments": dict( (_k, Argument.from_dict(_v)) for _k, _v in obj["arguments"].items() ) if obj.get("arguments") is not None else None, - "interval": AggInterval.from_dict(obj["interval"]) if obj.get("interval") is not None else None, "metrics": dict( (_k, AggMetric.from_dict(_v)) for _k, _v in obj["metrics"].items() ) if obj.get("metrics") is not None else None, - "produce_intermediate_result": obj.get("produceIntermediateResult"), - "watermark": Watermark.from_dict(obj["watermark"]) if obj.get("watermark") is not None else None + "interval": AggInterval.from_dict(obj["interval"]) if obj.get("interval") is not None else None, + "watermark": Watermark.from_dict(obj["watermark"]) if obj.get("watermark") is not None else None, + "produce_intermediate_result": obj.get("produceIntermediateResult") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_condition_filter_key.py b/paas/tb_paas_client/models/entity_export_settings.py similarity index 62% rename from paas/tb_paas_client/models/alarm_condition_filter_key.py rename to paas/tb_paas_client/models/entity_export_settings.py index c801a69f..857a2b45 100644 --- a/paas/tb_paas_client/models/alarm_condition_filter_key.py +++ b/paas/tb_paas_client/models/entity_export_settings.py @@ -21,19 +21,22 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_condition_key_type import AlarmConditionKeyType from typing import Optional, Set from typing_extensions import Self -class AlarmConditionFilterKey(BaseModel): +class EntityExportSettings(BaseModel): """ - AlarmConditionFilterKey + EntityExportSettings """ # noqa: E501 - type: Optional[AlarmConditionKeyType] = Field(default=None, description="The key type") - key: Optional[StrictStr] = Field(default=None, description="String value representing the key") - __properties: ClassVar[List[str]] = ["type", "key"] + export_relations: Optional[StrictBool] = Field(default=None, serialization_alias="exportRelations") + export_attributes: Optional[StrictBool] = Field(default=None, serialization_alias="exportAttributes") + export_credentials: Optional[StrictBool] = Field(default=None, serialization_alias="exportCredentials") + export_calculated_fields: Optional[StrictBool] = Field(default=None, serialization_alias="exportCalculatedFields") + export_permissions: Optional[StrictBool] = Field(default=None, serialization_alias="exportPermissions") + export_group_entities: Optional[StrictBool] = Field(default=None, serialization_alias="exportGroupEntities") + __properties: ClassVar[List[str]] = ["exportRelations", "exportAttributes", "exportCredentials", "exportCalculatedFields", "exportPermissions", "exportGroupEntities"] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +61,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmConditionFilterKey from a JSON string""" + """Create an instance of EntityExportSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -83,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmConditionFilterKey from a dict""" + """Create an instance of EntityExportSettings from a dict""" if obj is None: return None @@ -91,8 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), - "key": obj.get("key") + "export_relations": obj.get("exportRelations"), + "export_attributes": obj.get("exportAttributes"), + "export_credentials": obj.get("exportCredentials"), + "export_calculated_fields": obj.get("exportCalculatedFields"), + "export_permissions": obj.get("exportPermissions"), + "export_group_entities": obj.get("exportGroupEntities") }) return _obj diff --git a/paas/tb_paas_client/models/entity_group_info.py b/paas/tb_paas_client/models/entity_group_info.py index 9fc7be0a..059245f3 100644 --- a/paas/tb_paas_client/models/entity_group_info.py +++ b/paas/tb_paas_client/models/entity_group_info.py @@ -24,7 +24,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.entity_group_id import EntityGroupId -from tb_paas_client.models.entity_group_info_owner_ids_inner import EntityGroupInfoOwnerIdsInner from tb_paas_client.models.entity_id import EntityId from tb_paas_client.models.entity_type import EntityType from tb_paas_client.models.tenant_id import TenantId @@ -43,7 +42,7 @@ class EntityGroupInfo(BaseModel): additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the entity group. May include: 'description' (string), 'isPublic' (boolean, whether this group is shared publicly), 'publicCustomerId' (string, UUID of the public customer associated with this group).", serialization_alias="additionalInfo") configuration: Optional[Any] = Field(default=None, description="JSON with the configuration for UI components: list of columns, settings, actions, etc ") version: Optional[StrictInt] = None - owner_ids: List[EntityGroupInfoOwnerIdsInner] = Field(description="List of the entity group owners.", serialization_alias="ownerIds") + owner_ids: Optional[List[EntityId]] = Field(default=None, serialization_alias="ownerIds") edge_group_all: Optional[StrictBool] = Field(default=None, description="Indicates special edge group 'All' that contains all entities and can't be deleted.", serialization_alias="edgeGroupAll") group_all: Optional[StrictBool] = Field(default=None, description="Indicates special group 'All' that contains all entities and can't be deleted.", serialization_alias="groupAll") tenant_id: Optional[TenantId] = Field(default=None, serialization_alias="tenantId") @@ -150,7 +149,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "additional_info": obj.get("additionalInfo"), "configuration": obj.get("configuration"), "version": obj.get("version"), - "owner_ids": [EntityGroupInfoOwnerIdsInner.from_dict(_item) for _item in obj["ownerIds"]] if obj.get("ownerIds") is not None else None, + "owner_ids": [EntityId.from_dict(_item) for _item in obj["ownerIds"]] if obj.get("ownerIds") is not None else None, "edge_group_all": obj.get("edgeGroupAll"), "group_all": obj.get("groupAll"), "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None diff --git a/paas/tb_paas_client/models/entity_group_info_owner_ids_inner.py b/paas/tb_paas_client/models/entity_group_info_owner_ids_inner.py deleted file mode 100644 index 64bba464..00000000 --- a/paas/tb_paas_client/models/entity_group_info_owner_ids_inner.py +++ /dev/null @@ -1,847 +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. -# -# noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from tb_paas_client.models.admin_settings_id import AdminSettingsId -from tb_paas_client.models.ai_model_id import AiModelId -from tb_paas_client.models.alarm_id import AlarmId -from tb_paas_client.models.api_key_id import ApiKeyId -from tb_paas_client.models.api_usage_state_id import ApiUsageStateId -from tb_paas_client.models.asset_id import AssetId -from tb_paas_client.models.asset_profile_id import AssetProfileId -from tb_paas_client.models.billing_customer_id import BillingCustomerId -from tb_paas_client.models.blob_entity_id import BlobEntityId -from tb_paas_client.models.calculated_field_id import CalculatedFieldId -from tb_paas_client.models.converter_id import ConverterId -from tb_paas_client.models.coupon_id import CouponId -from tb_paas_client.models.customer_id import CustomerId -from tb_paas_client.models.dashboard_id import DashboardId -from tb_paas_client.models.device_id import DeviceId -from tb_paas_client.models.device_profile_id import DeviceProfileId -from tb_paas_client.models.domain_id import DomainId -from tb_paas_client.models.edge_id import EdgeId -from tb_paas_client.models.entity_group_id import EntityGroupId -from tb_paas_client.models.entity_view_id import EntityViewId -from tb_paas_client.models.group_permission_id import GroupPermissionId -from tb_paas_client.models.integration_id import IntegrationId -from tb_paas_client.models.job_id import JobId -from tb_paas_client.models.mobile_app_bundle_id import MobileAppBundleId -from tb_paas_client.models.mobile_app_id import MobileAppId -from tb_paas_client.models.notification_id import NotificationId -from tb_paas_client.models.notification_request_id import NotificationRequestId -from tb_paas_client.models.notification_rule_id import NotificationRuleId -from tb_paas_client.models.notification_target_id import NotificationTargetId -from tb_paas_client.models.notification_template_id import NotificationTemplateId -from tb_paas_client.models.o_auth2_client_id import OAuth2ClientId -from tb_paas_client.models.ota_package_id import OtaPackageId -from tb_paas_client.models.product_id import ProductId -from tb_paas_client.models.queue_id import QueueId -from tb_paas_client.models.queue_stats_id import QueueStatsId -from tb_paas_client.models.report_id import ReportId -from tb_paas_client.models.report_template_id import ReportTemplateId -from tb_paas_client.models.role_id import RoleId -from tb_paas_client.models.rpc_id import RpcId -from tb_paas_client.models.rule_chain_id import RuleChainId -from tb_paas_client.models.rule_node_id import RuleNodeId -from tb_paas_client.models.scheduler_event_id import SchedulerEventId -from tb_paas_client.models.secret_id import SecretId -from tb_paas_client.models.subscription_addon_id import SubscriptionAddonId -from tb_paas_client.models.subscription_id import SubscriptionId -from tb_paas_client.models.subscription_plan_id import SubscriptionPlanId -from tb_paas_client.models.tb_resource_id import TbResourceId -from tb_paas_client.models.tenant_id import TenantId -from tb_paas_client.models.tenant_profile_id import TenantProfileId -from tb_paas_client.models.user_id import UserId -from tb_paas_client.models.widget_type_id import WidgetTypeId -from tb_paas_client.models.widgets_bundle_id import WidgetsBundleId -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -ENTITYGROUPINFOOWNERIDSINNER_ONE_OF_SCHEMAS = ["AdminSettingsId", "AiModelId", "AlarmId", "ApiKeyId", "ApiUsageStateId", "AssetId", "AssetProfileId", "BillingCustomerId", "BlobEntityId", "CalculatedFieldId", "ConverterId", "CouponId", "CustomerId", "DashboardId", "DeviceId", "DeviceProfileId", "DomainId", "EdgeId", "EntityGroupId", "EntityViewId", "GroupPermissionId", "IntegrationId", "JobId", "MobileAppBundleId", "MobileAppId", "NotificationId", "NotificationRequestId", "NotificationRuleId", "NotificationTargetId", "NotificationTemplateId", "OAuth2ClientId", "OtaPackageId", "ProductId", "QueueId", "QueueStatsId", "ReportId", "ReportTemplateId", "RoleId", "RpcId", "RuleChainId", "RuleNodeId", "SchedulerEventId", "SecretId", "SubscriptionAddonId", "SubscriptionId", "SubscriptionPlanId", "TbResourceId", "TenantId", "TenantProfileId", "UserId", "WidgetTypeId", "WidgetsBundleId"] - -class EntityGroupInfoOwnerIdsInner(BaseModel): - """ - EntityGroupInfoOwnerIdsInner - """ - # data type: AdminSettingsId - oneof_schema_1_validator: Optional[AdminSettingsId] = None - # data type: AiModelId - oneof_schema_2_validator: Optional[AiModelId] = None - # data type: AlarmId - oneof_schema_3_validator: Optional[AlarmId] = None - # data type: ApiKeyId - oneof_schema_4_validator: Optional[ApiKeyId] = None - # data type: ApiUsageStateId - oneof_schema_5_validator: Optional[ApiUsageStateId] = None - # data type: AssetId - oneof_schema_6_validator: Optional[AssetId] = None - # data type: AssetProfileId - oneof_schema_7_validator: Optional[AssetProfileId] = None - # data type: BillingCustomerId - oneof_schema_8_validator: Optional[BillingCustomerId] = None - # data type: BlobEntityId - oneof_schema_9_validator: Optional[BlobEntityId] = None - # data type: CalculatedFieldId - oneof_schema_10_validator: Optional[CalculatedFieldId] = None - # data type: ConverterId - oneof_schema_11_validator: Optional[ConverterId] = None - # data type: CouponId - oneof_schema_12_validator: Optional[CouponId] = None - # data type: CustomerId - oneof_schema_13_validator: Optional[CustomerId] = None - # data type: DashboardId - oneof_schema_14_validator: Optional[DashboardId] = None - # data type: DeviceId - oneof_schema_15_validator: Optional[DeviceId] = None - # data type: DeviceProfileId - oneof_schema_16_validator: Optional[DeviceProfileId] = None - # data type: DomainId - oneof_schema_17_validator: Optional[DomainId] = None - # data type: EdgeId - oneof_schema_18_validator: Optional[EdgeId] = None - # data type: EntityGroupId - oneof_schema_19_validator: Optional[EntityGroupId] = None - # data type: EntityViewId - oneof_schema_20_validator: Optional[EntityViewId] = None - # data type: GroupPermissionId - oneof_schema_21_validator: Optional[GroupPermissionId] = None - # data type: IntegrationId - oneof_schema_22_validator: Optional[IntegrationId] = None - # data type: JobId - oneof_schema_23_validator: Optional[JobId] = None - # data type: MobileAppBundleId - oneof_schema_24_validator: Optional[MobileAppBundleId] = None - # data type: MobileAppId - oneof_schema_25_validator: Optional[MobileAppId] = None - # data type: NotificationId - oneof_schema_26_validator: Optional[NotificationId] = None - # data type: NotificationRequestId - oneof_schema_27_validator: Optional[NotificationRequestId] = None - # data type: NotificationRuleId - oneof_schema_28_validator: Optional[NotificationRuleId] = None - # data type: NotificationTargetId - oneof_schema_29_validator: Optional[NotificationTargetId] = None - # data type: NotificationTemplateId - oneof_schema_30_validator: Optional[NotificationTemplateId] = None - # data type: OAuth2ClientId - oneof_schema_31_validator: Optional[OAuth2ClientId] = None - # data type: OtaPackageId - oneof_schema_32_validator: Optional[OtaPackageId] = None - # data type: ProductId - oneof_schema_33_validator: Optional[ProductId] = None - # data type: QueueId - oneof_schema_34_validator: Optional[QueueId] = None - # data type: QueueStatsId - oneof_schema_35_validator: Optional[QueueStatsId] = None - # data type: ReportId - oneof_schema_36_validator: Optional[ReportId] = None - # data type: ReportTemplateId - oneof_schema_37_validator: Optional[ReportTemplateId] = None - # data type: RoleId - oneof_schema_38_validator: Optional[RoleId] = None - # data type: RpcId - oneof_schema_39_validator: Optional[RpcId] = None - # data type: RuleChainId - oneof_schema_40_validator: Optional[RuleChainId] = None - # data type: RuleNodeId - oneof_schema_41_validator: Optional[RuleNodeId] = None - # data type: SchedulerEventId - oneof_schema_42_validator: Optional[SchedulerEventId] = None - # data type: SecretId - oneof_schema_43_validator: Optional[SecretId] = None - # data type: SubscriptionAddonId - oneof_schema_44_validator: Optional[SubscriptionAddonId] = None - # data type: SubscriptionId - oneof_schema_45_validator: Optional[SubscriptionId] = None - # data type: SubscriptionPlanId - oneof_schema_46_validator: Optional[SubscriptionPlanId] = None - # data type: TbResourceId - oneof_schema_47_validator: Optional[TbResourceId] = None - # data type: TenantId - oneof_schema_48_validator: Optional[TenantId] = None - # data type: TenantProfileId - oneof_schema_49_validator: Optional[TenantProfileId] = None - # data type: UserId - oneof_schema_50_validator: Optional[UserId] = None - # data type: WidgetTypeId - oneof_schema_51_validator: Optional[WidgetTypeId] = None - # data type: WidgetsBundleId - oneof_schema_52_validator: Optional[WidgetsBundleId] = None - actual_instance: Optional[Union[AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId]] = None - one_of_schemas: Set[str] = { "AdminSettingsId", "AiModelId", "AlarmId", "ApiKeyId", "ApiUsageStateId", "AssetId", "AssetProfileId", "BillingCustomerId", "BlobEntityId", "CalculatedFieldId", "ConverterId", "CouponId", "CustomerId", "DashboardId", "DeviceId", "DeviceProfileId", "DomainId", "EdgeId", "EntityGroupId", "EntityViewId", "GroupPermissionId", "IntegrationId", "JobId", "MobileAppBundleId", "MobileAppId", "NotificationId", "NotificationRequestId", "NotificationRuleId", "NotificationTargetId", "NotificationTemplateId", "OAuth2ClientId", "OtaPackageId", "ProductId", "QueueId", "QueueStatsId", "ReportId", "ReportTemplateId", "RoleId", "RpcId", "RuleChainId", "RuleNodeId", "SchedulerEventId", "SecretId", "SubscriptionAddonId", "SubscriptionId", "SubscriptionPlanId", "TbResourceId", "TenantId", "TenantProfileId", "UserId", "WidgetTypeId", "WidgetsBundleId" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = EntityGroupInfoOwnerIdsInner.model_construct() - error_messages = [] - match = 0 - # validate data type: AdminSettingsId - if not isinstance(v, AdminSettingsId): - error_messages.append(f"Error! Input type `{type(v)}` is not `AdminSettingsId`") - else: - match += 1 - # validate data type: AiModelId - if not isinstance(v, AiModelId): - error_messages.append(f"Error! Input type `{type(v)}` is not `AiModelId`") - else: - match += 1 - # validate data type: AlarmId - if not isinstance(v, AlarmId): - error_messages.append(f"Error! Input type `{type(v)}` is not `AlarmId`") - else: - match += 1 - # validate data type: ApiKeyId - if not isinstance(v, ApiKeyId): - error_messages.append(f"Error! Input type `{type(v)}` is not `ApiKeyId`") - else: - match += 1 - # validate data type: ApiUsageStateId - if not isinstance(v, ApiUsageStateId): - error_messages.append(f"Error! Input type `{type(v)}` is not `ApiUsageStateId`") - else: - match += 1 - # validate data type: AssetId - if not isinstance(v, AssetId): - error_messages.append(f"Error! Input type `{type(v)}` is not `AssetId`") - else: - match += 1 - # validate data type: AssetProfileId - if not isinstance(v, AssetProfileId): - error_messages.append(f"Error! Input type `{type(v)}` is not `AssetProfileId`") - else: - match += 1 - # validate data type: BillingCustomerId - if not isinstance(v, BillingCustomerId): - error_messages.append(f"Error! Input type `{type(v)}` is not `BillingCustomerId`") - else: - match += 1 - # validate data type: BlobEntityId - if not isinstance(v, BlobEntityId): - error_messages.append(f"Error! Input type `{type(v)}` is not `BlobEntityId`") - else: - match += 1 - # validate data type: CalculatedFieldId - if not isinstance(v, CalculatedFieldId): - error_messages.append(f"Error! Input type `{type(v)}` is not `CalculatedFieldId`") - else: - match += 1 - # validate data type: ConverterId - if not isinstance(v, ConverterId): - error_messages.append(f"Error! Input type `{type(v)}` is not `ConverterId`") - else: - match += 1 - # validate data type: CouponId - if not isinstance(v, CouponId): - error_messages.append(f"Error! Input type `{type(v)}` is not `CouponId`") - else: - match += 1 - # validate data type: CustomerId - if not isinstance(v, CustomerId): - error_messages.append(f"Error! Input type `{type(v)}` is not `CustomerId`") - else: - match += 1 - # validate data type: DashboardId - if not isinstance(v, DashboardId): - error_messages.append(f"Error! Input type `{type(v)}` is not `DashboardId`") - else: - match += 1 - # validate data type: DeviceId - if not isinstance(v, DeviceId): - error_messages.append(f"Error! Input type `{type(v)}` is not `DeviceId`") - else: - match += 1 - # validate data type: DeviceProfileId - if not isinstance(v, DeviceProfileId): - error_messages.append(f"Error! Input type `{type(v)}` is not `DeviceProfileId`") - else: - match += 1 - # validate data type: DomainId - if not isinstance(v, DomainId): - error_messages.append(f"Error! Input type `{type(v)}` is not `DomainId`") - else: - match += 1 - # validate data type: EdgeId - if not isinstance(v, EdgeId): - error_messages.append(f"Error! Input type `{type(v)}` is not `EdgeId`") - else: - match += 1 - # validate data type: EntityGroupId - if not isinstance(v, EntityGroupId): - error_messages.append(f"Error! Input type `{type(v)}` is not `EntityGroupId`") - else: - match += 1 - # validate data type: EntityViewId - if not isinstance(v, EntityViewId): - error_messages.append(f"Error! Input type `{type(v)}` is not `EntityViewId`") - else: - match += 1 - # validate data type: GroupPermissionId - if not isinstance(v, GroupPermissionId): - error_messages.append(f"Error! Input type `{type(v)}` is not `GroupPermissionId`") - else: - match += 1 - # validate data type: IntegrationId - if not isinstance(v, IntegrationId): - error_messages.append(f"Error! Input type `{type(v)}` is not `IntegrationId`") - else: - match += 1 - # validate data type: JobId - if not isinstance(v, JobId): - error_messages.append(f"Error! Input type `{type(v)}` is not `JobId`") - else: - match += 1 - # validate data type: MobileAppBundleId - if not isinstance(v, MobileAppBundleId): - error_messages.append(f"Error! Input type `{type(v)}` is not `MobileAppBundleId`") - else: - match += 1 - # validate data type: MobileAppId - if not isinstance(v, MobileAppId): - error_messages.append(f"Error! Input type `{type(v)}` is not `MobileAppId`") - else: - match += 1 - # validate data type: NotificationId - if not isinstance(v, NotificationId): - error_messages.append(f"Error! Input type `{type(v)}` is not `NotificationId`") - else: - match += 1 - # validate data type: NotificationRequestId - if not isinstance(v, NotificationRequestId): - error_messages.append(f"Error! Input type `{type(v)}` is not `NotificationRequestId`") - else: - match += 1 - # validate data type: NotificationRuleId - if not isinstance(v, NotificationRuleId): - error_messages.append(f"Error! Input type `{type(v)}` is not `NotificationRuleId`") - else: - match += 1 - # validate data type: NotificationTargetId - if not isinstance(v, NotificationTargetId): - error_messages.append(f"Error! Input type `{type(v)}` is not `NotificationTargetId`") - else: - match += 1 - # validate data type: NotificationTemplateId - if not isinstance(v, NotificationTemplateId): - error_messages.append(f"Error! Input type `{type(v)}` is not `NotificationTemplateId`") - else: - match += 1 - # validate data type: OAuth2ClientId - if not isinstance(v, OAuth2ClientId): - error_messages.append(f"Error! Input type `{type(v)}` is not `OAuth2ClientId`") - else: - match += 1 - # validate data type: OtaPackageId - if not isinstance(v, OtaPackageId): - error_messages.append(f"Error! Input type `{type(v)}` is not `OtaPackageId`") - else: - match += 1 - # validate data type: ProductId - if not isinstance(v, ProductId): - error_messages.append(f"Error! Input type `{type(v)}` is not `ProductId`") - else: - match += 1 - # validate data type: QueueId - if not isinstance(v, QueueId): - error_messages.append(f"Error! Input type `{type(v)}` is not `QueueId`") - else: - match += 1 - # validate data type: QueueStatsId - if not isinstance(v, QueueStatsId): - error_messages.append(f"Error! Input type `{type(v)}` is not `QueueStatsId`") - else: - match += 1 - # validate data type: ReportId - if not isinstance(v, ReportId): - error_messages.append(f"Error! Input type `{type(v)}` is not `ReportId`") - else: - match += 1 - # validate data type: ReportTemplateId - if not isinstance(v, ReportTemplateId): - error_messages.append(f"Error! Input type `{type(v)}` is not `ReportTemplateId`") - else: - match += 1 - # validate data type: RoleId - if not isinstance(v, RoleId): - error_messages.append(f"Error! Input type `{type(v)}` is not `RoleId`") - else: - match += 1 - # validate data type: RpcId - if not isinstance(v, RpcId): - error_messages.append(f"Error! Input type `{type(v)}` is not `RpcId`") - else: - match += 1 - # validate data type: RuleChainId - if not isinstance(v, RuleChainId): - error_messages.append(f"Error! Input type `{type(v)}` is not `RuleChainId`") - else: - match += 1 - # validate data type: RuleNodeId - if not isinstance(v, RuleNodeId): - error_messages.append(f"Error! Input type `{type(v)}` is not `RuleNodeId`") - else: - match += 1 - # validate data type: SchedulerEventId - if not isinstance(v, SchedulerEventId): - error_messages.append(f"Error! Input type `{type(v)}` is not `SchedulerEventId`") - else: - match += 1 - # validate data type: SecretId - if not isinstance(v, SecretId): - error_messages.append(f"Error! Input type `{type(v)}` is not `SecretId`") - else: - match += 1 - # validate data type: SubscriptionAddonId - if not isinstance(v, SubscriptionAddonId): - error_messages.append(f"Error! Input type `{type(v)}` is not `SubscriptionAddonId`") - else: - match += 1 - # validate data type: SubscriptionId - if not isinstance(v, SubscriptionId): - error_messages.append(f"Error! Input type `{type(v)}` is not `SubscriptionId`") - else: - match += 1 - # validate data type: SubscriptionPlanId - if not isinstance(v, SubscriptionPlanId): - error_messages.append(f"Error! Input type `{type(v)}` is not `SubscriptionPlanId`") - else: - match += 1 - # validate data type: TbResourceId - if not isinstance(v, TbResourceId): - error_messages.append(f"Error! Input type `{type(v)}` is not `TbResourceId`") - else: - match += 1 - # validate data type: TenantId - if not isinstance(v, TenantId): - error_messages.append(f"Error! Input type `{type(v)}` is not `TenantId`") - else: - match += 1 - # validate data type: TenantProfileId - if not isinstance(v, TenantProfileId): - error_messages.append(f"Error! Input type `{type(v)}` is not `TenantProfileId`") - else: - match += 1 - # validate data type: UserId - if not isinstance(v, UserId): - error_messages.append(f"Error! Input type `{type(v)}` is not `UserId`") - else: - match += 1 - # validate data type: WidgetTypeId - if not isinstance(v, WidgetTypeId): - error_messages.append(f"Error! Input type `{type(v)}` is not `WidgetTypeId`") - else: - match += 1 - # validate data type: WidgetsBundleId - if not isinstance(v, WidgetsBundleId): - error_messages.append(f"Error! Input type `{type(v)}` is not `WidgetsBundleId`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in EntityGroupInfoOwnerIdsInner with oneOf schemas: AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in EntityGroupInfoOwnerIdsInner with oneOf schemas: AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into AdminSettingsId - try: - instance.actual_instance = AdminSettingsId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into AiModelId - try: - instance.actual_instance = AiModelId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into AlarmId - try: - instance.actual_instance = AlarmId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ApiKeyId - try: - instance.actual_instance = ApiKeyId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ApiUsageStateId - try: - instance.actual_instance = ApiUsageStateId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into AssetId - try: - instance.actual_instance = AssetId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into AssetProfileId - try: - instance.actual_instance = AssetProfileId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into BillingCustomerId - try: - instance.actual_instance = BillingCustomerId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into BlobEntityId - try: - instance.actual_instance = BlobEntityId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into CalculatedFieldId - try: - instance.actual_instance = CalculatedFieldId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ConverterId - try: - instance.actual_instance = ConverterId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into CouponId - try: - instance.actual_instance = CouponId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into CustomerId - try: - instance.actual_instance = CustomerId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into DashboardId - try: - instance.actual_instance = DashboardId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into DeviceId - try: - instance.actual_instance = DeviceId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into DeviceProfileId - try: - instance.actual_instance = DeviceProfileId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into DomainId - try: - instance.actual_instance = DomainId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EdgeId - try: - instance.actual_instance = EdgeId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EntityGroupId - try: - instance.actual_instance = EntityGroupId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into EntityViewId - try: - instance.actual_instance = EntityViewId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into GroupPermissionId - try: - instance.actual_instance = GroupPermissionId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into IntegrationId - try: - instance.actual_instance = IntegrationId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into JobId - try: - instance.actual_instance = JobId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into MobileAppBundleId - try: - instance.actual_instance = MobileAppBundleId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into MobileAppId - try: - instance.actual_instance = MobileAppId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into NotificationId - try: - instance.actual_instance = NotificationId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into NotificationRequestId - try: - instance.actual_instance = NotificationRequestId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into NotificationRuleId - try: - instance.actual_instance = NotificationRuleId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into NotificationTargetId - try: - instance.actual_instance = NotificationTargetId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into NotificationTemplateId - try: - instance.actual_instance = NotificationTemplateId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into OAuth2ClientId - try: - instance.actual_instance = OAuth2ClientId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into OtaPackageId - try: - instance.actual_instance = OtaPackageId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ProductId - try: - instance.actual_instance = ProductId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into QueueId - try: - instance.actual_instance = QueueId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into QueueStatsId - try: - instance.actual_instance = QueueStatsId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ReportId - try: - instance.actual_instance = ReportId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ReportTemplateId - try: - instance.actual_instance = ReportTemplateId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into RoleId - try: - instance.actual_instance = RoleId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into RpcId - try: - instance.actual_instance = RpcId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into RuleChainId - try: - instance.actual_instance = RuleChainId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into RuleNodeId - try: - instance.actual_instance = RuleNodeId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into SchedulerEventId - try: - instance.actual_instance = SchedulerEventId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into SecretId - try: - instance.actual_instance = SecretId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into SubscriptionAddonId - try: - instance.actual_instance = SubscriptionAddonId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into SubscriptionId - try: - instance.actual_instance = SubscriptionId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into SubscriptionPlanId - try: - instance.actual_instance = SubscriptionPlanId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into TbResourceId - try: - instance.actual_instance = TbResourceId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into TenantId - try: - instance.actual_instance = TenantId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into TenantProfileId - try: - instance.actual_instance = TenantProfileId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into UserId - try: - instance.actual_instance = UserId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into WidgetTypeId - try: - instance.actual_instance = WidgetTypeId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into WidgetsBundleId - try: - instance.actual_instance = WidgetsBundleId.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into EntityGroupInfoOwnerIdsInner with oneOf schemas: AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into EntityGroupInfoOwnerIdsInner with oneOf schemas: AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], AdminSettingsId, AiModelId, AlarmId, ApiKeyId, ApiUsageStateId, AssetId, AssetProfileId, BillingCustomerId, BlobEntityId, CalculatedFieldId, ConverterId, CouponId, CustomerId, DashboardId, DeviceId, DeviceProfileId, DomainId, EdgeId, EntityGroupId, EntityViewId, GroupPermissionId, IntegrationId, JobId, MobileAppBundleId, MobileAppId, NotificationId, NotificationRequestId, NotificationRuleId, NotificationTargetId, NotificationTemplateId, OAuth2ClientId, OtaPackageId, ProductId, QueueId, QueueStatsId, ReportId, ReportTemplateId, RoleId, RpcId, RuleChainId, RuleNodeId, SchedulerEventId, SecretId, SubscriptionAddonId, SubscriptionId, SubscriptionPlanId, TbResourceId, TenantId, TenantProfileId, UserId, WidgetTypeId, WidgetsBundleId]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump(mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - diff --git a/paas/tb_paas_client/models/error_component_all_of_exception_cause_stack_trace.py b/paas/tb_paas_client/models/error_component_all_of_exception_cause_stack_trace.py index 133c1743..3d3febd7 100644 --- a/paas/tb_paas_client/models/error_component_all_of_exception_cause_stack_trace.py +++ b/paas/tb_paas_client/models/error_component_all_of_exception_cause_stack_trace.py @@ -36,9 +36,9 @@ class ErrorComponentAllOfExceptionCauseStackTrace(BaseModel): method_name: Optional[StrictStr] = Field(default=None, serialization_alias="methodName") file_name: Optional[StrictStr] = Field(default=None, serialization_alias="fileName") line_number: Optional[StrictInt] = Field(default=None, serialization_alias="lineNumber") - class_name: Optional[StrictStr] = Field(default=None, serialization_alias="className") native_method: Optional[StrictBool] = Field(default=None, serialization_alias="nativeMethod") - __properties: ClassVar[List[str]] = ["classLoaderName", "moduleName", "moduleVersion", "methodName", "fileName", "lineNumber", "className", "nativeMethod"] + class_name: Optional[StrictStr] = Field(default=None, serialization_alias="className") + __properties: ClassVar[List[str]] = ["classLoaderName", "moduleName", "moduleVersion", "methodName", "fileName", "lineNumber", "nativeMethod", "className"] model_config = ConfigDict( populate_by_name=True, @@ -102,8 +102,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "method_name": obj.get("methodName"), "file_name": obj.get("fileName"), "line_number": obj.get("lineNumber"), - "class_name": obj.get("className"), - "native_method": obj.get("nativeMethod") + "native_method": obj.get("nativeMethod"), + "class_name": obj.get("className") }) return _obj diff --git a/paas/tb_paas_client/models/exportable_entity.py b/paas/tb_paas_client/models/exportable_entity.py index d564b8e7..e1abe07a 100644 --- a/paas/tb_paas_client/models/exportable_entity.py +++ b/paas/tb_paas_client/models/exportable_entity.py @@ -21,9 +21,10 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.entity_id import EntityId +from tb_paas_client.models.tenant_id import TenantId from typing import Optional, Set from typing_extensions import Self @@ -31,9 +32,11 @@ class ExportableEntity(BaseModel): """ ExportableEntity """ # noqa: E501 + created_time: Optional[StrictInt] = Field(default=None, serialization_alias="createdTime") id: Optional[EntityId] = None name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "name"] + tenant_id: Optional[TenantId] = Field(default=None, serialization_alias="tenantId") + __properties: ClassVar[List[str]] = ["createdTime", "id", "name", "tenantId"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +85,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of id if self.id: _dict['id'] = self.id.to_dict() + # override the default output from pydantic by calling `to_dict()` of tenant_id + if self.tenant_id: + _dict['tenantId'] = self.tenant_id.to_dict() return _dict @classmethod @@ -94,8 +100,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "created_time": obj.get("createdTime"), "id": EntityId.from_dict(obj["id"]) if obj.get("id") is not None else None, - "name": obj.get("name") + "name": obj.get("name"), + "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/filter_predicate_value_long.py b/paas/tb_paas_client/models/filter_predicate_value_long.py deleted file mode 100644 index 82941c9b..00000000 --- a/paas/tb_paas_client/models/filter_predicate_value_long.py +++ /dev/null @@ -1,104 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.dynamic_value_long import DynamicValueLong -from typing import Optional, Set -from typing_extensions import Self - -class FilterPredicateValueLong(BaseModel): - """ - FilterPredicateValueLong - """ # noqa: E501 - default_value: Optional[StrictInt] = Field(default=None, serialization_alias="defaultValue") - user_value: Optional[StrictInt] = Field(default=None, serialization_alias="userValue") - dynamic_value: Optional[DynamicValueLong] = Field(default=None, serialization_alias="dynamicValue") - __properties: ClassVar[List[str]] = ["defaultValue", "userValue", "dynamicValue"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FilterPredicateValueLong from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of dynamic_value - if self.dynamic_value: - _dict['dynamicValue'] = self.dynamic_value.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FilterPredicateValueLong from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "default_value": obj.get("defaultValue"), - "user_value": obj.get("userValue"), - "dynamic_value": DynamicValueLong.from_dict(obj["dynamicValue"]) if obj.get("dynamicValue") is not None else None - }) - return _obj - - diff --git a/paas/tb_paas_client/models/geofencing_calculated_field_configuration.py b/paas/tb_paas_client/models/geofencing_calculated_field_configuration.py index 98f74916..ba4ea8d7 100644 --- a/paas/tb_paas_client/models/geofencing_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/geofencing_calculated_field_configuration.py @@ -35,10 +35,10 @@ class GeofencingCalculatedFieldConfiguration(CalculatedFieldConfiguration): GeofencingCalculatedFieldConfiguration """ # noqa: E501 entity_coordinates: EntityCoordinates = Field(serialization_alias="entityCoordinates") + zone_groups: Dict[str, ZoneGroupConfiguration] = Field(serialization_alias="zoneGroups") scheduled_update_enabled: Optional[StrictBool] = Field(default=None, serialization_alias="scheduledUpdateEnabled") scheduled_update_interval: Optional[StrictInt] = Field(default=None, serialization_alias="scheduledUpdateInterval") - zone_groups: Dict[str, ZoneGroupConfiguration] = Field(serialization_alias="zoneGroups") - __properties: ClassVar[List[str]] = ["type", "output", "entityCoordinates", "scheduledUpdateEnabled", "scheduledUpdateInterval", "zoneGroups"] + __properties: ClassVar[List[str]] = ["output", "type", "entityCoordinates", "zoneGroups", "scheduledUpdateEnabled", "scheduledUpdateInterval"] model_config = ConfigDict( populate_by_name=True, @@ -109,17 +109,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, + "type": obj.get("type"), "entity_coordinates": EntityCoordinates.from_dict(obj["entityCoordinates"]) if obj.get("entityCoordinates") is not None else None, - "scheduled_update_enabled": obj.get("scheduledUpdateEnabled"), - "scheduled_update_interval": obj.get("scheduledUpdateInterval"), "zone_groups": dict( (_k, ZoneGroupConfiguration.from_dict(_v)) for _k, _v in obj["zoneGroups"].items() ) if obj.get("zoneGroups") is not None - else None + else None, + "scheduled_update_enabled": obj.get("scheduledUpdateEnabled"), + "scheduled_update_interval": obj.get("scheduledUpdateInterval") }) return _obj diff --git a/paas/tb_paas_client/models/git_hub_models_chat_model_config.py b/paas/tb_paas_client/models/git_hub_models_chat_model_config.py index 7e831013..90f1f3ca 100644 --- a/paas/tb_paas_client/models/git_hub_models_chat_model_config.py +++ b/paas/tb_paas_client/models/git_hub_models_chat_model_config.py @@ -34,7 +34,6 @@ class GitHubModelsChatModelConfig(AiModelConfig): """ GitHubModelsChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: GitHubModelsProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -44,7 +43,8 @@ class GitHubModelsChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -108,7 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": GitHubModelsProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -117,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "presence_penalty": obj.get("presencePenalty"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/google_ai_gemini_chat_model_config.py b/paas/tb_paas_client/models/google_ai_gemini_chat_model_config.py index 034afc48..aa05e148 100644 --- a/paas/tb_paas_client/models/google_ai_gemini_chat_model_config.py +++ b/paas/tb_paas_client/models/google_ai_gemini_chat_model_config.py @@ -34,7 +34,6 @@ class GoogleAiGeminiChatModelConfig(AiModelConfig): """ GoogleAiGeminiChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: GoogleAiGeminiProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -45,7 +44,8 @@ class GoogleAiGeminiChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "topK", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "topK", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -109,7 +109,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": GoogleAiGeminiProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -119,7 +118,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "presence_penalty": obj.get("presencePenalty"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/google_vertex_ai_gemini_chat_model_config.py b/paas/tb_paas_client/models/google_vertex_ai_gemini_chat_model_config.py index 4caf1eae..d029658c 100644 --- a/paas/tb_paas_client/models/google_vertex_ai_gemini_chat_model_config.py +++ b/paas/tb_paas_client/models/google_vertex_ai_gemini_chat_model_config.py @@ -34,7 +34,6 @@ class GoogleVertexAiGeminiChatModelConfig(AiModelConfig): """ GoogleVertexAiGeminiChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: GoogleVertexAiGeminiProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -45,7 +44,8 @@ class GoogleVertexAiGeminiChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "topK", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "topK", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -109,7 +109,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": GoogleVertexAiGeminiProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -119,7 +118,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "presence_penalty": obj.get("presencePenalty"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/home_dashboard.py b/paas/tb_paas_client/models/home_dashboard.py new file mode 100644 index 00000000..8ad313af --- /dev/null +++ b/paas/tb_paas_client/models/home_dashboard.py @@ -0,0 +1,175 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from tb_paas_client.models.customer_id import CustomerId +from tb_paas_client.models.dashboard_id import DashboardId +from tb_paas_client.models.entity_id import EntityId +from tb_paas_client.models.resource_export_data import ResourceExportData +from tb_paas_client.models.short_customer_info import ShortCustomerInfo +from tb_paas_client.models.tenant_id import TenantId +from typing import Optional, Set +from typing_extensions import Self + +class HomeDashboard(BaseModel): + """ + HomeDashboard + """ # noqa: E501 + id: Optional[DashboardId] = Field(default=None, description="JSON object with the dashboard Id. Specify existing dashboard Id to update the dashboard. Referencing non-existing dashboard id will cause error. Omit this field to create new dashboard.") + created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the dashboard creation, in milliseconds", serialization_alias="createdTime") + tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", serialization_alias="tenantId") + customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. ", serialization_alias="customerId") + owner_id: Optional[EntityId] = Field(default=None, description="JSON object with Customer or Tenant Id", serialization_alias="ownerId") + title: Optional[StrictStr] = Field(default=None, description="Title of the dashboard.") + name: Optional[StrictStr] = Field(default=None, description="Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.") + image: Optional[StrictStr] = Field(default=None, description="Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.") + assigned_customers: Optional[List[ShortCustomerInfo]] = Field(default=None, description="List of assigned customers with their info.", serialization_alias="assignedCustomers") + mobile_hide: Optional[StrictBool] = Field(default=None, description="Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.", serialization_alias="mobileHide") + mobile_order: Optional[StrictInt] = Field(default=None, description="Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications", serialization_alias="mobileOrder") + configuration: Optional[Any] = None + resources: Optional[List[ResourceExportData]] = None + version: Optional[StrictInt] = None + hide_dashboard_toolbar: Optional[StrictBool] = Field(default=None, description="Hide dashboard toolbar flag. Useful for rendering dashboards on mobile.", serialization_alias="hideDashboardToolbar") + __properties: ClassVar[List[str]] = ["id", "createdTime", "tenantId", "customerId", "ownerId", "title", "name", "image", "assignedCustomers", "mobileHide", "mobileOrder", "configuration", "resources", "version", "hideDashboardToolbar"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.model_dump(by_alias=False, mode='json')) + + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HomeDashboard from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "created_time", + "tenant_id", + "owner_id", + "name", + "image", + "mobile_hide", + "mobile_order", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of id + if self.id: + _dict['id'] = self.id.to_dict() + # override the default output from pydantic by calling `to_dict()` of tenant_id + if self.tenant_id: + _dict['tenantId'] = self.tenant_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of customer_id + if self.customer_id: + _dict['customerId'] = self.customer_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of owner_id + if self.owner_id: + _dict['ownerId'] = self.owner_id.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in assigned_customers (list) + _items = [] + if self.assigned_customers: + for _item_assigned_customers in self.assigned_customers: + if _item_assigned_customers: + _items.append(_item_assigned_customers.to_dict()) + _dict['assignedCustomers'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in resources (list) + _items = [] + if self.resources: + for _item_resources in self.resources: + if _item_resources: + _items.append(_item_resources.to_dict()) + _dict['resources'] = _items + # set to None if configuration (nullable) is None + # and model_fields_set contains the field + if self.configuration is None and "configuration" in self.model_fields_set: + _dict['configuration'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HomeDashboard from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": DashboardId.from_dict(obj["id"]) if obj.get("id") is not None else None, + "created_time": obj.get("createdTime"), + "tenant_id": TenantId.from_dict(obj["tenantId"]) if obj.get("tenantId") is not None else None, + "customer_id": CustomerId.from_dict(obj["customerId"]) if obj.get("customerId") is not None else None, + "owner_id": EntityId.from_dict(obj["ownerId"]) if obj.get("ownerId") is not None else None, + "title": obj.get("title"), + "name": obj.get("name"), + "image": obj.get("image"), + "assigned_customers": [ShortCustomerInfo.from_dict(_item) for _item in obj["assignedCustomers"]] if obj.get("assignedCustomers") is not None else None, + "mobile_hide": obj.get("mobileHide"), + "mobile_order": obj.get("mobileOrder"), + "configuration": obj.get("configuration"), + "resources": [ResourceExportData.from_dict(_item) for _item in obj["resources"]] if obj.get("resources") is not None else None, + "version": obj.get("version"), + "hide_dashboard_toolbar": obj.get("hideDashboardToolbar") + }) + return _obj + + diff --git a/paas/tb_paas_client/models/mistral_ai_chat_model_config.py b/paas/tb_paas_client/models/mistral_ai_chat_model_config.py index 92ef2123..f38e5978 100644 --- a/paas/tb_paas_client/models/mistral_ai_chat_model_config.py +++ b/paas/tb_paas_client/models/mistral_ai_chat_model_config.py @@ -34,7 +34,6 @@ class MistralAiChatModelConfig(AiModelConfig): """ MistralAiChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: MistralAiProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -44,7 +43,8 @@ class MistralAiChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -108,7 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": MistralAiProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -117,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "presence_penalty": obj.get("presencePenalty"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule_no_data_filter_predicate.py b/paas/tb_paas_client/models/no_data_filter_predicate.py similarity index 87% rename from paas/tb_paas_client/models/alarm_rule_no_data_filter_predicate.py rename to paas/tb_paas_client/models/no_data_filter_predicate.py index c24b6d80..d3ab4768 100644 --- a/paas/tb_paas_client/models/alarm_rule_no_data_filter_predicate.py +++ b/paas/tb_paas_client/models/no_data_filter_predicate.py @@ -29,13 +29,13 @@ from typing import Optional, Set from typing_extensions import Self -class AlarmRuleNoDataFilterPredicate(AlarmRuleKeyFilterPredicate): +class NoDataFilterPredicate(AlarmRuleKeyFilterPredicate): """ - AlarmRuleNoDataFilterPredicate + NoDataFilterPredicate """ # noqa: E501 - duration: AlarmConditionValueLong unit: TimeUnit - __properties: ClassVar[List[str]] = ["type", "duration", "unit"] + duration: AlarmConditionValueLong + __properties: ClassVar[List[str]] = ["type", "unit", "duration"] model_config = ConfigDict( populate_by_name=True, @@ -60,7 +60,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleNoDataFilterPredicate from a JSON string""" + """Create an instance of NoDataFilterPredicate from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -88,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleNoDataFilterPredicate from a dict""" + """Create an instance of NoDataFilterPredicate from a dict""" if obj is None: return None @@ -97,8 +97,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type"), - "duration": AlarmConditionValueLong.from_dict(obj["duration"]) if obj.get("duration") is not None else None, - "unit": obj.get("unit") + "unit": obj.get("unit"), + "duration": AlarmConditionValueLong.from_dict(obj["duration"]) if obj.get("duration") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/ollama_chat_model_config.py b/paas/tb_paas_client/models/ollama_chat_model_config.py index 1c9e3de7..c7a6cb2a 100644 --- a/paas/tb_paas_client/models/ollama_chat_model_config.py +++ b/paas/tb_paas_client/models/ollama_chat_model_config.py @@ -34,7 +34,6 @@ class OllamaChatModelConfig(AiModelConfig): """ OllamaChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: OllamaProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -44,7 +43,8 @@ class OllamaChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "topK", "contextLength", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "topK", "contextLength", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -108,7 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": OllamaProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -117,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "context_length": obj.get("contextLength"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/open_ai_chat_model_config.py b/paas/tb_paas_client/models/open_ai_chat_model_config.py index da032f4f..e47767ab 100644 --- a/paas/tb_paas_client/models/open_ai_chat_model_config.py +++ b/paas/tb_paas_client/models/open_ai_chat_model_config.py @@ -34,7 +34,6 @@ class OpenAiChatModelConfig(AiModelConfig): """ OpenAiChatModelConfig """ # noqa: E501 - model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") provider_config: OpenAiProviderConfig = Field(serialization_alias="providerConfig") model_id: Annotated[str, Field(min_length=1, strict=True)] = Field(serialization_alias="modelId") temperature: Optional[Union[StrictFloat, StrictInt]] = None @@ -44,7 +43,8 @@ class OpenAiChatModelConfig(AiModelConfig): max_output_tokens: Optional[StrictInt] = Field(default=None, serialization_alias="maxOutputTokens") timeout_seconds: Optional[StrictInt] = Field(default=None, serialization_alias="timeoutSeconds") max_retries: Optional[StrictInt] = Field(default=None, serialization_alias="maxRetries") - __properties: ClassVar[List[str]] = ["provider", "modelType", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries"] + model_type: Optional[AiModelType] = Field(default=None, serialization_alias="modelType") + __properties: ClassVar[List[str]] = ["provider", "providerConfig", "modelId", "temperature", "topP", "frequencyPenalty", "presencePenalty", "maxOutputTokens", "timeoutSeconds", "maxRetries", "modelType"] model_config = ConfigDict( populate_by_name=True, @@ -108,7 +108,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "provider": obj.get("provider"), - "model_type": obj.get("modelType"), "provider_config": OpenAiProviderConfig.from_dict(obj["providerConfig"]) if obj.get("providerConfig") is not None else None, "model_id": obj.get("modelId"), "temperature": obj.get("temperature"), @@ -117,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "presence_penalty": obj.get("presencePenalty"), "max_output_tokens": obj.get("maxOutputTokens"), "timeout_seconds": obj.get("timeoutSeconds"), - "max_retries": obj.get("maxRetries") + "max_retries": obj.get("maxRetries"), + "model_type": obj.get("modelType") }) return _obj diff --git a/paas/tb_paas_client/models/output.py b/paas/tb_paas_client/models/output.py index 2d316880..f3330379 100644 --- a/paas/tb_paas_client/models/output.py +++ b/paas/tb_paas_client/models/output.py @@ -37,12 +37,12 @@ class Output(BaseModel): """ Output """ # noqa: E501 + decimals_by_default: Optional[StrictInt] = Field(default=None, serialization_alias="decimalsByDefault") name: Optional[StrictStr] = None scope: Optional[AttributeScope] = None - decimals_by_default: Optional[StrictInt] = Field(default=None, serialization_alias="decimalsByDefault") strategy: Optional[Any] = None type: StrictStr - __properties: ClassVar[List[str]] = ["name", "scope", "decimalsByDefault", "strategy", "type"] + __properties: ClassVar[List[str]] = ["decimalsByDefault", "name", "scope", "strategy", "type"] model_config = ConfigDict( populate_by_name=True, diff --git a/paas/tb_paas_client/models/alarm_rule_custom_time_schedule.py b/paas/tb_paas_client/models/page_data_alarm_rule_definition.py similarity index 58% rename from paas/tb_paas_client/models/alarm_rule_custom_time_schedule.py rename to paas/tb_paas_client/models/page_data_alarm_rule_definition.py index 13e4f9bb..5d8c6ce0 100644 --- a/paas/tb_paas_client/models/alarm_rule_custom_time_schedule.py +++ b/paas/tb_paas_client/models/page_data_alarm_rule_definition.py @@ -21,20 +21,21 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_rule_custom_time_schedule_item import AlarmRuleCustomTimeScheduleItem -from tb_paas_client.models.alarm_rule_schedule import AlarmRuleSchedule +from tb_paas_client.models.alarm_rule_definition import AlarmRuleDefinition from typing import Optional, Set from typing_extensions import Self -class AlarmRuleCustomTimeSchedule(AlarmRuleSchedule): +class PageDataAlarmRuleDefinition(BaseModel): """ - AlarmRuleCustomTimeSchedule + PageDataAlarmRuleDefinition """ # noqa: E501 - items: Optional[List[AlarmRuleCustomTimeScheduleItem]] = None - timezone: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["type", "items", "timezone"] + data: Optional[List[AlarmRuleDefinition]] = Field(default=None, description="Array of the entities") + total_pages: Optional[StrictInt] = Field(default=None, description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", serialization_alias="totalPages") + total_elements: Optional[StrictInt] = Field(default=None, description="Total number of elements in all available pages", serialization_alias="totalElements") + has_next: Optional[StrictBool] = Field(default=None, description="'false' value indicates the end of the result set", serialization_alias="hasNext") + __properties: ClassVar[List[str]] = ["data", "totalPages", "totalElements", "hasNext"] model_config = ConfigDict( populate_by_name=True, @@ -59,7 +60,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleCustomTimeSchedule from a JSON string""" + """Create an instance of PageDataAlarmRuleDefinition from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,8 +72,14 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set([ + "total_pages", + "total_elements", + "has_next", ]) _dict = self.model_dump( @@ -80,18 +87,18 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleCustomTimeSchedule from a dict""" + """Create an instance of PageDataAlarmRuleDefinition from a dict""" if obj is None: return None @@ -99,9 +106,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), - "items": [AlarmRuleCustomTimeScheduleItem.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "timezone": obj.get("timezone") + "data": [AlarmRuleDefinition.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total_pages": obj.get("totalPages"), + "total_elements": obj.get("totalElements"), + "has_next": obj.get("hasNext") }) return _obj diff --git a/paas/tb_paas_client/models/page_data_alarm_rule_definition_info.py b/paas/tb_paas_client/models/page_data_alarm_rule_definition_info.py new file mode 100644 index 00000000..a4e015c8 --- /dev/null +++ b/paas/tb_paas_client/models/page_data_alarm_rule_definition_info.py @@ -0,0 +1,116 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from tb_paas_client.models.alarm_rule_definition_info import AlarmRuleDefinitionInfo +from typing import Optional, Set +from typing_extensions import Self + +class PageDataAlarmRuleDefinitionInfo(BaseModel): + """ + PageDataAlarmRuleDefinitionInfo + """ # noqa: E501 + data: Optional[List[AlarmRuleDefinitionInfo]] = Field(default=None, description="Array of the entities") + total_pages: Optional[StrictInt] = Field(default=None, description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", serialization_alias="totalPages") + total_elements: Optional[StrictInt] = Field(default=None, description="Total number of elements in all available pages", serialization_alias="totalElements") + has_next: Optional[StrictBool] = Field(default=None, description="'false' value indicates the end of the result set", serialization_alias="hasNext") + __properties: ClassVar[List[str]] = ["data", "totalPages", "totalElements", "hasNext"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.model_dump(by_alias=False, mode='json')) + + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageDataAlarmRuleDefinitionInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "total_pages", + "total_elements", + "has_next", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item_data in self.data: + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PageDataAlarmRuleDefinitionInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "data": [AlarmRuleDefinitionInfo.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "total_pages": obj.get("totalPages"), + "total_elements": obj.get("totalElements"), + "has_next": obj.get("hasNext") + }) + return _obj + + diff --git a/paas/tb_paas_client/models/propagation_calculated_field_configuration.py b/paas/tb_paas_client/models/propagation_calculated_field_configuration.py index 0f357d7a..e01c98c5 100644 --- a/paas/tb_paas_client/models/propagation_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/propagation_calculated_field_configuration.py @@ -34,11 +34,11 @@ class PropagationCalculatedFieldConfiguration(CalculatedFieldConfiguration): """ PropagationCalculatedFieldConfiguration """ # noqa: E501 - apply_expression_to_resolved_arguments: Optional[StrictBool] = Field(default=None, serialization_alias="applyExpressionToResolvedArguments") arguments: Dict[str, Argument] expression: Optional[StrictStr] = None relation: RelationPathLevel - __properties: ClassVar[List[str]] = ["type", "output", "applyExpressionToResolvedArguments", "arguments", "expression", "relation"] + apply_expression_to_resolved_arguments: Optional[StrictBool] = Field(default=None, serialization_alias="applyExpressionToResolvedArguments") + __properties: ClassVar[List[str]] = ["output", "type", "arguments", "expression", "relation", "applyExpressionToResolvedArguments"] model_config = ConfigDict( populate_by_name=True, @@ -109,9 +109,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, - "apply_expression_to_resolved_arguments": obj.get("applyExpressionToResolvedArguments"), + "type": obj.get("type"), "arguments": dict( (_k, Argument.from_dict(_v)) for _k, _v in obj["arguments"].items() @@ -119,7 +118,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("arguments") is not None else None, "expression": obj.get("expression"), - "relation": RelationPathLevel.from_dict(obj["relation"]) if obj.get("relation") is not None else None + "relation": RelationPathLevel.from_dict(obj["relation"]) if obj.get("relation") is not None else None, + "apply_expression_to_resolved_arguments": obj.get("applyExpressionToResolvedArguments") }) return _obj diff --git a/paas/tb_paas_client/models/related_entities_aggregation_calculated_field_configuration.py b/paas/tb_paas_client/models/related_entities_aggregation_calculated_field_configuration.py index b479bbeb..fb9b4944 100644 --- a/paas/tb_paas_client/models/related_entities_aggregation_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/related_entities_aggregation_calculated_field_configuration.py @@ -35,14 +35,14 @@ class RelatedEntitiesAggregationCalculatedFieldConfiguration(CalculatedFieldConf """ RelatedEntitiesAggregationCalculatedFieldConfiguration """ # noqa: E501 + relation: RelationPathLevel arguments: Dict[str, Argument] deduplication_interval_in_sec: Optional[StrictInt] = Field(default=None, serialization_alias="deduplicationIntervalInSec") metrics: Dict[str, AggMetric] - relation: RelationPathLevel - scheduled_update_enabled: Optional[StrictBool] = Field(default=None, serialization_alias="scheduledUpdateEnabled") - scheduled_update_interval: Optional[StrictInt] = Field(default=None, serialization_alias="scheduledUpdateInterval") use_latest_ts: Optional[StrictBool] = Field(default=None, serialization_alias="useLatestTs") - __properties: ClassVar[List[str]] = ["type", "output", "arguments", "deduplicationIntervalInSec", "metrics", "relation", "scheduledUpdateEnabled", "scheduledUpdateInterval", "useLatestTs"] + scheduled_update_interval: Optional[StrictInt] = Field(default=None, serialization_alias="scheduledUpdateInterval") + scheduled_update_enabled: Optional[StrictBool] = Field(default=None, serialization_alias="scheduledUpdateEnabled") + __properties: ClassVar[List[str]] = ["output", "type", "relation", "arguments", "deduplicationIntervalInSec", "metrics", "useLatestTs", "scheduledUpdateInterval", "scheduledUpdateEnabled"] model_config = ConfigDict( populate_by_name=True, @@ -91,6 +91,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of output if self.output: _dict['output'] = self.output.to_dict() + # override the default output from pydantic by calling `to_dict()` of relation + if self.relation: + _dict['relation'] = self.relation.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in arguments (dict) _field_dict = {} if self.arguments: @@ -105,9 +108,6 @@ def to_dict(self) -> Dict[str, Any]: if self.metrics[_key_metrics]: _field_dict[_key_metrics] = self.metrics[_key_metrics].to_dict() _dict['metrics'] = _field_dict - # override the default output from pydantic by calling `to_dict()` of relation - if self.relation: - _dict['relation'] = self.relation.to_dict() return _dict @classmethod @@ -120,8 +120,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, + "type": obj.get("type"), + "relation": RelationPathLevel.from_dict(obj["relation"]) if obj.get("relation") is not None else None, "arguments": dict( (_k, Argument.from_dict(_v)) for _k, _v in obj["arguments"].items() @@ -135,10 +136,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: ) if obj.get("metrics") is not None else None, - "relation": RelationPathLevel.from_dict(obj["relation"]) if obj.get("relation") is not None else None, - "scheduled_update_enabled": obj.get("scheduledUpdateEnabled"), + "use_latest_ts": obj.get("useLatestTs"), "scheduled_update_interval": obj.get("scheduledUpdateInterval"), - "use_latest_ts": obj.get("useLatestTs") + "scheduled_update_enabled": obj.get("scheduledUpdateEnabled") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule_repeating_condition.py b/paas/tb_paas_client/models/repeating_alarm_condition.py similarity index 86% rename from paas/tb_paas_client/models/alarm_rule_repeating_condition.py rename to paas/tb_paas_client/models/repeating_alarm_condition.py index 49a63fa6..13e46c9d 100644 --- a/paas/tb_paas_client/models/alarm_rule_repeating_condition.py +++ b/paas/tb_paas_client/models/repeating_alarm_condition.py @@ -23,16 +23,16 @@ from pydantic import ConfigDict from typing import Any, ClassVar, Dict, List +from tb_paas_client.models.alarm_condition import AlarmCondition from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression -from tb_paas_client.models.alarm_condition_value_alarm_rule_schedule import AlarmConditionValueAlarmRuleSchedule +from tb_paas_client.models.alarm_condition_value_alarm_schedule import AlarmConditionValueAlarmSchedule from tb_paas_client.models.alarm_condition_value_integer import AlarmConditionValueInteger -from tb_paas_client.models.alarm_rule_condition import AlarmRuleCondition from typing import Optional, Set from typing_extensions import Self -class AlarmRuleRepeatingCondition(AlarmRuleCondition): +class RepeatingAlarmCondition(AlarmCondition): """ - AlarmRuleRepeatingCondition + RepeatingAlarmCondition """ # noqa: E501 count: AlarmConditionValueInteger __properties: ClassVar[List[str]] = ["expression", "schedule", "type", "count"] @@ -60,7 +60,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleRepeatingCondition from a JSON string""" + """Create an instance of RepeatingAlarmCondition from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -94,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleRepeatingCondition from a dict""" + """Create an instance of RepeatingAlarmCondition from a dict""" if obj is None: return None @@ -103,7 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "expression": AlarmConditionExpression.from_dict(obj["expression"]) if obj.get("expression") is not None else None, - "schedule": AlarmConditionValueAlarmRuleSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "schedule": AlarmConditionValueAlarmSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, "type": obj.get("type"), "count": AlarmConditionValueInteger.from_dict(obj["count"]) if obj.get("count") is not None else None }) diff --git a/paas/tb_paas_client/models/repeating_alarm_condition_spec.py b/paas/tb_paas_client/models/repeating_alarm_condition_spec.py deleted file mode 100644 index 55cb384c..00000000 --- a/paas/tb_paas_client/models/repeating_alarm_condition_spec.py +++ /dev/null @@ -1,102 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.alarm_condition_spec import AlarmConditionSpec -from tb_paas_client.models.filter_predicate_value_integer import FilterPredicateValueInteger -from typing import Optional, Set -from typing_extensions import Self - -class RepeatingAlarmConditionSpec(AlarmConditionSpec): - """ - RepeatingAlarmConditionSpec - """ # noqa: E501 - predicate: Optional[FilterPredicateValueInteger] = Field(default=None, description="Repeating predicate") - __properties: ClassVar[List[str]] = ["type", "predicate"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RepeatingAlarmConditionSpec from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of predicate - if self.predicate: - _dict['predicate'] = self.predicate.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RepeatingAlarmConditionSpec from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type"), - "predicate": FilterPredicateValueInteger.from_dict(obj["predicate"]) if obj.get("predicate") is not None else None - }) - return _obj - - diff --git a/paas/tb_paas_client/models/report_bar_chart_settings.py b/paas/tb_paas_client/models/report_bar_chart_settings.py index 2b4a34cb..77311091 100644 --- a/paas/tb_paas_client/models/report_bar_chart_settings.py +++ b/paas/tb_paas_client/models/report_bar_chart_settings.py @@ -21,20 +21,36 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from tb_paas_client.models.bar_series_settings import BarSeriesSettings from tb_paas_client.models.font import Font from tb_paas_client.models.legend_position import LegendPosition -from tb_paas_client.models.report_latest_chart_settings import ReportLatestChartSettings from tb_paas_client.models.text_alignment import TextAlignment from typing import Optional, Set from typing_extensions import Self -class ReportBarChartSettings(ReportLatestChartSettings): +class ReportBarChartSettings(BaseModel): """ ReportBarChartSettings """ # noqa: E501 + show_title: Optional[StrictBool] = Field(default=None, serialization_alias="showTitle") + title: Optional[StrictStr] = None + title_font: Optional[Font] = Field(default=None, serialization_alias="titleFont") + title_color: Optional[StrictStr] = Field(default=None, serialization_alias="titleColor") + title_alignment: Optional[TextAlignment] = Field(default=None, serialization_alias="titleAlignment") + units: Optional[StrictStr] = None + decimals: Optional[StrictInt] = None + auto_scale: Optional[StrictBool] = Field(default=None, serialization_alias="autoScale") + sort_series: Optional[StrictBool] = Field(default=None, serialization_alias="sortSeries") + show_total: Optional[StrictBool] = Field(default=None, serialization_alias="showTotal") + show_legend: Optional[StrictBool] = Field(default=None, serialization_alias="showLegend") + legend_position: Optional[LegendPosition] = Field(default=None, serialization_alias="legendPosition") + legend_label_font: Optional[Font] = Field(default=None, serialization_alias="legendLabelFont") + legend_label_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendLabelColor") + legend_value_font: Optional[Font] = Field(default=None, serialization_alias="legendValueFont") + legend_value_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendValueColor") + legend_show_total: Optional[StrictBool] = Field(default=None, serialization_alias="legendShowTotal") axis_min: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, serialization_alias="axisMin") axis_max: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, serialization_alias="axisMax") axis_tick_label_font: Optional[Font] = Field(default=None, serialization_alias="axisTickLabelFont") diff --git a/paas/tb_paas_client/models/report_bar_chart_with_labels_settings.py b/paas/tb_paas_client/models/report_bar_chart_with_labels_settings.py index 1397e15c..0a966d77 100644 --- a/paas/tb_paas_client/models/report_bar_chart_with_labels_settings.py +++ b/paas/tb_paas_client/models/report_bar_chart_with_labels_settings.py @@ -21,13 +21,12 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from tb_paas_client.models.chart_fill_settings import ChartFillSettings from tb_paas_client.models.comparison_duration import ComparisonDuration from tb_paas_client.models.font import Font from tb_paas_client.models.legend_config import LegendConfig -from tb_paas_client.models.report_time_series_chart_settings import ReportTimeSeriesChartSettings from tb_paas_client.models.text_alignment import TextAlignment from tb_paas_client.models.time_series_chart_bar_width_settings import TimeSeriesChartBarWidthSettings from tb_paas_client.models.time_series_chart_grid_settings import TimeSeriesChartGridSettings @@ -39,10 +38,37 @@ from typing import Optional, Set from typing_extensions import Self -class ReportBarChartWithLabelsSettings(ReportTimeSeriesChartSettings): +class ReportBarChartWithLabelsSettings(BaseModel): """ ReportBarChartWithLabelsSettings """ # noqa: E501 + show_title: Optional[StrictBool] = Field(default=None, serialization_alias="showTitle") + title: Optional[StrictStr] = None + title_font: Optional[Font] = Field(default=None, serialization_alias="titleFont") + title_color: Optional[StrictStr] = Field(default=None, serialization_alias="titleColor") + title_alignment: Optional[TextAlignment] = Field(default=None, serialization_alias="titleAlignment") + thresholds: Optional[List[TimeSeriesChartThreshold]] = None + stack: Optional[StrictBool] = None + grid: Optional[TimeSeriesChartGridSettings] = None + y_axes: Optional[Dict[str, TimeSeriesChartYAxisSettings]] = Field(default=None, serialization_alias="yAxes") + x_axis: Optional[TimeSeriesChartXAxisSettings] = Field(default=None, serialization_alias="xAxis") + bar_width_settings: Optional[TimeSeriesChartBarWidthSettings] = Field(default=None, serialization_alias="barWidthSettings") + no_aggregation_bar_width_settings: Optional[TimeSeriesChartNoAggregationBarWidthSettings] = Field(default=None, serialization_alias="noAggregationBarWidthSettings") + states: Optional[List[TimeSeriesChartStateSettings]] = None + comparison_enabled: Optional[StrictBool] = Field(default=None, serialization_alias="comparisonEnabled") + time_for_comparison: Optional[ComparisonDuration] = Field(default=None, serialization_alias="timeForComparison") + comparison_custom_interval_value: Optional[StrictInt] = Field(default=None, serialization_alias="comparisonCustomIntervalValue") + comparison_x_axis: Optional[TimeSeriesChartXAxisSettings] = Field(default=None, serialization_alias="comparisonXAxis") + show_legend: Optional[StrictBool] = Field(default=None, serialization_alias="showLegend") + legend_column_title_font: Optional[Font] = Field(default=None, serialization_alias="legendColumnTitleFont") + legend_column_title_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendColumnTitleColor") + legend_label_font: Optional[Font] = Field(default=None, serialization_alias="legendLabelFont") + legend_label_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendLabelColor") + legend_value_font: Optional[Font] = Field(default=None, serialization_alias="legendValueFont") + legend_value_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendValueColor") + legend_config: Optional[LegendConfig] = Field(default=None, serialization_alias="legendConfig") + xaxis: Optional[TimeSeriesChartXAxisSettings] = None + yaxes: Optional[Dict[str, TimeSeriesChartYAxisSettings]] = None show_bar_label: Optional[StrictBool] = Field(default=None, serialization_alias="showBarLabel") bar_label_font: Optional[Font] = Field(default=None, serialization_alias="barLabelFont") bar_label_color: Optional[StrictStr] = Field(default=None, serialization_alias="barLabelColor") diff --git a/paas/tb_paas_client/models/report_doughnut_chart_settings.py b/paas/tb_paas_client/models/report_doughnut_chart_settings.py index e363d498..7f927db6 100644 --- a/paas/tb_paas_client/models/report_doughnut_chart_settings.py +++ b/paas/tb_paas_client/models/report_doughnut_chart_settings.py @@ -21,20 +21,36 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.doughnut_layout import DoughnutLayout from tb_paas_client.models.font import Font from tb_paas_client.models.legend_position import LegendPosition -from tb_paas_client.models.report_latest_chart_settings import ReportLatestChartSettings from tb_paas_client.models.text_alignment import TextAlignment from typing import Optional, Set from typing_extensions import Self -class ReportDoughnutChartSettings(ReportLatestChartSettings): +class ReportDoughnutChartSettings(BaseModel): """ ReportDoughnutChartSettings """ # noqa: E501 + show_title: Optional[StrictBool] = Field(default=None, serialization_alias="showTitle") + title: Optional[StrictStr] = None + title_font: Optional[Font] = Field(default=None, serialization_alias="titleFont") + title_color: Optional[StrictStr] = Field(default=None, serialization_alias="titleColor") + title_alignment: Optional[TextAlignment] = Field(default=None, serialization_alias="titleAlignment") + units: Optional[StrictStr] = None + decimals: Optional[StrictInt] = None + auto_scale: Optional[StrictBool] = Field(default=None, serialization_alias="autoScale") + sort_series: Optional[StrictBool] = Field(default=None, serialization_alias="sortSeries") + show_total: Optional[StrictBool] = Field(default=None, serialization_alias="showTotal") + show_legend: Optional[StrictBool] = Field(default=None, serialization_alias="showLegend") + legend_position: Optional[LegendPosition] = Field(default=None, serialization_alias="legendPosition") + legend_label_font: Optional[Font] = Field(default=None, serialization_alias="legendLabelFont") + legend_label_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendLabelColor") + legend_value_font: Optional[Font] = Field(default=None, serialization_alias="legendValueFont") + legend_value_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendValueColor") + legend_show_total: Optional[StrictBool] = Field(default=None, serialization_alias="legendShowTotal") layout: Optional[DoughnutLayout] = None clockwise: Optional[StrictBool] = None total_value_font: Optional[Font] = Field(default=None, serialization_alias="totalValueFont") diff --git a/paas/tb_paas_client/models/report_latest_chart_settings.py b/paas/tb_paas_client/models/report_latest_chart_settings.py index f01b2c85..57979858 100644 --- a/paas/tb_paas_client/models/report_latest_chart_settings.py +++ b/paas/tb_paas_client/models/report_latest_chart_settings.py @@ -21,22 +21,14 @@ import re # noqa: F401 import json -from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.font import Font from tb_paas_client.models.legend_position import LegendPosition from tb_paas_client.models.text_alignment import TextAlignment from typing import Optional, Set from typing_extensions import Self -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from tb_paas_client.models.report_doughnut_chart_settings import ReportDoughnutChartSettings - from tb_paas_client.models.report_doughnut_chart_settings import ReportDoughnutChartSettings - from tb_paas_client.models.report_bar_chart_settings import ReportBarChartSettings - from tb_paas_client.models.report_pie_chart_settings import ReportPieChartSettings - class ReportLatestChartSettings(BaseModel): """ ReportLatestChartSettings @@ -67,23 +59,6 @@ class ReportLatestChartSettings(BaseModel): ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'subType' - - # discriminator mappings - __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'doughnutChart': 'ReportDoughnutChartSettings','horizontalDoughnutChart': 'ReportDoughnutChartSettings','latestBarChart': 'ReportBarChartSettings','pieChart': 'ReportPieChartSettings' - } - - @classmethod - def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: - """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] - if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) - else: - return None - def to_str(self) -> str: """Returns the string representation of the model""" return pprint.pformat(self.model_dump(by_alias=False, mode='json')) @@ -99,7 +74,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Optional[Union[ReportDoughnutChartSettings, ReportDoughnutChartSettings, ReportBarChartSettings, ReportPieChartSettings]]: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ReportLatestChartSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -133,21 +108,33 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[ReportDoughnutChartSettings, ReportDoughnutChartSettings, ReportBarChartSettings, ReportPieChartSettings]]: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ReportLatestChartSettings from a dict""" - # look up the object type based on discriminator mapping - object_type = cls.get_discriminator_value(obj) - if object_type == 'ReportDoughnutChartSettings': - return import_module("tb_paas_client.models.report_doughnut_chart_settings").ReportDoughnutChartSettings.from_dict(obj) - if object_type == 'ReportDoughnutChartSettings': - return import_module("tb_paas_client.models.report_doughnut_chart_settings").ReportDoughnutChartSettings.from_dict(obj) - if object_type == 'ReportBarChartSettings': - return import_module("tb_paas_client.models.report_bar_chart_settings").ReportBarChartSettings.from_dict(obj) - if object_type == 'ReportPieChartSettings': - return import_module("tb_paas_client.models.report_pie_chart_settings").ReportPieChartSettings.from_dict(obj) - - raise ValueError("ReportLatestChartSettings failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "show_title": obj.get("showTitle"), + "title": obj.get("title"), + "title_font": Font.from_dict(obj["titleFont"]) if obj.get("titleFont") is not None else None, + "title_color": obj.get("titleColor"), + "title_alignment": obj.get("titleAlignment"), + "units": obj.get("units"), + "decimals": obj.get("decimals"), + "auto_scale": obj.get("autoScale"), + "sort_series": obj.get("sortSeries"), + "show_total": obj.get("showTotal"), + "show_legend": obj.get("showLegend"), + "legend_position": obj.get("legendPosition"), + "legend_label_font": Font.from_dict(obj["legendLabelFont"]) if obj.get("legendLabelFont") is not None else None, + "legend_label_color": obj.get("legendLabelColor"), + "legend_value_font": Font.from_dict(obj["legendValueFont"]) if obj.get("legendValueFont") is not None else None, + "legend_value_color": obj.get("legendValueColor"), + "legend_show_total": obj.get("legendShowTotal") + }) + return _obj diff --git a/paas/tb_paas_client/models/report_pie_chart_settings.py b/paas/tb_paas_client/models/report_pie_chart_settings.py index 4c8d06a8..5e615e93 100644 --- a/paas/tb_paas_client/models/report_pie_chart_settings.py +++ b/paas/tb_paas_client/models/report_pie_chart_settings.py @@ -21,20 +21,36 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from tb_paas_client.models.font import Font from tb_paas_client.models.legend_position import LegendPosition from tb_paas_client.models.pie_chart_label_position import PieChartLabelPosition -from tb_paas_client.models.report_latest_chart_settings import ReportLatestChartSettings from tb_paas_client.models.text_alignment import TextAlignment from typing import Optional, Set from typing_extensions import Self -class ReportPieChartSettings(ReportLatestChartSettings): +class ReportPieChartSettings(BaseModel): """ ReportPieChartSettings """ # noqa: E501 + show_title: Optional[StrictBool] = Field(default=None, serialization_alias="showTitle") + title: Optional[StrictStr] = None + title_font: Optional[Font] = Field(default=None, serialization_alias="titleFont") + title_color: Optional[StrictStr] = Field(default=None, serialization_alias="titleColor") + title_alignment: Optional[TextAlignment] = Field(default=None, serialization_alias="titleAlignment") + units: Optional[StrictStr] = None + decimals: Optional[StrictInt] = None + auto_scale: Optional[StrictBool] = Field(default=None, serialization_alias="autoScale") + sort_series: Optional[StrictBool] = Field(default=None, serialization_alias="sortSeries") + show_total: Optional[StrictBool] = Field(default=None, serialization_alias="showTotal") + show_legend: Optional[StrictBool] = Field(default=None, serialization_alias="showLegend") + legend_position: Optional[LegendPosition] = Field(default=None, serialization_alias="legendPosition") + legend_label_font: Optional[Font] = Field(default=None, serialization_alias="legendLabelFont") + legend_label_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendLabelColor") + legend_value_font: Optional[Font] = Field(default=None, serialization_alias="legendValueFont") + legend_value_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendValueColor") + legend_show_total: Optional[StrictBool] = Field(default=None, serialization_alias="legendShowTotal") show_label: Optional[StrictBool] = Field(default=None, serialization_alias="showLabel") label_position: Optional[PieChartLabelPosition] = Field(default=None, serialization_alias="labelPosition") label_font: Optional[Font] = Field(default=None, serialization_alias="labelFont") diff --git a/paas/tb_paas_client/models/report_range_chart_settings.py b/paas/tb_paas_client/models/report_range_chart_settings.py index 433d5193..d8e0cfe5 100644 --- a/paas/tb_paas_client/models/report_range_chart_settings.py +++ b/paas/tb_paas_client/models/report_range_chart_settings.py @@ -21,14 +21,13 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from tb_paas_client.models.color_range import ColorRange from tb_paas_client.models.comparison_duration import ComparisonDuration from tb_paas_client.models.font import Font from tb_paas_client.models.legend_config import LegendConfig from tb_paas_client.models.line_series_settings import LineSeriesSettings -from tb_paas_client.models.report_time_series_chart_settings import ReportTimeSeriesChartSettings from tb_paas_client.models.text_alignment import TextAlignment from tb_paas_client.models.time_series_chart_bar_width_settings import TimeSeriesChartBarWidthSettings from tb_paas_client.models.time_series_chart_grid_settings import TimeSeriesChartGridSettings @@ -40,10 +39,37 @@ from typing import Optional, Set from typing_extensions import Self -class ReportRangeChartSettings(ReportTimeSeriesChartSettings): +class ReportRangeChartSettings(BaseModel): """ ReportRangeChartSettings """ # noqa: E501 + show_title: Optional[StrictBool] = Field(default=None, serialization_alias="showTitle") + title: Optional[StrictStr] = None + title_font: Optional[Font] = Field(default=None, serialization_alias="titleFont") + title_color: Optional[StrictStr] = Field(default=None, serialization_alias="titleColor") + title_alignment: Optional[TextAlignment] = Field(default=None, serialization_alias="titleAlignment") + thresholds: Optional[List[TimeSeriesChartThreshold]] = None + stack: Optional[StrictBool] = None + grid: Optional[TimeSeriesChartGridSettings] = None + y_axes: Optional[Dict[str, TimeSeriesChartYAxisSettings]] = Field(default=None, serialization_alias="yAxes") + x_axis: Optional[TimeSeriesChartXAxisSettings] = Field(default=None, serialization_alias="xAxis") + bar_width_settings: Optional[TimeSeriesChartBarWidthSettings] = Field(default=None, serialization_alias="barWidthSettings") + no_aggregation_bar_width_settings: Optional[TimeSeriesChartNoAggregationBarWidthSettings] = Field(default=None, serialization_alias="noAggregationBarWidthSettings") + states: Optional[List[TimeSeriesChartStateSettings]] = None + comparison_enabled: Optional[StrictBool] = Field(default=None, serialization_alias="comparisonEnabled") + time_for_comparison: Optional[ComparisonDuration] = Field(default=None, serialization_alias="timeForComparison") + comparison_custom_interval_value: Optional[StrictInt] = Field(default=None, serialization_alias="comparisonCustomIntervalValue") + comparison_x_axis: Optional[TimeSeriesChartXAxisSettings] = Field(default=None, serialization_alias="comparisonXAxis") + show_legend: Optional[StrictBool] = Field(default=None, serialization_alias="showLegend") + legend_column_title_font: Optional[Font] = Field(default=None, serialization_alias="legendColumnTitleFont") + legend_column_title_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendColumnTitleColor") + legend_label_font: Optional[Font] = Field(default=None, serialization_alias="legendLabelFont") + legend_label_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendLabelColor") + legend_value_font: Optional[Font] = Field(default=None, serialization_alias="legendValueFont") + legend_value_color: Optional[StrictStr] = Field(default=None, serialization_alias="legendValueColor") + legend_config: Optional[LegendConfig] = Field(default=None, serialization_alias="legendConfig") + xaxis: Optional[TimeSeriesChartXAxisSettings] = None + yaxes: Optional[Dict[str, TimeSeriesChartYAxisSettings]] = None range_colors: Optional[List[ColorRange]] = Field(default=None, serialization_alias="rangeColors") out_of_range_color: Optional[StrictStr] = Field(default=None, serialization_alias="outOfRangeColor") show_range_thresholds: Optional[StrictBool] = Field(default=None, serialization_alias="showRangeThresholds") diff --git a/paas/tb_paas_client/models/report_task_result.py b/paas/tb_paas_client/models/report_task_result.py index 70023232..1b04f901 100644 --- a/paas/tb_paas_client/models/report_task_result.py +++ b/paas/tb_paas_client/models/report_task_result.py @@ -33,7 +33,7 @@ class ReportTaskResult(TaskResult): ReportTaskResult """ # noqa: E501 report: Optional[Report] = None - __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "jobType", "report"] + __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "error", "jobType", "report"] model_config = ConfigDict( populate_by_name=True, @@ -98,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "success": obj.get("success"), "discarded": obj.get("discarded"), "finish_ts": obj.get("finishTs"), + "error": obj.get("error"), "job_type": obj.get("jobType"), "report": Report.from_dict(obj["report"]) if obj.get("report") is not None else None }) diff --git a/paas/tb_paas_client/models/report_time_series_chart_settings.py b/paas/tb_paas_client/models/report_time_series_chart_settings.py index bbf89db6..8596c8ac 100644 --- a/paas/tb_paas_client/models/report_time_series_chart_settings.py +++ b/paas/tb_paas_client/models/report_time_series_chart_settings.py @@ -21,9 +21,8 @@ import re # noqa: F401 import json -from importlib import import_module from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.comparison_duration import ComparisonDuration from tb_paas_client.models.font import Font from tb_paas_client.models.legend_config import LegendConfig @@ -38,11 +37,6 @@ from typing import Optional, Set from typing_extensions import Self -from typing import TYPE_CHECKING -if TYPE_CHECKING: - from tb_paas_client.models.report_bar_chart_with_labels_settings import ReportBarChartWithLabelsSettings - from tb_paas_client.models.report_range_chart_settings import ReportRangeChartSettings - class ReportTimeSeriesChartSettings(BaseModel): """ ReportTimeSeriesChartSettings @@ -83,23 +77,6 @@ class ReportTimeSeriesChartSettings(BaseModel): ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'subType' - - # discriminator mappings - __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'barChartWithLabels': 'ReportBarChartWithLabelsSettings','rangeChart': 'ReportRangeChartSettings' - } - - @classmethod - def get_discriminator_value(cls, obj: Dict[str, Any]) -> Optional[str]: - """Returns the discriminator value (object type) of the data""" - discriminator_value = obj[cls.__discriminator_property_name] - if discriminator_value: - return cls.__discriminator_value_class_map.get(discriminator_value) - else: - return None - def to_str(self) -> str: """Returns the string representation of the model""" return pprint.pformat(self.model_dump(by_alias=False, mode='json')) @@ -115,7 +92,7 @@ def to_json(self) -> str: return self.model_dump_json(by_alias=True, exclude_unset=True) @classmethod - def from_json(cls, json_str: str) -> Optional[Union[ReportBarChartWithLabelsSettings, ReportRangeChartSettings]]: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ReportTimeSeriesChartSettings from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -201,17 +178,53 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[ReportBarChartWithLabelsSettings, ReportRangeChartSettings]]: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ReportTimeSeriesChartSettings from a dict""" - # look up the object type based on discriminator mapping - object_type = cls.get_discriminator_value(obj) - if object_type == 'ReportBarChartWithLabelsSettings': - return import_module("tb_paas_client.models.report_bar_chart_with_labels_settings").ReportBarChartWithLabelsSettings.from_dict(obj) - if object_type == 'ReportRangeChartSettings': - return import_module("tb_paas_client.models.report_range_chart_settings").ReportRangeChartSettings.from_dict(obj) - - raise ValueError("ReportTimeSeriesChartSettings failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "show_title": obj.get("showTitle"), + "title": obj.get("title"), + "title_font": Font.from_dict(obj["titleFont"]) if obj.get("titleFont") is not None else None, + "title_color": obj.get("titleColor"), + "title_alignment": obj.get("titleAlignment"), + "thresholds": [TimeSeriesChartThreshold.from_dict(_item) for _item in obj["thresholds"]] if obj.get("thresholds") is not None else None, + "stack": obj.get("stack"), + "grid": TimeSeriesChartGridSettings.from_dict(obj["grid"]) if obj.get("grid") is not None else None, + "y_axes": dict( + (_k, TimeSeriesChartYAxisSettings.from_dict(_v)) + for _k, _v in obj["yAxes"].items() + ) + if obj.get("yAxes") is not None + else None, + "x_axis": TimeSeriesChartXAxisSettings.from_dict(obj["xAxis"]) if obj.get("xAxis") is not None else None, + "bar_width_settings": TimeSeriesChartBarWidthSettings.from_dict(obj["barWidthSettings"]) if obj.get("barWidthSettings") is not None else None, + "no_aggregation_bar_width_settings": TimeSeriesChartNoAggregationBarWidthSettings.from_dict(obj["noAggregationBarWidthSettings"]) if obj.get("noAggregationBarWidthSettings") is not None else None, + "states": [TimeSeriesChartStateSettings.from_dict(_item) for _item in obj["states"]] if obj.get("states") is not None else None, + "comparison_enabled": obj.get("comparisonEnabled"), + "time_for_comparison": obj.get("timeForComparison"), + "comparison_custom_interval_value": obj.get("comparisonCustomIntervalValue"), + "comparison_x_axis": TimeSeriesChartXAxisSettings.from_dict(obj["comparisonXAxis"]) if obj.get("comparisonXAxis") is not None else None, + "show_legend": obj.get("showLegend"), + "legend_column_title_font": Font.from_dict(obj["legendColumnTitleFont"]) if obj.get("legendColumnTitleFont") is not None else None, + "legend_column_title_color": obj.get("legendColumnTitleColor"), + "legend_label_font": Font.from_dict(obj["legendLabelFont"]) if obj.get("legendLabelFont") is not None else None, + "legend_label_color": obj.get("legendLabelColor"), + "legend_value_font": Font.from_dict(obj["legendValueFont"]) if obj.get("legendValueFont") is not None else None, + "legend_value_color": obj.get("legendValueColor"), + "legend_config": LegendConfig.from_dict(obj["legendConfig"]) if obj.get("legendConfig") is not None else None, + "xaxis": TimeSeriesChartXAxisSettings.from_dict(obj["xaxis"]) if obj.get("xaxis") is not None else None, + "yaxes": dict( + (_k, TimeSeriesChartYAxisSettings.from_dict(_v)) + for _k, _v in obj["yaxes"].items() + ) + if obj.get("yaxes") is not None + else None + }) + return _obj diff --git a/paas/tb_paas_client/models/role.py b/paas/tb_paas_client/models/role.py index 69effa3c..68f64892 100644 --- a/paas/tb_paas_client/models/role.py +++ b/paas/tb_paas_client/models/role.py @@ -38,14 +38,15 @@ class Role(BaseModel): id: Optional[RoleId] = Field(default=None, description="JSON object with the Role Id. Specify this field to update the Role. Referencing non-existing Role Id will cause error. Omit this field to create new Role.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the role creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, description="Additional parameters of the role. May include: 'description' (string).", serialization_alias="additionalInfo") - tenant_id: TenantId = Field(description="JSON object with Tenant Id.", serialization_alias="tenantId") + tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") customer_id: Optional[CustomerId] = Field(default=None, description="JSON object with Customer Id. ", serialization_alias="customerId") name: StrictStr = Field(description="Role Name") type: RoleType = Field(description="Type of the role: generic or group") - permissions: Optional[Any] = None + permissions: Optional[Any] = Field(description="JSON object with the set of permissions. Structure is specific for role type") + excluded_permissions: Optional[Any] = Field(default=None, description="JSON object with the set of excluded permissions. Only applicable for generic roles. Structure is the same as permissions", serialization_alias="excludedPermissions") version: Optional[StrictInt] = None owner_id: Optional[EntityId] = Field(default=None, description="JSON object with Customer or Tenant Id", serialization_alias="ownerId") - __properties: ClassVar[List[str]] = ["id", "createdTime", "additionalInfo", "tenantId", "customerId", "name", "type", "permissions", "version", "ownerId"] + __properties: ClassVar[List[str]] = ["id", "createdTime", "additionalInfo", "tenantId", "customerId", "name", "type", "permissions", "excludedPermissions", "version", "ownerId"] model_config = ConfigDict( populate_by_name=True, @@ -121,6 +122,11 @@ def to_dict(self) -> Dict[str, Any]: if self.permissions is None and "permissions" in self.model_fields_set: _dict['permissions'] = None + # set to None if excluded_permissions (nullable) is None + # and model_fields_set contains the field + if self.excluded_permissions is None and "excluded_permissions" in self.model_fields_set: + _dict['excludedPermissions'] = None + return _dict @classmethod @@ -141,6 +147,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "type": obj.get("type"), "permissions": obj.get("permissions"), + "excluded_permissions": obj.get("excludedPermissions"), "version": obj.get("version"), "owner_id": EntityId.from_dict(obj["ownerId"]) if obj.get("ownerId") is not None else None }) diff --git a/paas/tb_paas_client/models/rule_chain.py b/paas/tb_paas_client/models/rule_chain.py index ca35f5bf..b9d57954 100644 --- a/paas/tb_paas_client/models/rule_chain.py +++ b/paas/tb_paas_client/models/rule_chain.py @@ -37,7 +37,7 @@ class RuleChain(BaseModel): id: Optional[RuleChainId] = Field(default=None, description="JSON object with the Rule Chain Id. Specify this field to update the Rule Chain. Referencing non-existing Rule Chain Id will cause error. Omit this field to create new rule chain.") created_time: Optional[StrictInt] = Field(default=None, description="Timestamp of the rule chain creation, in milliseconds", serialization_alias="createdTime") additional_info: Optional[Any] = Field(default=None, serialization_alias="additionalInfo") - tenant_id: TenantId = Field(description="JSON object with Tenant Id.", serialization_alias="tenantId") + tenant_id: Optional[TenantId] = Field(default=None, description="JSON object with Tenant Id.", serialization_alias="tenantId") name: StrictStr = Field(description="Rule Chain name") type: Optional[RuleChainType] = Field(default=None, description="Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only.") first_rule_node_id: Optional[RuleNodeId] = Field(default=None, description="JSON object with Rule Chain Id. Pointer to the first rule node that should receive all messages pushed to this rule chain.", serialization_alias="firstRuleNodeId") diff --git a/paas/tb_paas_client/models/rule_chain_meta_data.py b/paas/tb_paas_client/models/rule_chain_meta_data.py index e039f942..8803ad49 100644 --- a/paas/tb_paas_client/models/rule_chain_meta_data.py +++ b/paas/tb_paas_client/models/rule_chain_meta_data.py @@ -26,7 +26,6 @@ from tb_paas_client.models.node_connection_info import NodeConnectionInfo from tb_paas_client.models.rule_chain_connection_info import RuleChainConnectionInfo from tb_paas_client.models.rule_chain_id import RuleChainId -from tb_paas_client.models.rule_chain_note import RuleChainNote from tb_paas_client.models.rule_node import RuleNode from typing import Optional, Set from typing_extensions import Self @@ -41,8 +40,7 @@ class RuleChainMetaData(BaseModel): nodes: List[RuleNode] = Field(description="List of rule node JSON objects") connections: List[NodeConnectionInfo] = Field(description="List of JSON objects that represent connections between rule nodes") rule_chain_connections: List[RuleChainConnectionInfo] = Field(description="List of JSON objects that represent connections between rule nodes and other rule chains.", serialization_alias="ruleChainConnections") - notes: Optional[List[RuleChainNote]] = Field(default=None, description="List of sticky notes placed on the rule chain canvas") - __properties: ClassVar[List[str]] = ["ruleChainId", "version", "firstNodeIndex", "nodes", "connections", "ruleChainConnections", "notes"] + __properties: ClassVar[List[str]] = ["ruleChainId", "version", "firstNodeIndex", "nodes", "connections", "ruleChainConnections"] model_config = ConfigDict( populate_by_name=True, @@ -114,13 +112,6 @@ def to_dict(self) -> Dict[str, Any]: if _item_rule_chain_connections: _items.append(_item_rule_chain_connections.to_dict()) _dict['ruleChainConnections'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in notes (list) - _items = [] - if self.notes: - for _item_notes in self.notes: - if _item_notes: - _items.append(_item_notes.to_dict()) - _dict['notes'] = _items return _dict @classmethod @@ -138,8 +129,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "first_node_index": obj.get("firstNodeIndex"), "nodes": [RuleNode.from_dict(_item) for _item in obj["nodes"]] if obj.get("nodes") is not None else None, "connections": [NodeConnectionInfo.from_dict(_item) for _item in obj["connections"]] if obj.get("connections") is not None else None, - "rule_chain_connections": [RuleChainConnectionInfo.from_dict(_item) for _item in obj["ruleChainConnections"]] if obj.get("ruleChainConnections") is not None else None, - "notes": [RuleChainNote.from_dict(_item) for _item in obj["notes"]] if obj.get("notes") is not None else None + "rule_chain_connections": [RuleChainConnectionInfo.from_dict(_item) for _item in obj["ruleChainConnections"]] if obj.get("ruleChainConnections") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/rule_chain_note.py b/paas/tb_paas_client/models/rule_chain_note.py deleted file mode 100644 index a8e2b1f3..00000000 --- a/paas/tb_paas_client/models/rule_chain_note.py +++ /dev/null @@ -1,116 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class RuleChainNote(BaseModel): - """ - RuleChainNote - """ # noqa: E501 - id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the note on the canvas") - x: Optional[StrictInt] = Field(default=None, description="Horizontal position of the note on the canvas, in pixels") - y: Optional[StrictInt] = Field(default=None, description="Vertical position of the note on the canvas, in pixels") - width: Optional[StrictInt] = Field(default=None, description="Width of the note, in pixels") - height: Optional[StrictInt] = Field(default=None, description="Height of the note, in pixels") - content: Optional[StrictStr] = Field(default=None, description="Markdown or HTML content of the note") - background_color: Optional[StrictStr] = Field(default=None, description="Background color of the note in CSS hex format, e.g. '#FFF9C4'", serialization_alias="backgroundColor") - border_color: Optional[StrictStr] = Field(default=None, description="Border color of the note in CSS hex format, e.g. '#E6C800'", serialization_alias="borderColor") - border_width: Optional[StrictInt] = Field(default=None, description="Border width of the note in pixels", serialization_alias="borderWidth") - apply_default_markdown_style: Optional[StrictBool] = Field(default=None, description="Whether to apply the default markdown stylesheet to the note content", serialization_alias="applyDefaultMarkdownStyle") - markdown_css: Optional[StrictStr] = Field(default=None, description="Custom CSS styles applied to the note content", serialization_alias="markdownCss") - __properties: ClassVar[List[str]] = ["id", "x", "y", "width", "height", "content", "backgroundColor", "borderColor", "borderWidth", "applyDefaultMarkdownStyle", "markdownCss"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RuleChainNote from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RuleChainNote from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "content": obj.get("content"), - "background_color": obj.get("backgroundColor"), - "border_color": obj.get("borderColor"), - "border_width": obj.get("borderWidth"), - "apply_default_markdown_style": obj.get("applyDefaultMarkdownStyle"), - "markdown_css": obj.get("markdownCss") - }) - return _obj - - diff --git a/paas/tb_paas_client/models/script_calculated_field_configuration.py b/paas/tb_paas_client/models/script_calculated_field_configuration.py index 49a0660b..0ce74164 100644 --- a/paas/tb_paas_client/models/script_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/script_calculated_field_configuration.py @@ -35,7 +35,7 @@ class ScriptCalculatedFieldConfiguration(CalculatedFieldConfiguration): """ # noqa: E501 arguments: Dict[str, Argument] expression: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["type", "output", "arguments", "expression"] + __properties: ClassVar[List[str]] = ["output", "type", "arguments", "expression"] model_config = ConfigDict( populate_by_name=True, @@ -103,8 +103,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, + "type": obj.get("type"), "arguments": dict( (_k, Argument.from_dict(_v)) for _k, _v in obj["arguments"].items() diff --git a/paas/tb_paas_client/models/alarm_rule_simple_condition.py b/paas/tb_paas_client/models/simple_alarm_condition.py similarity index 85% rename from paas/tb_paas_client/models/alarm_rule_simple_condition.py rename to paas/tb_paas_client/models/simple_alarm_condition.py index 66c6ca0e..3069e247 100644 --- a/paas/tb_paas_client/models/alarm_rule_simple_condition.py +++ b/paas/tb_paas_client/models/simple_alarm_condition.py @@ -23,15 +23,15 @@ from pydantic import ConfigDict from typing import Any, ClassVar, Dict, List +from tb_paas_client.models.alarm_condition import AlarmCondition from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression -from tb_paas_client.models.alarm_condition_value_alarm_rule_schedule import AlarmConditionValueAlarmRuleSchedule -from tb_paas_client.models.alarm_rule_condition import AlarmRuleCondition +from tb_paas_client.models.alarm_condition_value_alarm_schedule import AlarmConditionValueAlarmSchedule from typing import Optional, Set from typing_extensions import Self -class AlarmRuleSimpleCondition(AlarmRuleCondition): +class SimpleAlarmCondition(AlarmCondition): """ - AlarmRuleSimpleCondition + SimpleAlarmCondition """ # noqa: E501 __properties: ClassVar[List[str]] = ["expression", "schedule", "type"] @@ -58,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleSimpleCondition from a JSON string""" + """Create an instance of SimpleAlarmCondition from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleSimpleCondition from a dict""" + """Create an instance of SimpleAlarmCondition from a dict""" if obj is None: return None @@ -98,7 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "expression": AlarmConditionExpression.from_dict(obj["expression"]) if obj.get("expression") is not None else None, - "schedule": AlarmConditionValueAlarmRuleSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, + "schedule": AlarmConditionValueAlarmSchedule.from_dict(obj["schedule"]) if obj.get("schedule") is not None else None, "type": obj.get("type") }) return _obj diff --git a/paas/tb_paas_client/models/simple_alarm_condition_expression.py b/paas/tb_paas_client/models/simple_alarm_condition_expression.py index 536c4e1d..a6089a02 100644 --- a/paas/tb_paas_client/models/simple_alarm_condition_expression.py +++ b/paas/tb_paas_client/models/simple_alarm_condition_expression.py @@ -25,8 +25,8 @@ from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from tb_paas_client.models.alarm_condition_expression import AlarmConditionExpression -from tb_paas_client.models.alarm_rule_condition_filter import AlarmRuleConditionFilter -from tb_paas_client.models.complex_operation import ComplexOperation +from tb_paas_client.models.alarm_condition_filter import AlarmConditionFilter +from tb_paas_client.models.alarm_rule_complex_operation import AlarmRuleComplexOperation from typing import Optional, Set from typing_extensions import Self @@ -34,8 +34,8 @@ class SimpleAlarmConditionExpression(AlarmConditionExpression): """ SimpleAlarmConditionExpression """ # noqa: E501 - filters: Annotated[List[AlarmRuleConditionFilter], Field(min_length=1)] - operation: Optional[ComplexOperation] = None + filters: Annotated[List[AlarmConditionFilter], Field(min_length=1)] + operation: Optional[AlarmRuleComplexOperation] = None __properties: ClassVar[List[str]] = ["type", "filters", "operation"] model_config = ConfigDict( @@ -102,7 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type"), - "filters": [AlarmRuleConditionFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, + "filters": [AlarmConditionFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None, "operation": obj.get("operation") }) return _obj diff --git a/paas/tb_paas_client/models/simple_alarm_condition_spec.py b/paas/tb_paas_client/models/simple_alarm_condition_spec.py deleted file mode 100644 index 1b4ac1c1..00000000 --- a/paas/tb_paas_client/models/simple_alarm_condition_spec.py +++ /dev/null @@ -1,96 +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. -# -# noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import ConfigDict -from typing import Any, ClassVar, Dict, List -from tb_paas_client.models.alarm_condition_spec import AlarmConditionSpec -from typing import Optional, Set -from typing_extensions import Self - -class SimpleAlarmConditionSpec(AlarmConditionSpec): - """ - SimpleAlarmConditionSpec - """ # noqa: E501 - __properties: ClassVar[List[str]] = ["type"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model""" - return pprint.pformat(self.model_dump(by_alias=False, mode='json')) - - def __str__(self) -> str: - return self.to_str() - - def __repr__(self) -> str: - return self.to_str() - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SimpleAlarmConditionSpec from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SimpleAlarmConditionSpec from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "type": obj.get("type") - }) - return _obj - - diff --git a/paas/tb_paas_client/models/simple_calculated_field_configuration.py b/paas/tb_paas_client/models/simple_calculated_field_configuration.py index 339488f5..08d61dcb 100644 --- a/paas/tb_paas_client/models/simple_calculated_field_configuration.py +++ b/paas/tb_paas_client/models/simple_calculated_field_configuration.py @@ -36,7 +36,7 @@ class SimpleCalculatedFieldConfiguration(CalculatedFieldConfiguration): arguments: Dict[str, Argument] expression: Optional[StrictStr] = None use_latest_ts: Optional[StrictBool] = Field(default=None, serialization_alias="useLatestTs") - __properties: ClassVar[List[str]] = ["type", "output", "arguments", "expression", "useLatestTs"] + __properties: ClassVar[List[str]] = ["output", "type", "arguments", "expression", "useLatestTs"] model_config = ConfigDict( populate_by_name=True, @@ -104,8 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "type": obj.get("type"), "output": Output.from_dict(obj["output"]) if obj.get("output") is not None else None, + "type": obj.get("type"), "arguments": dict( (_k, Argument.from_dict(_v)) for _k, _v in obj["arguments"].items() diff --git a/paas/tb_paas_client/models/solution_data.py b/paas/tb_paas_client/models/solution_data.py new file mode 100644 index 00000000..6ac35b1f --- /dev/null +++ b/paas/tb_paas_client/models/solution_data.py @@ -0,0 +1,113 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from tb_paas_client.models.entity_export_data import EntityExportData +from typing import Optional, Set +from typing_extensions import Self + +class SolutionData(BaseModel): + """ + Portable solution package containing exported entities grouped by type. Represents a self-contained snapshot that can be imported into another tenant. + """ # noqa: E501 + entities: Dict[str, List[EntityExportData]] = Field(description="Exported entities grouped by entity type. Each key is an entity type (e.g. DEVICE_PROFILE, RULE_CHAIN) and the value is a list of entity export data objects.") + __properties: ClassVar[List[str]] = ["entities"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model""" + return pprint.pformat(self.model_dump(by_alias=False, mode='json')) + + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return self.model_dump_json(by_alias=True, exclude_unset=True) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SolutionData from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in entities (dict of array) + _field_dict_of_array = {} + if self.entities: + for _key_entities in self.entities: + if self.entities[_key_entities] is not None: + _field_dict_of_array[_key_entities] = [ + _item.to_dict() for _item in self.entities[_key_entities] + ] + _dict['entities'] = _field_dict_of_array + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SolutionData from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "entities": dict( + (_k, + [EntityExportData.from_dict(_item) for _item in _v] + if _v is not None + else None + ) + for _k, _v in obj.get("entities", {}).items() + ) + }) + return _obj + + diff --git a/paas/tb_paas_client/models/alarm_rule_condition_filter.py b/paas/tb_paas_client/models/solution_export_request.py similarity index 63% rename from paas/tb_paas_client/models/alarm_rule_condition_filter.py rename to paas/tb_paas_client/models/solution_export_request.py index 61e10b57..52bdc8a9 100644 --- a/paas/tb_paas_client/models/alarm_rule_condition_filter.py +++ b/paas/tb_paas_client/models/solution_export_request.py @@ -23,22 +23,18 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from tb_paas_client.models.alarm_rule_key_filter_predicate import AlarmRuleKeyFilterPredicate -from tb_paas_client.models.complex_operation import ComplexOperation -from tb_paas_client.models.entity_key_value_type import EntityKeyValueType +from tb_paas_client.models.entity_export_settings import EntityExportSettings +from tb_paas_client.models.entity_id import EntityId from typing import Optional, Set from typing_extensions import Self -class AlarmRuleConditionFilter(BaseModel): +class SolutionExportRequest(BaseModel): """ - AlarmRuleConditionFilter + Solution export request specifying which entities to include and export settings. """ # noqa: E501 - argument: Annotated[str, Field(min_length=1, strict=True)] - operation: Optional[ComplexOperation] = None - predicates: Annotated[List[AlarmRuleKeyFilterPredicate], Field(min_length=1)] - value_type: EntityKeyValueType = Field(serialization_alias="valueType") - __properties: ClassVar[List[str]] = ["argument", "operation", "predicates", "valueType"] + entity_ids: Optional[List[EntityId]] = Field(default=None, serialization_alias="entityIds") + settings: Optional[EntityExportSettings] = Field(default=None, description="Optional export settings controlling what additional data is included (relations, attributes, credentials, etc.). If not specified, default settings will be used that include all available data.") + __properties: ClassVar[List[str]] = ["entityIds", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -63,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleConditionFilter from a JSON string""" + """Create an instance of SolutionExportRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,18 +80,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in predicates (list) + # override the default output from pydantic by calling `to_dict()` of each item in entity_ids (list) _items = [] - if self.predicates: - for _item_predicates in self.predicates: - if _item_predicates: - _items.append(_item_predicates.to_dict()) - _dict['predicates'] = _items + if self.entity_ids: + for _item_entity_ids in self.entity_ids: + if _item_entity_ids: + _items.append(_item_entity_ids.to_dict()) + _dict['entityIds'] = _items + # override the default output from pydantic by calling `to_dict()` of settings + if self.settings: + _dict['settings'] = self.settings.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleConditionFilter from a dict""" + """Create an instance of SolutionExportRequest from a dict""" if obj is None: return None @@ -103,10 +102,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "argument": obj.get("argument"), - "operation": obj.get("operation"), - "predicates": [AlarmRuleKeyFilterPredicate.from_dict(_item) for _item in obj["predicates"]] if obj.get("predicates") is not None else None, - "value_type": obj.get("valueType") + "entity_ids": [EntityId.from_dict(_item) for _item in obj["entityIds"]] if obj.get("entityIds") is not None else None, + "settings": EntityExportSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None }) return _obj diff --git a/paas/tb_paas_client/models/filter_predicate_value_integer.py b/paas/tb_paas_client/models/solution_export_response.py similarity index 68% rename from paas/tb_paas_client/models/filter_predicate_value_integer.py rename to paas/tb_paas_client/models/solution_export_response.py index 0ead656f..601d88b2 100644 --- a/paas/tb_paas_client/models/filter_predicate_value_integer.py +++ b/paas/tb_paas_client/models/solution_export_response.py @@ -21,20 +21,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.dynamic_value_integer import DynamicValueInteger +from tb_paas_client.models.solution_data import SolutionData from typing import Optional, Set from typing_extensions import Self -class FilterPredicateValueInteger(BaseModel): +class SolutionExportResponse(BaseModel): """ - FilterPredicateValueInteger + Solution export response containing the exported solution data and any dependency warnings. """ # noqa: E501 - default_value: Optional[StrictInt] = Field(default=None, serialization_alias="defaultValue") - user_value: Optional[StrictInt] = Field(default=None, serialization_alias="userValue") - dynamic_value: Optional[DynamicValueInteger] = Field(default=None, serialization_alias="dynamicValue") - __properties: ClassVar[List[str]] = ["defaultValue", "userValue", "dynamicValue"] + solution: Optional[SolutionData] = Field(default=None, description="The exported solution data containing all requested entities grouped by type.") + warnings: Optional[List[StrictStr]] = Field(default=None, description="List of dependency warnings. Generated when exported entities reference other entities that are not included in the export (e.g. a device profile references a rule chain that was not selected for export).") + __properties: ClassVar[List[str]] = ["solution", "warnings"] model_config = ConfigDict( populate_by_name=True, @@ -59,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FilterPredicateValueInteger from a JSON string""" + """Create an instance of SolutionExportResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,14 +79,14 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of dynamic_value - if self.dynamic_value: - _dict['dynamicValue'] = self.dynamic_value.to_dict() + # override the default output from pydantic by calling `to_dict()` of solution + if self.solution: + _dict['solution'] = self.solution.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FilterPredicateValueInteger from a dict""" + """Create an instance of SolutionExportResponse from a dict""" if obj is None: return None @@ -95,9 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "default_value": obj.get("defaultValue"), - "user_value": obj.get("userValue"), - "dynamic_value": DynamicValueInteger.from_dict(obj["dynamicValue"]) if obj.get("dynamicValue") is not None else None + "solution": SolutionData.from_dict(obj["solution"]) if obj.get("solution") is not None else None, + "warnings": obj.get("warnings") }) return _obj diff --git a/paas/tb_paas_client/models/alarm_rule_custom_time_schedule_item.py b/paas/tb_paas_client/models/solution_import_result.py similarity index 71% rename from paas/tb_paas_client/models/alarm_rule_custom_time_schedule_item.py rename to paas/tb_paas_client/models/solution_import_result.py index 956c9cb4..45010929 100644 --- a/paas/tb_paas_client/models/alarm_rule_custom_time_schedule_item.py +++ b/paas/tb_paas_client/models/solution_import_result.py @@ -23,18 +23,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List, Optional +from uuid import UUID from typing import Optional, Set from typing_extensions import Self -class AlarmRuleCustomTimeScheduleItem(BaseModel): +class SolutionImportResult(BaseModel): """ - AlarmRuleCustomTimeScheduleItem + Result of a solution import operation. """ # noqa: E501 - day_of_week: Optional[StrictInt] = Field(default=None, serialization_alias="dayOfWeek") - enabled: Optional[StrictBool] = None - ends_on: Optional[StrictInt] = Field(default=None, serialization_alias="endsOn") - starts_on: Optional[StrictInt] = Field(default=None, serialization_alias="startsOn") - __properties: ClassVar[List[str]] = ["dayOfWeek", "enabled", "endsOn", "startsOn"] + success: Optional[StrictBool] = Field(default=None, description="'true' if all entities were imported successfully.") + created: Optional[Dict[str, StrictInt]] = Field(default=None, description="Number of newly created entities per entity type. Entity types with zero created entities are omitted.") + id_mapping: Optional[Dict[str, UUID]] = Field(default=None, description="Mapping from external entity IDs (as they appear in the solution file) to the internal entity IDs assigned during import.", serialization_alias="idMapping") + __properties: ClassVar[List[str]] = ["success", "created", "idMapping"] model_config = ConfigDict( populate_by_name=True, @@ -59,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AlarmRuleCustomTimeScheduleItem from a JSON string""" + """Create an instance of SolutionImportResult from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AlarmRuleCustomTimeScheduleItem from a dict""" + """Create an instance of SolutionImportResult from a dict""" if obj is None: return None @@ -92,10 +92,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "day_of_week": obj.get("dayOfWeek"), - "enabled": obj.get("enabled"), - "ends_on": obj.get("endsOn"), - "starts_on": obj.get("startsOn") + "success": obj.get("success"), + "created": obj.get("created"), + "id_mapping": obj.get("idMapping") }) return _obj diff --git a/paas/tb_paas_client/models/dynamic_value_integer.py b/paas/tb_paas_client/models/solution_validation_result.py similarity index 65% rename from paas/tb_paas_client/models/dynamic_value_integer.py rename to paas/tb_paas_client/models/solution_validation_result.py index fcab06d0..88959f57 100644 --- a/paas/tb_paas_client/models/dynamic_value_integer.py +++ b/paas/tb_paas_client/models/solution_validation_result.py @@ -23,19 +23,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.dynamic_value_source_type import DynamicValueSourceType from typing import Optional, Set from typing_extensions import Self -class DynamicValueInteger(BaseModel): +class SolutionValidationResult(BaseModel): """ - DynamicValueInteger + Result of a solution validation (dry-run). Checks structural validity and dependency references without modifying any data. """ # noqa: E501 - resolved_value: Optional[StrictInt] = Field(default=None, serialization_alias="resolvedValue") - source_type: Optional[DynamicValueSourceType] = Field(default=None, serialization_alias="sourceType") - source_attribute: Optional[StrictStr] = Field(default=None, serialization_alias="sourceAttribute") - inherit: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["resolvedValue", "sourceType", "sourceAttribute", "inherit"] + valid: Optional[StrictBool] = Field(default=None, description="'true' if the solution can be imported without errors. 'false' if there are structural issues (empty entities, unsupported types, malformed data).") + entity_summary: Optional[Dict[str, StrictInt]] = Field(default=None, description="Number of entities per type found in the solution file.", serialization_alias="entitySummary") + conflicts: Optional[List[StrictStr]] = Field(default=None, description="List of blocking issues that would prevent import (e.g. unsupported entity types, missing or malformed entity data).") + warnings: Optional[List[StrictStr]] = Field(default=None, description="List of non-blocking warnings (e.g. missing dependency references).") + __properties: ClassVar[List[str]] = ["valid", "entitySummary", "conflicts", "warnings"] model_config = ConfigDict( populate_by_name=True, @@ -60,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DynamicValueInteger from a JSON string""" + """Create an instance of SolutionValidationResult from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -85,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DynamicValueInteger from a dict""" + """Create an instance of SolutionValidationResult from a dict""" if obj is None: return None @@ -93,10 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "resolved_value": obj.get("resolvedValue"), - "source_type": obj.get("sourceType"), - "source_attribute": obj.get("sourceAttribute"), - "inherit": obj.get("inherit") + "valid": obj.get("valid"), + "entity_summary": obj.get("entitySummary"), + "conflicts": obj.get("conflicts"), + "warnings": obj.get("warnings") }) return _obj diff --git a/paas/tb_paas_client/models/specific_time_schedule.py b/paas/tb_paas_client/models/specific_time_schedule.py index 8b511b45..d850cbb5 100644 --- a/paas/tb_paas_client/models/specific_time_schedule.py +++ b/paas/tb_paas_client/models/specific_time_schedule.py @@ -24,8 +24,6 @@ from pydantic import ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from tb_paas_client.models.alarm_schedule import AlarmSchedule -from tb_paas_client.models.alarm_schedule_type import AlarmScheduleType -from tb_paas_client.models.dynamic_value_string import DynamicValueString from typing import Optional, Set from typing_extensions import Self @@ -33,11 +31,11 @@ class SpecificTimeSchedule(AlarmSchedule): """ SpecificTimeSchedule """ # noqa: E501 + timezone: Optional[StrictStr] = None days_of_week: Optional[List[StrictInt]] = Field(default=None, serialization_alias="daysOfWeek") - ends_on: Optional[StrictInt] = Field(default=None, serialization_alias="endsOn") starts_on: Optional[StrictInt] = Field(default=None, serialization_alias="startsOn") - timezone: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["dynamicValue", "type", "daysOfWeek", "endsOn", "startsOn", "timezone"] + ends_on: Optional[StrictInt] = Field(default=None, serialization_alias="endsOn") + __properties: ClassVar[List[str]] = ["type", "timezone", "daysOfWeek", "startsOn", "endsOn"] model_config = ConfigDict( populate_by_name=True, @@ -83,9 +81,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of dynamic_value - if self.dynamic_value: - _dict['dynamicValue'] = self.dynamic_value.to_dict() return _dict @classmethod @@ -98,12 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "dynamic_value": DynamicValueString.from_dict(obj["dynamicValue"]) if obj.get("dynamicValue") is not None else None, "type": obj.get("type"), + "timezone": obj.get("timezone"), "days_of_week": obj.get("daysOfWeek"), - "ends_on": obj.get("endsOn"), "starts_on": obj.get("startsOn"), - "timezone": obj.get("timezone") + "ends_on": obj.get("endsOn") }) return _obj diff --git a/paas/tb_paas_client/models/table_sort_direction.py b/paas/tb_paas_client/models/table_sort_direction.py new file mode 100644 index 00000000..946aebf9 --- /dev/null +++ b/paas/tb_paas_client/models/table_sort_direction.py @@ -0,0 +1,41 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TableSortDirection(str, Enum): + """ + TableSortDirection + """ + + """ + allowed enum values + """ + ASC = 'ASC' + DESC = 'DESC' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TableSortDirection from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/paas/tb_paas_client/models/table_sort_order.py b/paas/tb_paas_client/models/table_sort_order.py index e6216e12..8a41d222 100644 --- a/paas/tb_paas_client/models/table_sort_order.py +++ b/paas/tb_paas_client/models/table_sort_order.py @@ -23,7 +23,7 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from tb_paas_client.models.direction import Direction +from tb_paas_client.models.table_sort_direction import TableSortDirection from typing import Optional, Set from typing_extensions import Self @@ -32,7 +32,7 @@ class TableSortOrder(BaseModel): TableSortOrder """ # noqa: E501 column: Optional[StrictStr] = None - direction: Optional[Direction] = None + direction: Optional[TableSortDirection] = None __properties: ClassVar[List[str]] = ["column", "direction"] model_config = ConfigDict( diff --git a/paas/tb_paas_client/models/task_result.py b/paas/tb_paas_client/models/task_result.py index 788e593a..03d5d6dc 100644 --- a/paas/tb_paas_client/models/task_result.py +++ b/paas/tb_paas_client/models/task_result.py @@ -41,8 +41,9 @@ class TaskResult(BaseModel): success: Optional[StrictBool] = None discarded: Optional[StrictBool] = None finish_ts: Optional[StrictInt] = Field(default=None, serialization_alias="finishTs") + error: Optional[StrictStr] = None job_type: StrictStr = Field(serialization_alias="jobType") - __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "jobType"] + __properties: ClassVar[List[str]] = ["key", "success", "discarded", "finishTs", "error", "jobType"] model_config = ConfigDict( populate_by_name=True, diff --git a/paas/tb_paas_client/models/time_series_output.py b/paas/tb_paas_client/models/time_series_output.py index b20a9fbd..5c16aa26 100644 --- a/paas/tb_paas_client/models/time_series_output.py +++ b/paas/tb_paas_client/models/time_series_output.py @@ -34,7 +34,7 @@ class TimeSeriesOutput(Output): TimeSeriesOutput """ # noqa: E501 strategy: Optional[TimeSeriesOutputStrategy] = None - __properties: ClassVar[List[str]] = ["name", "scope", "decimalsByDefault", "strategy", "type"] + __properties: ClassVar[List[str]] = ["decimalsByDefault", "name", "scope", "strategy", "type"] model_config = ConfigDict( populate_by_name=True, @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "decimals_by_default": obj.get("decimalsByDefault"), "name": obj.get("name"), "scope": obj.get("scope"), - "decimals_by_default": obj.get("decimalsByDefault"), "strategy": TimeSeriesOutputStrategy.from_dict(obj["strategy"]) if obj.get("strategy") is not None else None, "type": obj.get("type") }) diff --git a/pe/docs/AiChatControllerApi.md b/pe/docs/AiChatControllerApi.md new file mode 100644 index 00000000..a1bbb19b --- /dev/null +++ b/pe/docs/AiChatControllerApi.md @@ -0,0 +1,148 @@ +# AiChatControllerApi + +`ThingsboardClient` methods: + +```python +object client.create_chat(body: object) # createChat +None client.delete_chat(chat_id: UUID) # deleteChat +object client.get_chat_messages(chat_id: UUID) # getChatMessages +object client.list_chats(chat_type: ChatType) # listChats +List[object] client.send_chat_message(chat_id: UUID, x_authorization: str, body: str) # sendChatMessage +None client.update_chat(chat_id: UUID, body: object) # updateChat +``` + + +## create_chat + +```python +object client.create_chat(body: object) +``` + +**POST** `/api/ai/chats` + +createChat + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **object** | | | + +### Return type + +**object** + + +## delete_chat + +```python +None client.delete_chat(chat_id: UUID) +``` + +**DELETE** `/api/ai/chats/{chatId}` + +deleteChat + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chat_id** | **UUID** | | | + +### Return type + +None (empty response body) + + +## get_chat_messages + +```python +object client.get_chat_messages(chat_id: UUID) +``` + +**GET** `/api/ai/chats/{chatId}/messages` + +getChatMessages + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chat_id** | **UUID** | | | + +### Return type + +**object** + + +## list_chats + +```python +object client.list_chats(chat_type: ChatType) +``` + +**GET** `/api/ai/chats/{chatType}` + +listChats + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chat_type** | **ChatType** | | [enum: GENERIC, SOLUTION_BUILDER] | + +### Return type + +**object** + + +## send_chat_message + +```python +List[object] client.send_chat_message(chat_id: UUID, x_authorization: str, body: str) +``` + +**POST** `/api/ai/chats/{chatId}/messages` + +sendChatMessage + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chat_id** | **UUID** | | | +| **x_authorization** | **str** | | | +| **body** | **str** | | | + +### Return type + +**List[object]** + + +## update_chat + +```python +None client.update_chat(chat_id: UUID, body: object) +``` + +**PATCH** `/api/ai/chats/{chatId}` + +updateChat + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **chat_id** | **UUID** | | | +| **body** | **object** | | | + +### Return type + +None (empty response body) + diff --git a/pe/docs/AiSolutionControllerApi.md b/pe/docs/AiSolutionControllerApi.md new file mode 100644 index 00000000..41c5bf18 --- /dev/null +++ b/pe/docs/AiSolutionControllerApi.md @@ -0,0 +1,230 @@ +# AiSolutionControllerApi + +`ThingsboardClient` methods: + +```python +object client.chat(solution_id: UUID, step: SolutionStep, body: str) # chat +None client.clear_step(solution_id: UUID, step: SolutionStep) # clearStep +object client.create_solution(solution_id: UUID) # createSolution +None client.delete_solution(solution_id: UUID) # deleteSolution +object client.get_solution(solution_id: UUID) # getSolution +object client.get_solutions() # getSolutions +object client.install_solution(solution_id: UUID, x_authorization: str) # installSolution +object client.start_new() # startNew +object client.uninstall_solution(solution_id: UUID, x_authorization: str) # uninstallSolution +object client.update_data(solution_id: UUID, data_key: str, body: object) # updateData +``` + + +## chat + +```python +object client.chat(solution_id: UUID, step: SolutionStep, body: str) +``` + +**POST** `/api/ai/solution/{solutionId}/{step}/chat` + +chat + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | +| **step** | **SolutionStep** | | [enum: INITIAL_CONFIGURATION, DASHBOARDS_CONFIGURATION] | +| **body** | **str** | | | + +### Return type + +**object** + + +## clear_step + +```python +None client.clear_step(solution_id: UUID, step: SolutionStep) +``` + +**DELETE** `/api/ai/solution/{solutionId}/{step}/clear` + +clearStep + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | +| **step** | **SolutionStep** | | [enum: INITIAL_CONFIGURATION, DASHBOARDS_CONFIGURATION] | + +### Return type + +None (empty response body) + + +## create_solution + +```python +object client.create_solution(solution_id: UUID) +``` + +**POST** `/api/ai/solution/{solutionId}/create` + +createSolution + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | + +### Return type + +**object** + + +## delete_solution + +```python +None client.delete_solution(solution_id: UUID) +``` + +**DELETE** `/api/ai/solution/{solutionId}` + +deleteSolution + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | + +### Return type + +None (empty response body) + + +## get_solution + +```python +object client.get_solution(solution_id: UUID) +``` + +**GET** `/api/ai/solution/{solutionId}` + +getSolution + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | + +### Return type + +**object** + + +## get_solutions + +```python +object client.get_solutions() +``` + +**GET** `/api/ai/solution/infos` + +getSolutions + +### Return type + +**object** + + +## install_solution + +```python +object client.install_solution(solution_id: UUID, x_authorization: str) +``` + +**POST** `/api/ai/solution/{solutionId}/install` + +installSolution + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | +| **x_authorization** | **str** | | | + +### Return type + +**object** + + +## start_new + +```python +object client.start_new() +``` + +**POST** `/api/ai/solution/start` + +startNew + +### Return type + +**object** + + +## uninstall_solution + +```python +object client.uninstall_solution(solution_id: UUID, x_authorization: str) +``` + +**DELETE** `/api/ai/solution/{solutionId}/uninstall` + +uninstallSolution + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | +| **x_authorization** | **str** | | | + +### Return type + +**object** + + +## update_data + +```python +object client.update_data(solution_id: UUID, data_key: str, body: object) +``` + +**PUT** `/api/ai/solution/{solutionId}/{dataKey}` + +updateData + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **solution_id** | **UUID** | | | +| **data_key** | **str** | | | +| **body** | **object** | | | + +### Return type + +**object** + diff --git a/pe/docs/AiToolControllerApi.md b/pe/docs/AiToolControllerApi.md new file mode 100644 index 00000000..2ff78fae --- /dev/null +++ b/pe/docs/AiToolControllerApi.md @@ -0,0 +1,30 @@ +# AiToolControllerApi + +`ThingsboardClient` methods: + +```python +object client.resolve_tool_approval(body: object) # resolveToolApproval +``` + + +## resolve_tool_approval + +```python +object client.resolve_tool_approval(body: object) +``` + +**POST** `/api/ai/tools/resolve-approval` + +resolveToolApproval + + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **object** | | | + +### Return type + +**object** + diff --git a/pe/docs/AllowedPermissionsInfo.md b/pe/docs/AllowedPermissionsInfo.md index e345f7fe..bed6de90 100644 --- a/pe/docs/AllowedPermissionsInfo.md +++ b/pe/docs/AllowedPermissionsInfo.md @@ -25,7 +25,7 @@ `ALL` | `CREATE` | `READ` | `WRITE` | `DELETE` | `RPC_CALL` | `READ_CREDENTIALS` | `WRITE_CREDENTIALS` | `READ_ATTRIBUTES` | `WRITE_ATTRIBUTES` | … (21 values total) #### Resource (enum) -`ALL` | `PROFILE` | `ADMIN_SETTINGS` | `ALARM` | `DEVICE` | `ASSET` | `CUSTOMER` | `DASHBOARD` | `ENTITY_VIEW` | `EDGE` | … (53 values total) +`ALL` | `PROFILE` | `ADMIN_SETTINGS` | `ALARM` | `DEVICE` | `ASSET` | `CUSTOMER` | `DASHBOARD` | `ENTITY_VIEW` | `EDGE` | … (54 values total) #### MergedUserPermissions | Name | Type | Description | Notes | diff --git a/pe/docs/ApiFeature.md b/pe/docs/ApiFeature.md index ccfb24c4..88cce8b4 100644 --- a/pe/docs/ApiFeature.md +++ b/pe/docs/ApiFeature.md @@ -24,6 +24,8 @@ * `REPORT` (value: `'REPORT'`) +* `AI` (value: `'AI'`) + --- diff --git a/pe/docs/ApiUsageLimitNotificationRuleTriggerConfig.md b/pe/docs/ApiUsageLimitNotificationRuleTriggerConfig.md index 917ac9a7..a1ab2b7e 100644 --- a/pe/docs/ApiUsageLimitNotificationRuleTriggerConfig.md +++ b/pe/docs/ApiUsageLimitNotificationRuleTriggerConfig.md @@ -22,7 +22,7 @@ | trigger_type | NotificationRuleTriggerType | | | #### ApiFeature (enum) -`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` +`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` | `AI` #### ApiUsageStateValue (enum) `ENABLED` | `WARNING` | `DISABLED` diff --git a/pe/docs/AvailableEntityKeysV2.md b/pe/docs/AvailableEntityKeysV2.md index c5e2a1a3..f4e3ee91 100644 --- a/pe/docs/AvailableEntityKeysV2.md +++ b/pe/docs/AvailableEntityKeysV2.md @@ -9,6 +9,7 @@ Contains unique time series and attribute key names discovered from entities mat | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +| **total_entities** | **int** | Total number of entities that matched the query filter. | | | **entity_types** | [**List[EntityType]**](EntityType.md) | Set of entity types found among the matched entities. | | | **timeseries** | [**List[KeyInfo]**](KeyInfo.md) | | [optional] | | **attributes** | **Dict[str, List[KeyInfo]]** | Map of attribute scope to the list of unique attribute keys available on the matched entities. Only scopes supported by the matched entity types are included. Omitted when attribute keys were not requested or when none of the requested scopes apply to the matched entity types. | [optional] | @@ -37,7 +38,7 @@ Contains unique time series and attribute key names discovered from entities mat ### Conventions - **Package:** `tb_pe_client.models` -- **Attribute access:** `obj.entity_types`, `obj.name`, etc. +- **Attribute access:** `obj.total_entities`, `obj.name`, etc. - **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON - **Deserialize:** `AvailableEntityKeysV2.model_validate(data)` or `AvailableEntityKeysV2.model_validate_json(json_str)` - **None fields:** Optional attributes default to `None`; accessing them never raises exceptions diff --git a/pe/docs/ChatType.md b/pe/docs/ChatType.md new file mode 100644 index 00000000..a0648fb0 --- /dev/null +++ b/pe/docs/ChatType.md @@ -0,0 +1,24 @@ + +# ChatType + +`tb_pe_client.models.ChatType` + +## Enum Values + + +* `GENERIC` (value: `'GENERIC'`) + +* `SOLUTION_BUILDER` (value: `'SOLUTION_BUILDER'`) + + + +--- + +### Conventions + +- **Package:** `tb_pe_client.models` +- **Attribute access:** `obj.`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `ChatType.model_validate(data)` or `ChatType.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/pe/docs/DefaultTenantProfileConfiguration.md b/pe/docs/DefaultTenantProfileConfiguration.md index 0a878d56..f66d8630 100644 --- a/pe/docs/DefaultTenantProfileConfiguration.md +++ b/pe/docs/DefaultTenantProfileConfiguration.md @@ -55,6 +55,7 @@ | **max_sms** | **int** | | [optional] | | **max_created_alarms** | **int** | | [optional] | | **max_generated_reports** | **int** | | [optional] | +| **max_ai_credits** | **int** | | [optional] | | **tenant_server_rest_limits_configuration** | **str** | | [optional] | | **customer_server_rest_limits_configuration** | **str** | | [optional] | | **max_ws_sessions_per_tenant** | **int** | | [optional] | @@ -96,6 +97,7 @@ | **intermediate_aggregation_interval_in_sec_for_cf** | **int** | | [optional] | | **cf_reevaluation_check_interval** | **int** | | [optional] | | **alarms_reevaluation_interval** | **int** | | [optional] | +| **ai_chat_requests_per_tenant_rate_limit** | **str** | | [optional] | diff --git a/pe/docs/LimitedApi.md b/pe/docs/LimitedApi.md index 82eacfb8..1627fd0e 100644 --- a/pe/docs/LimitedApi.md +++ b/pe/docs/LimitedApi.md @@ -76,6 +76,8 @@ * `TRENDZ_PUBLIC_SYNC` (value: `'TRENDZ_PUBLIC_SYNC'`) +* `AI_CHAT_REQUESTS` (value: `'AI_CHAT_REQUESTS'`) + --- diff --git a/pe/docs/NotificationRule.md b/pe/docs/NotificationRule.md index acba4e19..a10d1b7e 100644 --- a/pe/docs/NotificationRule.md +++ b/pe/docs/NotificationRule.md @@ -243,13 +243,13 @@ `ASSIGNED` | `UNASSIGNED` #### ApiFeature (enum) -`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` +`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` | `AI` #### ApiUsageStateValue (enum) `ENABLED` | `WARNING` | `DISABLED` #### LimitedApi (enum) -`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (35 values total) +`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (36 values total) #### EdgeConnectivityEvent (enum) `CONNECTED` | `DISCONNECTED` diff --git a/pe/docs/NotificationRuleInfo.md b/pe/docs/NotificationRuleInfo.md index 82a5fa5a..fbbe6a00 100644 --- a/pe/docs/NotificationRuleInfo.md +++ b/pe/docs/NotificationRuleInfo.md @@ -248,13 +248,13 @@ `ASSIGNED` | `UNASSIGNED` #### ApiFeature (enum) -`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` +`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` | `AI` #### ApiUsageStateValue (enum) `ENABLED` | `WARNING` | `DISABLED` #### LimitedApi (enum) -`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (35 values total) +`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (36 values total) #### EdgeConnectivityEvent (enum) `CONNECTED` | `DISCONNECTED` diff --git a/pe/docs/NotificationRuleTriggerConfig.md b/pe/docs/NotificationRuleTriggerConfig.md index e21d0fdc..b4479dbe 100644 --- a/pe/docs/NotificationRuleTriggerConfig.md +++ b/pe/docs/NotificationRuleTriggerConfig.md @@ -137,7 +137,7 @@ Configuration for notification rule trigger `ASSIGNED` | `UNASSIGNED` #### ApiFeature (enum) -`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` +`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` | `AI` #### ApiUsageStateValue (enum) `ENABLED` | `WARNING` | `DISABLED` @@ -158,7 +158,7 @@ Configuration for notification rule trigger `CREATED` | `STARTED` | `ACTIVATED` | `SUSPENDED` | `UPDATED` | `STOPPED` | `DELETED` | `FAILED` | `DEACTIVATED` | `RELATION_UPDATED` | … (11 values total) #### LimitedApi (enum) -`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (35 values total) +`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (36 values total) --- diff --git a/pe/docs/PageDataNotificationRuleInfo.md b/pe/docs/PageDataNotificationRuleInfo.md index 7fefaaf0..a5729817 100644 --- a/pe/docs/PageDataNotificationRuleInfo.md +++ b/pe/docs/PageDataNotificationRuleInfo.md @@ -256,13 +256,13 @@ `ASSIGNED` | `UNASSIGNED` #### ApiFeature (enum) -`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` +`TRANSPORT` | `DB` | `RE` | `JS` | `TBEL` | `EMAIL` | `SMS` | `ALARM` | `REPORT` | `AI` #### ApiUsageStateValue (enum) `ENABLED` | `WARNING` | `DISABLED` #### LimitedApi (enum) -`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (35 values total) +`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (36 values total) #### EdgeConnectivityEvent (enum) `CONNECTED` | `DISCONNECTED` diff --git a/pe/docs/PageDataTenantProfile.md b/pe/docs/PageDataTenantProfile.md index d8b4987e..7c12a206 100644 --- a/pe/docs/PageDataTenantProfile.md +++ b/pe/docs/PageDataTenantProfile.md @@ -89,6 +89,7 @@ | max_sms | int | | [optional] | | max_created_alarms | int | | [optional] | | max_generated_reports | int | | [optional] | +| max_ai_credits | int | | [optional] | | tenant_server_rest_limits_configuration | str | | [optional] | | customer_server_rest_limits_configuration | str | | [optional] | | max_ws_sessions_per_tenant | int | | [optional] | @@ -130,6 +131,7 @@ | intermediate_aggregation_interval_in_sec_for_cf | int | | [optional] | | cf_reevaluation_check_interval | int | | [optional] | | alarms_reevaluation_interval | int | | [optional] | +| ai_chat_requests_per_tenant_rate_limit | str | | [optional] | #### TenantProfileQueueConfiguration | Name | Type | Description | Notes | diff --git a/pe/docs/RateLimitsNotificationRuleTriggerConfig.md b/pe/docs/RateLimitsNotificationRuleTriggerConfig.md index 8c07f449..b7e537a4 100644 --- a/pe/docs/RateLimitsNotificationRuleTriggerConfig.md +++ b/pe/docs/RateLimitsNotificationRuleTriggerConfig.md @@ -21,7 +21,7 @@ | trigger_type | NotificationRuleTriggerType | | | #### LimitedApi (enum) -`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (35 values total) +`ENTITY_EXPORT` | `ENTITY_IMPORT` | `NOTIFICATION_REQUESTS` | `NOTIFICATION_REQUESTS_PER_RULE` | `REST_REQUESTS_PER_TENANT` | `REST_REQUESTS_PER_CUSTOMER` | `WS_UPDATES_PER_SESSION` | `CASSANDRA_WRITE_QUERIES_CORE` | `CASSANDRA_READ_QUERIES_CORE` | `CASSANDRA_WRITE_QUERIES_RULE_ENGINE` | … (36 values total) #### NotificationRuleTriggerType (enum) `ENTITY_ACTION` | `ALARM` | `ALARM_COMMENT` | `ALARM_ASSIGNMENT` | `DEVICE_ACTIVITY` | `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT` | `INTEGRATION_LIFECYCLE_EVENT` | `EDGE_CONNECTION` | `EDGE_COMMUNICATION_FAILURE` | `NEW_PLATFORM_VERSION` | … (15 values total) diff --git a/pe/docs/Resource.md b/pe/docs/Resource.md index 72a9c6c9..cd355484 100644 --- a/pe/docs/Resource.md +++ b/pe/docs/Resource.md @@ -110,6 +110,8 @@ * `AI_MODEL` (value: `'AI_MODEL'`) +* `AI` (value: `'AI'`) + * `API_KEY` (value: `'API_KEY'`) diff --git a/pe/docs/SolutionStep.md b/pe/docs/SolutionStep.md new file mode 100644 index 00000000..ebbcd622 --- /dev/null +++ b/pe/docs/SolutionStep.md @@ -0,0 +1,24 @@ + +# SolutionStep + +`tb_pe_client.models.SolutionStep` + +## Enum Values + + +* `INITIAL_CONFIGURATION` (value: `'INITIAL_CONFIGURATION'`) + +* `DASHBOARDS_CONFIGURATION` (value: `'DASHBOARDS_CONFIGURATION'`) + + + +--- + +### Conventions + +- **Package:** `tb_pe_client.models` +- **Attribute access:** `obj.`, `obj.name`, etc. +- **Serialize:** `obj.model_dump()` or `obj.model_dump(by_alias=True)` for camelCase JSON +- **Deserialize:** `SolutionStep.model_validate(data)` or `SolutionStep.model_validate_json(json_str)` +- **None fields:** Optional attributes default to `None`; accessing them never raises exceptions + diff --git a/pe/docs/TenantProfile.md b/pe/docs/TenantProfile.md index 92b6e3e1..56debc1e 100644 --- a/pe/docs/TenantProfile.md +++ b/pe/docs/TenantProfile.md @@ -83,6 +83,7 @@ A JSON value representing the tenant profile. | max_sms | int | | [optional] | | max_created_alarms | int | | [optional] | | max_generated_reports | int | | [optional] | +| max_ai_credits | int | | [optional] | | tenant_server_rest_limits_configuration | str | | [optional] | | customer_server_rest_limits_configuration | str | | [optional] | | max_ws_sessions_per_tenant | int | | [optional] | @@ -124,6 +125,7 @@ A JSON value representing the tenant profile. | intermediate_aggregation_interval_in_sec_for_cf | int | | [optional] | | cf_reevaluation_check_interval | int | | [optional] | | alarms_reevaluation_interval | int | | [optional] | +| ai_chat_requests_per_tenant_rate_limit | str | | [optional] | #### TenantProfileQueueConfiguration | Name | Type | Description | Notes | diff --git a/pe/docs/TenantProfileConfiguration.md b/pe/docs/TenantProfileConfiguration.md index 217bdb1f..5b1df021 100644 --- a/pe/docs/TenantProfileConfiguration.md +++ b/pe/docs/TenantProfileConfiguration.md @@ -62,6 +62,7 @@ | max_sms | int | | [optional] | | max_created_alarms | int | | [optional] | | max_generated_reports | int | | [optional] | +| max_ai_credits | int | | [optional] | | tenant_server_rest_limits_configuration | str | | [optional] | | customer_server_rest_limits_configuration | str | | [optional] | | max_ws_sessions_per_tenant | int | | [optional] | @@ -103,6 +104,7 @@ | intermediate_aggregation_interval_in_sec_for_cf | int | | [optional] | | cf_reevaluation_check_interval | int | | [optional] | | alarms_reevaluation_interval | int | | [optional] | +| ai_chat_requests_per_tenant_rate_limit | str | | [optional] | --- diff --git a/pe/docs/TenantProfileData.md b/pe/docs/TenantProfileData.md index 44f20398..fae93a66 100644 --- a/pe/docs/TenantProfileData.md +++ b/pe/docs/TenantProfileData.md @@ -68,6 +68,7 @@ | max_sms | int | | [optional] | | max_created_alarms | int | | [optional] | | max_generated_reports | int | | [optional] | +| max_ai_credits | int | | [optional] | | tenant_server_rest_limits_configuration | str | | [optional] | | customer_server_rest_limits_configuration | str | | [optional] | | max_ws_sessions_per_tenant | int | | [optional] | @@ -109,6 +110,7 @@ | intermediate_aggregation_interval_in_sec_for_cf | int | | [optional] | | cf_reevaluation_check_interval | int | | [optional] | | alarms_reevaluation_interval | int | | [optional] | +| ai_chat_requests_per_tenant_rate_limit | str | | [optional] | #### TenantProfileQueueConfiguration | Name | Type | Description | Notes | diff --git a/pe/docs/UsageInfo.md b/pe/docs/UsageInfo.md index 3f2c3393..de7acf65 100644 --- a/pe/docs/UsageInfo.md +++ b/pe/docs/UsageInfo.md @@ -34,6 +34,8 @@ | **max_alarms** | **int** | | [optional] | | **reports** | **int** | | [optional] | | **max_reports** | **int** | | [optional] | +| **ai_credits** | **int** | | [optional] | +| **max_ai_credits** | **int** | | [optional] | diff --git a/pe/spec/openapi.json b/pe/spec/openapi.json index dbf604fd..10e3e06a 100644 --- a/pe/spec/openapi.json +++ b/pe/spec/openapi.json @@ -12,7 +12,7 @@ "name": "Apache License Version 2.0", "url": "https://github.com/thingsboard/thingsboard/blob/master/LICENSE" }, - "version": "4.3.1.2PE-SNAPSHOT" + "version": "4.3.1.2PE" }, "servers": [ { @@ -25,10 +25,22 @@ "name": "admin-controller", "description": "Admin Controller" }, + { + "name": "ai-chat-controller", + "description": "Ai Chat Controller" + }, { "name": "ai-model-controller", "description": "Ai Model Controller" }, + { + "name": "ai-solution-controller", + "description": "Ai Solution Controller" + }, + { + "name": "ai-tool-controller", + "description": "Ai Tool Controller" + }, { "name": "alarm-comment-controller", "description": "Alarm Comment Controller" @@ -3790,80 +3802,30 @@ ] } }, - "/api/ai/model": { - "get": { + "/api/ai/chats": { + "post": { "tags": [ - "ai-model-controller" + "ai-chat-controller" ], - "summary": "Get AI models (getAiModels)", - "description": "Returns a page of AI models. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAiModels", - "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 AI model name, provider and model ID.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "provider", - "modelId" - ] + "summary": "createChat", + "operationId": "createChat", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, - { - "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", + "201": { + "description": "Created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAiModel" + "$ref": "#/components/schemas/JsonNode" } } } @@ -3880,7 +3842,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -3982,34 +3944,29 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/ai/chats/{chatId}": { + "delete": { "tags": [ - "ai-model-controller" + "ai-chat-controller" ], - "summary": "Create or update AI model (saveAiModel)", - "description": "Creates or updates an AI model record.\n\n• **Create:** Omit the `id` to create a new record. The platform assigns a UUID to the new record and returns it in the `id` field of the response.\n\n• **Update:** Include an existing `id` to modify that record. If no matching record exists, the API responds with **404 Not Found**.\n\nTenant ID for the AI model will be taken from the authenticated user making the request, regardless of any value provided in the request body.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveAiModel", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiModel" - } + "summary": "deleteChat", + "operationId": "deleteChat", + "parameters": [ + { + "name": "chatId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "required": true - }, + } + ], "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AiModel" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -4023,7 +3980,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -4125,36 +4082,37 @@ "ApiKeyForm": [] } ] - } - }, - "/api/ai/model/chat": { - "post": { + }, + "patch": { "tags": [ - "ai-model-controller" + "ai-chat-controller" + ], + "summary": "updateChat", + "operationId": "updateChat", + "parameters": [ + { + "name": "chatId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } ], - "summary": "Send request to AI chat model (sendChatRequest)", - "description": "Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model and returns either the generated answer or an error envelope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "sendChatRequest", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TbChatRequest" + "$ref": "#/components/schemas/JsonNode" } } }, "required": true }, "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TbChatResponse" - } - } - } + "204": { + "description": "No Content" }, "400": { "description": "Bad Request", @@ -4168,7 +4126,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -4272,25 +4230,22 @@ ] } }, - "/api/ai/model/{modelUuid}": { + "/api/ai/chats/{chatId}/messages": { "get": { "tags": [ - "ai-model-controller" + "ai-chat-controller" ], - "summary": "Get AI model by ID (getAiModelById)", - "description": "Fetches an AI model record by its `id`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAiModelById", + "summary": "getChatMessages", + "operationId": "getChatMessages", "parameters": [ { - "name": "modelUuid", + "name": "chatId", "in": "path", - "description": "ID of the AI model record", "required": true, "schema": { "type": "string", "format": "uuid" - }, - "example": "de7900d4-30e2-11f0-9cd2-0242ac120002" + } } ], "responses": { @@ -4299,7 +4254,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AiModel" + "$ref": "#/components/schemas/JsonNode" } } } @@ -4419,33 +4374,51 @@ } ] }, - "delete": { + "post": { "tags": [ - "ai-model-controller" + "ai-chat-controller" ], - "summary": "Delete AI model by ID (deleteAiModelById)", - "description": "Deletes the AI model record by its `id`. If a record with the specified `id` exists, the record is deleted and the endpoint returns `true`. If no such record exists, the endpoint returns `false`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteAiModelById", + "summary": "sendChatMessage", + "operationId": "sendChatMessage", "parameters": [ { - "name": "modelUuid", + "name": "chatId", "in": "path", - "description": "ID of the AI model record", "required": true, "schema": { "type": "string", "format": "uuid" - }, - "example": "de7900d4-30e2-11f0-9cd2-0242ac120002" + } + }, + { + "name": "X-Authorization", + "in": "header", + "required": true, + "schema": { + "type": "string" + } } ], + "requestBody": { + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "text/event-stream": { "schema": { - "type": "boolean" + "type": "array", + "items": { + "$ref": "#/components/schemas/ServerSentEventString" + } } } } @@ -4462,7 +4435,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -4566,68 +4539,20 @@ ] } }, - "/api/alarm/{alarmId}/comment": { + "/api/ai/chats/{chatType}": { "get": { "tags": [ - "alarm-comment-controller" + "ai-chat-controller" ], - "summary": "Get Alarm comments (getAlarmComments)", - "description": "Returns a page of alarm comments for specified alarm. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAlarmComments", + "summary": "listChats", + "operationId": "listChats", "parameters": [ { - "name": "alarmId", + "name": "chatType", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "id" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/ChatType" } } ], @@ -4637,7 +4562,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmCommentInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -4756,43 +4681,82 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/ai/model": { + "get": { "tags": [ - "alarm-comment-controller" + "ai-model-controller" ], - "summary": "Create or update Alarm Comment ", - "description": "Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. \n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. \n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveAlarmComment", + "summary": "Get AI models (getAiModels)", + "description": "Returns a page of AI models. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAiModels", "parameters": [ { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the AI model name, provider and model ID.", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "description": "A JSON value representing the comment.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmComment" - } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "provider", + "modelId" + ] } }, - "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/AlarmComment" + "$ref": "#/components/schemas/PageDataAiModel" } } } @@ -4809,7 +4773,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -4911,39 +4875,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/{alarmId}/comment/{commentId}": { - "delete": { + }, + "post": { "tags": [ - "alarm-comment-controller" + "ai-model-controller" ], - "summary": "Delete Alarm comment (deleteAlarmComment)", - "description": "Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteAlarmComment", - "parameters": [ - { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Create or update AI model (saveAiModel)", + "description": "Creates or updates an AI model record.\n\n• **Create:** Omit the `id` to create a new record. The platform assigns a UUID to the new record and returns it in the `id` field of the response.\n\n• **Update:** Include an existing `id` to modify that record. If no matching record exists, the API responds with **404 Not Found**.\n\nTenant ID for the AI model will be taken from the authenticated user making the request, regardless of any value provided in the request body.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAiModel", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AiModel" + } } }, - { - "name": "commentId", - "in": "path", - "description": "A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AiModel" + } + } + } }, "400": { "description": "Bad Request", @@ -4957,7 +4916,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -5061,20 +5020,19 @@ ] } }, - "/api/alarm": { + "/api/ai/model/chat": { "post": { "tags": [ - "alarm-controller" + "ai-model-controller" ], - "summary": "Create or Update Alarm (saveAlarm)", - "description": "Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. \n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveAlarm", + "summary": "Send request to AI chat model (sendChatRequest)", + "description": "Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model and returns either the generated answer or an error envelope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "sendChatRequest", "requestBody": { - "description": "A JSON value representing the alarm.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/TbChatRequest" } } }, @@ -5086,7 +5044,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/TbChatResponse" } } } @@ -5207,72 +5165,25 @@ ] } }, - "/api/alarm/highestSeverity/{entityType}/{entityId}": { + "/api/ai/model/{modelUuid}": { "get": { "tags": [ - "alarm-controller" + "ai-model-controller" ], - "summary": "Get Highest Alarm Severity (getHighestAlarmSeverity)", - "description": "Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getHighestAlarmSeverity", + "summary": "Get AI model by ID (getAiModelById)", + "description": "Fetches an AI model record by its `id`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAiModelById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "modelUuid", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "ID of the AI model record", "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "searchStatus", - "in": "query", - "description": "A string value representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] - } - }, - { - "name": "status", - "in": "query", - "description": "A string value representing one of the AlarmStatus enumeration value", - "required": false, "schema": { "type": "string", - "enum": [ - "ACTIVE_UNACK", - "ACTIVE_ACK", - "CLEARED_UNACK", - "CLEARED_ACK" - ] - } - }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } + "format": "uuid" + }, + "example": "de7900d4-30e2-11f0-9cd2-0242ac120002" } ], "responses": { @@ -5281,7 +5192,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmSeverity" + "$ref": "#/components/schemas/AiModel" } } } @@ -5400,25 +5311,25 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/info/{alarmId}": { - "get": { + }, + "delete": { "tags": [ - "alarm-controller" + "ai-model-controller" ], - "summary": "Get Alarm Info (getAlarmInfoById)", - "description": "Fetch the Alarm Info object based on the provided Alarm Id. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmInfoById", + "summary": "Delete AI model by ID (deleteAiModelById)", + "description": "Deletes the AI model record by its `id`. If a record with the specified `id` exists, the record is deleted and the endpoint returns `true`. If no such record exists, the endpoint returns `false`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAiModelById", "parameters": [ { - "name": "alarmId", + "name": "modelUuid", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "ID of the AI model record", "required": true, "schema": { - "type": "string" - } + "type": "string", + "format": "uuid" + }, + "example": "de7900d4-30e2-11f0-9cd2-0242ac120002" } ], "responses": { @@ -5427,7 +5338,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmInfo" + "type": "boolean" } } } @@ -5548,65 +5459,20 @@ ] } }, - "/api/alarm/types": { + "/api/ai/solution/infos": { "get": { "tags": [ - "alarm-controller" - ], - "summary": "Get Alarm Types (getAlarmTypes)", - "description": "Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request.", - "operationId": "getAlarmTypes", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } + "ai-solution-controller" ], + "summary": "getSolutions", + "operationId": "getSolutions", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntitySubtype" + "$ref": "#/components/schemas/JsonNode" } } } @@ -5727,32 +5593,20 @@ ] } }, - "/api/alarm/{alarmId}": { - "get": { + "/api/ai/solution/start": { + "post": { "tags": [ - "alarm-controller" - ], - "summary": "Get Alarm (getAlarmById)", - "description": "Fetch the Alarm object based on the provided Alarm Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmById", - "parameters": [ - { - "name": "alarmId", - "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "ai-solution-controller" ], + "summary": "startNew", + "operationId": "startNew", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/JsonNode" } } } @@ -5769,7 +5623,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -5871,22 +5725,23 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/ai/solution/{solutionId}": { + "get": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Delete Alarm (deleteAlarm)", - "description": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteAlarm", + "summary": "getSolution", + "operationId": "getSolution", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -5896,7 +5751,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/JsonNode" } } } @@ -6015,37 +5870,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/{alarmId}/ack": { - "post": { + }, + "delete": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Acknowledge Alarm (ackAlarm)", - "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "ackAlarm", + "summary": "deleteSolution", + "operationId": "deleteSolution", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -6059,7 +5904,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -6163,22 +6008,21 @@ ] } }, - "/api/alarm/{alarmId}/assign": { - "delete": { + "/api/ai/solution/{solutionId}/create": { + "post": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Unassign Alarm (unassignAlarm)", - "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "unassignAlarm", + "summary": "createSolution", + "operationId": "createSolution", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -6188,7 +6032,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/JsonNode" } } } @@ -6205,7 +6049,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -6309,28 +6153,26 @@ ] } }, - "/api/alarm/{alarmId}/assign/{assigneeId}": { + "/api/ai/solution/{solutionId}/install": { "post": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Assign/Reassign Alarm (assignAlarm)", - "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "assignAlarm", + "summary": "installSolution", + "operationId": "installSolution", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { - "name": "assigneeId", - "in": "path", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "X-Authorization", + "in": "header", "required": true, "schema": { "type": "string" @@ -6343,7 +6185,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Alarm" + "$ref": "#/components/schemas/JsonNode" } } } @@ -6464,19 +6306,26 @@ ] } }, - "/api/alarm/{alarmId}/clear": { - "post": { + "/api/ai/solution/{solutionId}/uninstall": { + "delete": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Clear Alarm (clearAlarm)", - "description": "Clear the Alarm. Once cleared, the 'clear_ts' field will be set to current timestamp and special rule chain event 'ALARM_CLEAR' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "clearAlarm", + "summary": "uninstallSolution", + "operationId": "uninstallSolution", "parameters": [ { - "name": "alarmId", + "name": "solutionId", "in": "path", - "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "X-Authorization", + "in": "header", "required": true, "schema": { "type": "string" @@ -6489,7 +6338,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -6506,7 +6355,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -6610,171 +6459,49 @@ ] } }, - "/api/alarm/{entityType}/{entityId}": { - "get": { + "/api/ai/solution/{solutionId}/{dataKey}": { + "put": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Get Alarms (getAlarmsByEntity)", - "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAlarmsByEntity", + "summary": "updateData", + "operationId": "updateData", "parameters": [ { - "name": "entityType", + "name": "solutionId", "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": "searchStatus", - "in": "query", - "description": "A string value representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] - } - }, - { - "name": "status", - "in": "query", - "description": "A string value representing one of the AlarmStatus enumeration value", - "required": false, "schema": { "type": "string", - "enum": [ - "ACTIVE_UNACK", - "ACTIVE_ACK", - "CLEARED_UNACK", - "CLEARED_ACK" - ] - } - }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "format": "uuid" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "dataKey", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "startTs", - "endTs", - "type", - "ackTs", - "clearTs", - "severity", - "status" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "fetchOriginator", - "in": "query", - "description": "A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null.", - "required": false, - "schema": { - "type": "boolean" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -6895,153 +6622,49 @@ ] } }, - "/api/alarms": { - "get": { + "/api/ai/solution/{solutionId}/{step}/chat": { + "post": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Get All Alarms (getAllAlarms)", - "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllAlarms", + "summary": "chat", + "operationId": "chat", "parameters": [ { - "name": "searchStatus", - "in": "query", - "description": "A string value representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] - } - }, - { - "name": "status", - "in": "query", - "description": "A string value representing one of the AlarmStatus enumeration value", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ACTIVE_UNACK", - "ACTIVE_ACK", - "CLEARED_UNACK", - "CLEARED_ACK" - ] - } - }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "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": "solutionId", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "startTs", - "endTs", - "type", - "ackTs", - "clearTs", - "severity", - "status" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" + "format": "uuid" } }, { - "name": "fetchOriginator", - "in": "query", - "description": "A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null.", - "required": false, + "name": "step", + "in": "path", + "required": true, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/SolutionStep" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -7058,7 +6681,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -7162,181 +6785,176 @@ ] } }, - "/api/v2/alarm/{entityType}/{entityId}": { - "get": { + "/api/ai/solution/{solutionId}/{step}/clear": { + "delete": { "tags": [ - "alarm-controller" + "ai-solution-controller" ], - "summary": "Get Alarms (getAlarmsV2)", - "description": "Returns a page of alarms for the selected entity. You can specify parameters to filter the 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": "getAlarmsV2", + "summary": "clearStep", + "operationId": "clearStep", "parameters": [ { - "name": "entityType", + "name": "solutionId", "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } }, { - "name": "entityId", + "name": "step", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/SolutionStep" } + } + ], + "responses": { + "200": { + "description": "OK" }, - { - "name": "statusList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] + "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": "severityList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "INDETERMINATE" - ] + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } } } }, - { - "name": "typeList", - "in": "query", - "description": "A list of string values separated by comma ',' representing alarm types", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } } } }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "startTs", - "endTs", - "type", - "ackTs", - "clearTs", - "severity", - "status" - ] + "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": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } } - }, + } + }, + "security": [ { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } + "HttpLoginForm": [] }, { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } + "ApiKeyForm": [] } + ] + } + }, + "/api/ai/tools/resolve-approval": { + "post": { + "tags": [ + "ai-tool-controller" ], + "summary": "resolveToolApproval", + "operationId": "resolveToolApproval", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -7353,7 +6971,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -7457,70 +7075,20 @@ ] } }, - "/api/v2/alarms": { + "/api/alarm/{alarmId}/comment": { "get": { "tags": [ - "alarm-controller" + "alarm-comment-controller" ], - "summary": "Get All Alarms (getAllAlarmsV2)", - "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAllAlarmsV2", + "summary": "Get Alarm comments (getAlarmComments)", + "description": "Returns a page of alarm comments for specified alarm. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAlarmComments", "parameters": [ { - "name": "statusList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ANY", - "ACTIVE", - "CLEARED", - "ACK", - "UNACK" - ] - } - } - }, - { - "name": "severityList", - "in": "query", - "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "CRITICAL", - "MAJOR", - "MINOR", - "WARNING", - "INDETERMINATE" - ] - } - } - }, - { - "name": "typeList", - "in": "query", - "description": "A list of string values separated by comma ',' representing alarm types", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "assigneeId", - "in": "query", - "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -7545,15 +7113,6 @@ "format": "int32" } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "sortProperty", "in": "query", @@ -7563,13 +7122,7 @@ "type": "string", "enum": [ "createdTime", - "startTs", - "endTs", - "type", - "ackTs", - "clearTs", - "severity", - "status" + "id" ] } }, @@ -7585,26 +7138,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -7613,7 +7146,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmInfo" + "$ref": "#/components/schemas/PageDataAlarmCommentInfo" } } } @@ -7732,22 +7265,31 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/rule": { + }, "post": { "tags": [ - "alarm-rule-controller" + "alarm-comment-controller" + ], + "summary": "Create or update Alarm Comment ", + "description": "Creates or Updates the Alarm Comment. When creating comment, platform generates Alarm Comment Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Comment id will be present in the response. Specify existing Alarm Comment id to update the alarm. Referencing non-existing Alarm Comment Id will cause 'Not Found' error. \n\n To create new Alarm comment entity it is enough to specify 'comment' json element with 'text' node, for example: {\"comment\": { \"text\": \"my comment\"}}. \n\n If comment type is not specified the default value 'OTHER' will be saved. If 'alarmId' or 'userId' specified in body it will be ignored.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveAlarmComment", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Create Or Update Alarm Rule (saveAlarmRule)", - "description": "Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveAlarmRule", "requestBody": { - "description": "A JSON value representing the alarm rule.", + "description": "A JSON value representing the comment.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmRuleDefinition" + "$ref": "#/components/schemas/AlarmComment" } } }, @@ -7759,7 +7301,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmRuleDefinition" + "$ref": "#/components/schemas/AlarmComment" } } } @@ -7880,35 +7422,37 @@ ] } }, - "/api/alarm/rule/testScript": { - "post": { + "/api/alarm/{alarmId}/comment/{commentId}": { + "delete": { "tags": [ - "alarm-rule-controller" + "alarm-comment-controller" ], - "summary": "Test alarm rule TBEL expression (testAlarmRuleScript)", - "description": "Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: \n\n```json\n{\n \"expression\": \"return temperature > 50;\",\n \"arguments\": {\n \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testAlarmRuleScript", - "requestBody": { - "description": "Test alarm rule TBEL condition expression. The expression must return a boolean value.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Delete Alarm comment (deleteAlarmComment)", + "description": "Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteAlarmComment", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "commentId", + "in": "path", + "description": "A string value representing the alarm comment id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -7922,7 +7466,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -8026,31 +7570,32 @@ ] } }, - "/api/alarm/rule/{alarmRuleId}": { - "get": { + "/api/alarm": { + "post": { "tags": [ - "alarm-rule-controller" + "alarm-controller" ], - "summary": "Get Alarm Rule (getAlarmRuleById)", - "description": "Fetch the Alarm Rule object based on the provided Alarm Rule Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAlarmRuleById", - "parameters": [ - { - "name": "alarmRuleId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Create or Update Alarm (saveAlarm)", + "description": "Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error. \n\nPlatform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Alarm entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveAlarm", + "requestBody": { + "description": "A JSON value representing the alarm.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AlarmRuleDefinition" + "$ref": "#/components/schemas/Alarm" } } } @@ -8067,7 +7612,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -8169,27 +7714,86 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/alarm/highestSeverity/{entityType}/{entityId}": { + "get": { "tags": [ - "alarm-rule-controller" + "alarm-controller" ], - "summary": "Delete Alarm Rule (deleteAlarmRule)", - "description": "Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteAlarmRule", + "summary": "Get Highest Alarm Severity (getHighestAlarmSeverity)", + "description": "Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getHighestAlarmSeverity", "parameters": [ { - "name": "alarmRuleId", + "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": "searchStatus", + "in": "query", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ] + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmSeverity" + } + } + } }, "400": { "description": "Bad Request", @@ -8307,18 +7911,19 @@ ] } }, - "/api/alarm/rule/{alarmRuleId}/debug": { + "/api/alarm/info/{alarmId}": { "get": { "tags": [ - "alarm-rule-controller" + "alarm-controller" ], - "summary": "Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent)", - "description": "Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLatestAlarmRuleDebugEvent", + "summary": "Get Alarm Info (getAlarmInfoById)", + "description": "Fetch the Alarm Info object based on the provided Alarm Id. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmInfoById", "parameters": [ { - "name": "alarmRuleId", + "name": "alarmId", "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -8331,7 +7936,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/AlarmInfo" } } } @@ -8452,14 +8057,14 @@ ] } }, - "/api/alarm/rules": { + "/api/alarm/types": { "get": { "tags": [ - "alarm-rule-controller" + "alarm-controller" ], - "summary": "Get alarm rules (getAlarmRules)", - "description": "Fetch tenant alarm rules based on the filter.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAlarmRules", + "summary": "Get Alarm Types (getAlarmTypes)", + "description": "Returns a set of unique alarm types based on alarms that are either owned by the tenant or assigned to the customer which user is performing the request.", + "operationId": "getAlarmTypes", "parameters": [ { "name": "pageSize", @@ -8481,51 +8086,15 @@ "format": "int32" } }, - { - "name": "entityType", - "in": "query", - "description": "Entity type filter. If not specified, alarm rules for all supported entity types will be returned.", - "required": false, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "entities", - "in": "query", - "description": "Entities filter. If not specified, alarm rules for entity type filter will be returned.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "uniqueItems": true - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field name.", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", "required": false, "schema": { "type": "string" } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name" - ] - } - }, { "name": "sortOrder", "in": "query", @@ -8546,7 +8115,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmRuleDefinitionInfo" + "$ref": "#/components/schemas/PageDataEntitySubtype" } } } @@ -8667,56 +8236,23 @@ ] } }, - "/api/alarm/rules/names": { + "/api/alarm/{alarmId}": { "get": { "tags": [ - "alarm-rule-controller" + "alarm-controller" ], - "summary": "Get alarm rule names (getAlarmRuleNames)", - "description": "Fetch the list of alarm rule names.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAlarmRuleNames", + "summary": "Get Alarm (getAlarmById)", + "description": "Fetch the Alarm object based on the provided Alarm Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmById", "parameters": [ { - "name": "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": "alarmId", + "in": "path", + "description": "A string value representing the alarm 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 calculated field name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -8725,7 +8261,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataString" + "$ref": "#/components/schemas/Alarm" } } } @@ -8844,89 +8380,23 @@ "ApiKeyForm": [] } ] - } - }, - "/api/alarm/rules/{entityType}/{entityId}": { - "get": { + }, + "delete": { "tags": [ - "alarm-rule-controller" + "alarm-controller" ], - "summary": "Get Alarm Rules by Entity Id (getAlarmRulesByEntityId)", - "description": "Fetch the Alarm Rules based on the provided Entity Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAlarmRulesByEntityId", + "summary": "Delete Alarm (deleteAlarm)", + "description": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteAlarm", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "alarmId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "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 alarm 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 calculated field 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" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -8935,7 +8405,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmRuleDefinition" + "type": "boolean" } } } @@ -9056,31 +8526,32 @@ ] } }, - "/api/apiKey": { + "/api/alarm/{alarmId}/ack": { "post": { "tags": [ - "api-key-controller" + "alarm-controller" ], - "summary": "Save API key for user (saveApiKey)", - "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", - "operationId": "saveApiKey", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" - } + "summary": "Acknowledge Alarm (ackAlarm)", + "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "ackAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKey" + "$ref": "#/components/schemas/AlarmInfo" } } } @@ -9201,28 +8672,35 @@ ] } }, - "/api/apiKey/{id}": { + "/api/alarm/{alarmId}/assign": { "delete": { "tags": [ - "api-key-controller" + "alarm-controller" ], - "summary": "Delete API key by ID (deleteApiKey)", - "description": "Deletes the API key. Referencing non-existing ApiKey Id will cause an error.\n\nAvailable for any authorized user. ", - "operationId": "deleteApiKey", + "summary": "Unassign Alarm (unassignAlarm)", + "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "unassignAlarm", "parameters": [ { - "name": "id", + "name": "alarmId", "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } }, "400": { "description": "Bad Request", @@ -9340,43 +8818,41 @@ ] } }, - "/api/apiKey/{id}/description": { - "put": { + "/api/alarm/{alarmId}/assign/{assigneeId}": { + "post": { "tags": [ - "api-key-controller" + "alarm-controller" ], - "summary": "Update API key Description", - "description": "Updates the description of the existing API key by apiKeyId. Only the description can be updated. Referencing a non-existing ApiKey Id will cause a 'Not Found' error.\n\nAvailable for any authorized user. ", - "operationId": "updateApiKeyDescription", + "summary": "Assign/Reassign Alarm (assignAlarm)", + "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "assignAlarm", "parameters": [ { - "name": "id", + "name": "alarmId", "in": "path", - "description": "A string value representing the api key id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New description for the API key" - } + }, + { + "name": "assigneeId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/Alarm" } } } @@ -9393,7 +8869,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -9497,32 +8973,22 @@ ] } }, - "/api/apiKey/{id}/enabled/{enabledValue}": { - "put": { + "/api/alarm/{alarmId}/clear": { + "post": { "tags": [ - "api-key-controller" + "alarm-controller" ], - "summary": "Enable or disable API key (enableApiKey)", - "description": "Updates api key with enabled = true/false. \n\nAvailable for any authorized user. ", - "operationId": "enableApiKey", + "summary": "Clear Alarm (clearAlarm)", + "description": "Clear the Alarm. Once cleared, the 'clear_ts' field will be set to current timestamp and special rule chain event 'ALARM_CLEAR' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "clearAlarm", "parameters": [ { - "name": "id", - "in": "path", - "description": "Unique identifier of the API key to enable/disable", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "enabledValue", + "name": "alarmId", "in": "path", - "description": "Enabled or disabled api key", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -9532,7 +8998,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiKeyInfo" + "$ref": "#/components/schemas/AlarmInfo" } } } @@ -9549,7 +9015,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -9653,24 +9119,73 @@ ] } }, - "/api/apiKeys/{userId}": { + "/api/alarm/{entityType}/{entityId}": { "get": { "tags": [ - "api-key-controller" + "alarm-controller" ], - "summary": "Get User Api Keys (getUserApiKeys)", - "description": "Returns a page of api keys owned by user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. ", - "operationId": "getUserApiKeys", + "summary": "Get Alarms (getAlarmsByEntity)", + "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarmsByEntity", "parameters": [ { - "name": "userId", + "name": "entityType", "in": "path", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, + { + "name": "searchStatus", + "in": "query", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ] + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -9694,7 +9209,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the description.", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", "required": false, "schema": { "type": "string" @@ -9709,9 +9224,13 @@ "type": "string", "enum": [ "createdTime", - "expirationTime", - "description", - "enabled" + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" ] } }, @@ -9727,6 +9246,35 @@ "DESC" ] } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "fetchOriginator", + "in": "query", + "description": "A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null.", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -9735,7 +9283,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataApiKeyInfo" + "$ref": "#/components/schemas/PageDataAlarmInfo" } } } @@ -9856,85 +9404,153 @@ ] } }, - "/api/asset": { - "post": { + "/api/alarms": { + "get": { "tags": [ - "asset-controller" + "alarm-controller" ], - "summary": "Create Or Update Asset (saveAsset)", - "description": "Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. \n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveAsset", + "summary": "Get All Alarms (getAllAlarms)", + "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllAlarms", "parameters": [ { - "name": "entityGroupId", + "name": "searchStatus", "in": "query", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ] + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } }, { - "name": "entityGroupIds", + "name": "pageSize", "in": "query", - "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } }, { - "name": "nameConflictPolicy", + "name": "sortProperty", "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "description": "Property of entity to sort by", "required": false, "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" + "type": "string", + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] } }, { - "name": "uniquifySeparator", + "name": "sortOrder", "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", "required": false, "schema": { "type": "string", - "default": "_" + "enum": [ + "ASC", + "DESC" + ] } }, { - "name": "uniquifyStrategy", + "name": "startTime", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "integer", + "format": "int64" } - } - ], - "requestBody": { - "description": "A JSON value representing the asset.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Asset" - } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" } }, - "required": true - }, + { + "name": "fetchOriginator", + "in": "query", + "description": "A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Asset" + "$ref": "#/components/schemas/PageDataAlarmInfo" } } } @@ -9951,7 +9567,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -10055,31 +9671,181 @@ ] } }, - "/api/asset/bulk_import": { - "post": { + "/api/v2/alarm/{entityType}/{entityId}": { + "get": { "tags": [ - "asset-controller" + "alarm-controller" ], - "summary": "Import the bulk of assets (processAssetsBulkImport)", - "description": "There's an ability to import the bulk of assets using the only .csv file.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processAssetBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" + "summary": "Get Alarms (getAlarmsV2)", + "description": "Returns a page of alarms for the selected entity. You can specify parameters to filter the 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": "getAlarmsV2", + "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": "statusList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] } } }, - "required": true - }, + { + "name": "severityList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + } + } + }, + { + "name": "typeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing alarm types", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultAsset" + "$ref": "#/components/schemas/PageDataAlarmInfo" } } } @@ -10096,7 +9862,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -10200,23 +9966,154 @@ ] } }, - "/api/asset/info/{assetId}": { + "/api/v2/alarms": { "get": { "tags": [ - "asset-controller" + "alarm-controller" ], - "summary": "Get Asset Info (getAssetInfoById)", - "description": "Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetInfoById", + "summary": "Get All Alarms (getAllAlarmsV2)", + "description": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAllAlarmsV2", "parameters": [ { - "name": "assetId", - "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "statusList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + } + }, + { + "name": "severityList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + } + } + }, + { + "name": "typeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing alarm types", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "assigneeId", + "in": "query", + "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -10225,7 +10122,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetInfo" + "$ref": "#/components/schemas/PageDataAlarmInfo" } } } @@ -10346,24 +10243,32 @@ ] } }, - "/api/asset/types": { - "get": { + "/api/alarm/rule": { + "post": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Get Asset Types (getAssetTypes)", - "description": "Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetTypes", + "summary": "Create Or Update Alarm Rule (saveAlarmRule)", + "description": "Creates or Updates the Alarm Rule. When creating alarm rule, platform generates Alarm Rule Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Alarm Rule Id will be present in the response. Specify existing Alarm Rule Id to update the alarm rule. Referencing non-existing Alarm Rule Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Alarm Rule entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAlarmRule", + "requestBody": { + "description": "A JSON value representing the alarm rule.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmRuleDefinition" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/AlarmRuleDefinition" } } } @@ -10380,7 +10285,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -10474,7 +10379,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -10485,32 +10389,32 @@ ] } }, - "/api/asset/{assetId}": { - "get": { + "/api/alarm/rule/testScript": { + "post": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Get Asset (getAssetById)", - "description": "Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetById", - "parameters": [ - { - "name": "assetId", - "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Test alarm rule TBEL expression (testAlarmRuleScript)", + "description": "Execute the alarm rule TBEL condition expression and return the result. Alarm rule expressions must return a boolean value. The format of request: \n\n```json\n{\n \"expression\": \"return temperature > 50;\",\n \"arguments\": {\n \"temperature\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 55 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testAlarmRuleScript", + "requestBody": { + "description": "Test alarm rule TBEL condition expression. The expression must return a boolean value.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Asset" + "$ref": "#/components/schemas/JsonNode" } } } @@ -10527,7 +10431,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -10629,19 +10533,20 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/alarm/rule/{alarmRuleId}": { + "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Delete asset (deleteAsset)", - "description": "Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteAsset", + "summary": "Get Alarm Rule (getAlarmRuleById)", + "description": "Fetch the Alarm Rule object based on the provided Alarm Rule Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRuleById", "parameters": [ { - "name": "assetId", + "name": "alarmRuleId", "in": "path", - "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -10650,7 +10555,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmRuleDefinition" + } + } + } }, "400": { "description": "Bad Request", @@ -10766,104 +10678,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/assetInfos/all": { - "get": { + }, + "delete": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Get All Asset Infos for current user (getAllAssetInfos)", - "description": "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. \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": "getAllAssetInfos", + "summary": "Delete Alarm Rule (deleteAlarmRule)", + "description": "Deletes the alarm rule. Referencing non-existing Alarm Rule Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAlarmRule", "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": "alarmRuleId", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataAssetInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -10981,25 +10816,21 @@ ] } }, - "/api/assets": { + "/api/alarm/rule/{alarmRuleId}/debug": { "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Get Assets By Ids (getAssetsByIds)", - "description": "Requested assets must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetsByIds", + "summary": "Get latest alarm rule debug event (getLatestAlarmRuleDebugEvent)", + "description": "Gets latest alarm rule debug event for specified alarm rule id. Referencing non-existing alarm rule id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestAlarmRuleDebugEvent", "parameters": [ { - "name": "assetIds", - "in": "query", - "description": "A list of asset ids, separated by comma ','", + "name": "alarmRuleId", + "in": "path", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -11009,10 +10840,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -11131,34 +10959,103 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/alarm/rules": { + "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Find related assets (findAssetsByQuery)", - "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findAssetsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetSearchQuery" - } + "summary": "Get alarm rules (getAlarmRules)", + "description": "Fetch tenant alarm rules based on the filter.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRules", + "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": "entityType", + "in": "query", + "description": "Entity type filter. If not specified, alarm rules for all supported entity types will be returned.", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "entities", + "in": "query", + "description": "Entities filter. If not specified, alarm rules for entity type filter will be returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the calculated field 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" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Asset" - } + "$ref": "#/components/schemas/PageDataAlarmRuleDefinitionInfo" } } } @@ -11175,7 +11072,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -11279,24 +11176,15 @@ ] } }, - "/api/customer/{customerId}/assetInfos": { + "/api/alarm/rules/names": { "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Get Customer Asset Infos (getCustomerAssetInfos)", - "description": "Returns a page of asset info objects owned by the specified customer. 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. \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": "getCustomerAssetInfos", + "summary": "Get alarm rule names (getAlarmRuleNames)", + "description": "Fetch the list of alarm rule names.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRuleNames", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -11317,49 +11205,15 @@ "format": "int32" } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { "type": "string" } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, { "name": "sortOrder", "in": "query", @@ -11380,7 +11234,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetInfo" + "$ref": "#/components/schemas/PageDataString" } } } @@ -11501,19 +11355,28 @@ ] } }, - "/api/customer/{customerId}/assets": { + "/api/alarm/rules/{entityType}/{entityId}": { "get": { "tags": [ - "asset-controller" + "alarm-rule-controller" ], - "summary": "Get Customer Assets (getCustomerAssets)", - "description": "Returns a page of assets objects owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerAssets", + "summary": "Get Alarm Rules by Entity Id (getAlarmRulesByEntityId)", + "description": "Fetch the Alarm Rules based on the provided Entity Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAlarmRulesByEntityId", "parameters": [ { - "name": "customerId", + "name": "entityType", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -11539,19 +11402,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { "type": "string" @@ -11566,10 +11420,7 @@ "type": "string", "enum": [ "createdTime", - "name", - "type", - "label", - "customerTitle" + "name" ] } }, @@ -11593,7 +11444,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/PageDataAlarmRuleDefinition" } } } @@ -11714,90 +11565,31 @@ ] } }, - "/api/entityGroup/{entityGroupId}/assets": { - "get": { + "/api/apiKey": { + "post": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get assets by Entity Group Id (getAssetsByEntityGroupId)", - "description": "Returns a page of asset objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAssetsByEntityGroupId", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "summary": "Save API key for user (saveApiKey)", + "description": "Creates an API key for the given user and returns the token ONCE as 'ApiKey {value}'.\n\nAvailable for any authorized user. ", + "operationId": "saveApiKey", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiKeyInfo" + } } }, - { - "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/PageDataAsset" + "$ref": "#/components/schemas/ApiKey" } } } @@ -11814,7 +11606,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -11918,35 +11710,28 @@ ] } }, - "/api/tenant/asset": { - "get": { + "/api/apiKey/{id}": { + "delete": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Tenant Asset (getTenantAssetByName)", - "description": "Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantAssetByName", + "summary": "Delete API key by ID (deleteApiKey)", + "description": "Deletes the API key. Referencing non-existing ApiKey Id will cause an error.\n\nAvailable for any authorized user. ", + "operationId": "deleteApiKey", "parameters": [ { - "name": "assetName", - "in": "query", - "description": "A string value representing the Asset name.", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Asset" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -12064,90 +11849,43 @@ ] } }, - "/api/tenant/assets": { - "get": { + "/api/apiKey/{id}/description": { + "put": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Tenant Assets (getTenantAssets)", - "description": "Returns a page of assets 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": "getTenantAssets", + "summary": "Update API key Description", + "description": "Updates the description of the existing API key by apiKeyId. Only the description can be updated. Referencing a non-existing ApiKey Id will cause a 'Not Found' error.\n\nAvailable for any authorized user. ", + "operationId": "updateApiKeyDescription", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", + "description": "A string value representing the api key id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New description for the API key" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/ApiKeyInfo" } } } @@ -12268,89 +12006,32 @@ ] } }, - "/api/user/assets": { - "get": { + "/api/apiKey/{id}/enabled/{enabledValue}": { + "put": { "tags": [ - "asset-controller" + "api-key-controller" ], - "summary": "Get Assets (getUserAssets)", - "description": "Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Info is an extension of the default Asset object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserAssets", + "summary": "Enable or disable API key (enableApiKey)", + "description": "Updates api key with enabled = true/false. \n\nAvailable for any authorized user. ", + "operationId": "enableApiKey", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "id", + "in": "path", + "description": "Unique identifier of the API key to enable/disable", "required": true, "schema": { "type": "string", - "minimum": 1 + "format": "uuid" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled api key", "required": true, "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "Asset type", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "assetProfileId", - "in": "query", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the asset name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "boolean" } } ], @@ -12360,7 +12041,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAsset" + "$ref": "#/components/schemas/ApiKeyInfo" } } } @@ -12481,31 +12162,89 @@ ] } }, - "/api/assetProfile": { - "post": { + "/api/apiKeys/{userId}": { + "get": { "tags": [ - "asset-profile-controller" + "api-key-controller" ], - "summary": "Create Or Update Asset Profile (saveAssetProfile)", - "description": "Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. \n\nAsset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveAssetProfile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetProfile" - } + "summary": "Get User Api Keys (getUserApiKeys)", + "description": "Returns a page of api keys owned by user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for any authorized user. ", + "operationId": "getUserApiKeys", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the description.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "expirationTime", + "description", + "enabled" + ] + } + }, + { + "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/AssetProfile" + "$ref": "#/components/schemas/PageDataApiKeyInfo" } } } @@ -12522,7 +12261,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -12626,36 +12365,85 @@ ] } }, - "/api/assetProfile/names": { - "get": { + "/api/asset": { + "post": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile names (getAssetProfileNames)", - "description": "Returns a set of unique asset profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileNames", + "summary": "Create Or Update Asset (saveAsset)", + "description": "Creates or Updates the Asset. When creating asset, platform generates Asset Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Asset entity. \n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveAsset", "parameters": [ { - "name": "activeOnly", + "name": "entityGroupId", "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "description": "A JSON value representing the asset.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Asset" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/Asset" } } } @@ -12672,7 +12460,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -12776,41 +12564,31 @@ ] } }, - "/api/assetProfile/{assetProfileId}": { - "get": { + "/api/asset/bulk_import": { + "post": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile (getAssetProfileById)", - "description": "Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAssetProfileById", - "parameters": [ - { - "name": "assetProfileId", - "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Import the bulk of assets (processAssetsBulkImport)", + "description": "There's an ability to import the bulk of assets using the only .csv file.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processAssetBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "name": "inlineImages", - "in": "query", - "description": "Inline images as a data URL (Base64)", - "required": false, - "schema": { - "type": "boolean" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "$ref": "#/components/schemas/BulkImportResultAsset" } } } @@ -12827,7 +12605,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -12929,19 +12707,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/asset/info/{assetId}": { + "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Delete asset profile (deleteAssetProfile)", - "description": "Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteAssetProfile", + "summary": "Get Asset Info (getAssetInfoById)", + "description": "Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.Asset Info is an extension of the default Asset object that contains information about the owner name. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetInfoById", "parameters": [ { - "name": "assetProfileId", + "name": "assetId", "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -12950,7 +12730,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -13068,32 +12855,24 @@ ] } }, - "/api/assetProfile/{assetProfileId}/default": { - "post": { + "/api/asset/types": { + "get": { "tags": [ - "asset-profile-controller" - ], - "summary": "Make Asset Profile Default (setDefaultAssetProfile)", - "description": "Marks asset profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultAssetProfile", - "parameters": [ - { - "name": "assetProfileId", - "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "asset-controller" ], + "summary": "Get Asset Types (getAssetTypes)", + "description": "Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfile" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -13110,7 +12889,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -13204,6 +12983,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -13214,21 +12994,32 @@ ] } }, - "/api/assetProfileInfo/default": { + "/api/asset/{assetId}": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" + ], + "summary": "Get Asset (getAssetById)", + "description": "Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetById", + "parameters": [ + { + "name": "assetId", + "in": "path", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Default Asset Profile (getDefaultAssetProfileInfo)", - "description": "Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultAssetProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AssetProfileInfo" + "$ref": "#/components/schemas/Asset" } } } @@ -13347,21 +13138,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/assetProfileInfo/{assetProfileId}": { - "get": { + }, + "delete": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile Info (getAssetProfileInfoById)", - "description": "Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileInfoById", + "summary": "Delete asset (deleteAsset)", + "description": "Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteAsset", "parameters": [ { - "name": "assetProfileId", + "name": "assetId", "in": "path", - "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the asset id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -13370,14 +13159,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AssetProfileInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -13495,14 +13277,14 @@ ] } }, - "/api/assetProfileInfos": { + "/api/assetInfos/all": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profile infos (getAssetProfileInfos)", - "description": "Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getAssetProfileInfos", + "summary": "Get All Asset Infos for current user (getAllAssetInfos)", + "description": "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. \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": "getAllAssetInfos", "parameters": [ { "name": "pageSize", @@ -13524,10 +13306,28 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the asset profile name.", + "description": "The case insensitive 'substring' filter based on the asset name.", "required": false, "schema": { "type": "string" @@ -13543,8 +13343,9 @@ "enum": [ "createdTime", "name", - "description", - "isDefault" + "type", + "label", + "customerTitle" ] } }, @@ -13568,7 +13369,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAssetProfileInfo" + "$ref": "#/components/schemas/PageDataAssetInfo" } } } @@ -13689,19 +13490,19 @@ ] } }, - "/api/assetProfileInfos/list": { + "/api/assets": { "get": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", - "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAssetProfilesByIds", + "summary": "Get Assets By Ids (getAssetsByIds)", + "description": "Requested assets must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetsByIds", "parameters": [ { - "name": "assetProfileIds", + "name": "assetIds", "in": "query", - "description": "A list of asset profile ids, separated by comma ','", + "description": "A list of asset ids, separated by comma ','", "required": true, "schema": { "type": "array", @@ -13719,7 +13520,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/AssetProfileInfo" + "$ref": "#/components/schemas/Asset" } } } @@ -13839,82 +13640,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/assetProfiles": { - "get": { + }, + "post": { "tags": [ - "asset-profile-controller" + "asset-controller" ], - "summary": "Get Asset Profiles (getAssetProfiles)", - "description": "Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAssetProfiles", - "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 asset profile name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "description", - "isDefault" - ] + "summary": "Find related assets (findAssetsByQuery)", + "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findAssetsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetSearchQuery" + } } }, - { - "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/PageDataAssetProfile" + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } } } } @@ -13931,7 +13684,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -14035,15 +13788,24 @@ ] } }, - "/api/audit/logs": { + "/api/customer/{customerId}/assetInfos": { "get": { "tags": [ - "audit-log-controller" + "asset-controller" ], - "summary": "Get all audit logs (getAuditLogs)", - "description": "Returns a page of audit logs related to all entities in the scope of the current user's 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 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", - "operationId": "getAuditLogs", + "summary": "Get Customer Asset Infos (getCustomerAssetInfos)", + "description": "Returns a page of asset info objects owned by the specified customer. 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. \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": "getCustomerAssetInfos", "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", @@ -14064,10 +13826,28 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "description": "The case insensitive 'substring' filter based on the asset name.", "required": false, "schema": { "type": "string" @@ -14076,17 +13856,16 @@ { "name": "sortProperty", "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string", "enum": [ "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" + "name", + "type", + "label", + "customerTitle" ] } }, @@ -14102,35 +13881,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -14139,7 +13889,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/PageDataAssetInfo" } } } @@ -14260,14 +14010,14 @@ ] } }, - "/api/audit/logs/customer/{customerId}": { + "/api/customer/{customerId}/assets": { "get": { "tags": [ - "audit-log-controller" + "asset-controller" ], - "summary": "Get audit logs by customer id (getAuditLogsByCustomerId)", - "description": "Returns a page of audit logs related to the targeted customer entities (devices, assets, etc.), and users actions (login, logout, etc.) that belong to this customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", - "operationId": "getAuditLogsByCustomerId", + "summary": "Get Customer Assets (getCustomerAssets)", + "description": "Returns a page of assets objects owned by customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerAssets", "parameters": [ { "name": "customerId", @@ -14298,10 +14048,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "Asset type", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "description": "The case insensitive 'substring' filter based on the asset name.", "required": false, "schema": { "type": "string" @@ -14310,17 +14069,16 @@ { "name": "sortProperty", "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string", "enum": [ "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" + "name", + "type", + "label", + "customerTitle" ] } }, @@ -14336,35 +14094,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -14373,7 +14102,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -14494,28 +14223,19 @@ ] } }, - "/api/audit/logs/entity/{entityType}/{entityId}": { + "/api/entityGroup/{entityGroupId}/assets": { "get": { "tags": [ - "audit-log-controller" + "asset-controller" ], - "summary": "Get audit logs by entity id (getAuditLogsByEntityId)", - "description": "Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", - "operationId": "getAuditLogsByEntityId", + "summary": "Get assets by Entity Group Id (getAssetsByEntityGroupId)", + "description": "Returns a page of asset objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAssetsByEntityGroupId", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -14527,8 +14247,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { @@ -14537,14 +14257,14 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "description": "The case insensitive 'substring' filter based on the asset name.", "required": false, "schema": { "type": "string" @@ -14553,17 +14273,16 @@ { "name": "sortProperty", "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "description": "Property of entity to sort by", "required": false, "schema": { "type": "string", "enum": [ "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" + "name", + "type", + "label", + "customerTitle" ] } }, @@ -14579,35 +14298,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -14616,7 +14306,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -14737,108 +14427,20 @@ ] } }, - "/api/audit/logs/user/{userId}": { + "/api/tenant/asset": { "get": { "tags": [ - "audit-log-controller" + "asset-controller" ], - "summary": "Get audit logs by user id (getAuditLogsByUserId)", - "description": "Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", - "operationId": "getAuditLogsByUserId", + "summary": "Get Tenant Asset (getTenantAssetByName)", + "description": "Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantAssetByName", "parameters": [ { - "name": "userId", - "in": "path", - "description": "A string value representing the user 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": "assetName", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Asset name.", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "entityType", - "entityName", - "userName", - "actionType", - "actionStatus" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "actionTypes", - "in": "query", - "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", - "required": false, "schema": { "type": "string" } @@ -14850,7 +14452,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAuditLog" + "$ref": "#/components/schemas/Asset" } } } @@ -14971,31 +14573,90 @@ ] } }, - "/api/auth/changePassword": { - "post": { + "/api/tenant/assets": { + "get": { "tags": [ - "auth-controller" + "asset-controller" ], - "summary": "Change password for current User (changePassword)", - "description": "Change the password for the User which credentials are used to perform this REST API call. Be aware that previously generated [JWT](https://jwt.io/) tokens will be still valid until they expire.", - "operationId": "changePassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ChangePasswordRequest" - } + "summary": "Get Tenant Assets (getTenantAssets)", + "description": "Returns a page of assets 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": "getTenantAssets", + "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": "Asset type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/PageDataAsset" } } } @@ -15012,7 +14673,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -15116,17 +14777,102 @@ ] } }, - "/api/auth/logout": { - "post": { + "/api/user/assets": { + "get": { "tags": [ - "auth-controller" + "asset-controller" + ], + "summary": "Get Assets (getUserAssets)", + "description": "Returns a page of assets objects available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Info is an extension of the default Asset object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserAssets", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Asset type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "assetProfileId", + "in": "query", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Logout (logout)", - "description": "Special API call to record the 'logout' of the user to the Audit Logs. Since platform uses [JWT](https://jwt.io/), the actual logout is the procedure of clearing the [JWT](https://jwt.io/) token on the client side. ", - "operationId": "logout", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAsset" + } + } + } }, "400": { "description": "Bad Request", @@ -15140,7 +14886,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -15244,21 +14990,31 @@ ] } }, - "/api/auth/user": { - "get": { + "/api/assetProfile": { + "post": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Get current User (getUser)", - "description": "Get the information about the User which credentials are used to perform this REST API call.", - "operationId": "getUser", + "summary": "Create Or Update Asset Profile (saveAssetProfile)", + "description": "Create or update the Asset Profile. When creating asset profile, platform generates asset profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created asset profile id will be present in the response. Specify existing asset profile id to update the asset profile. Referencing non-existing asset profile Id will cause 'Not Found' error. \n\nAsset profile name is unique in the scope of tenant. Only one 'default' asset profile may exist in scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Asset Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAssetProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/AssetProfile" } } } @@ -15275,7 +15031,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -15379,22 +15135,23 @@ ] } }, - "/api/noauth/activate": { + "/api/assetProfile/names": { "get": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Check Activate User Token (checkActivateToken)", - "description": "Checks the activation token and forwards user to 'Create Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Create Password' page and same 'activateToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", - "operationId": "checkActivateToken", + "summary": "Get Asset Profile names (getAssetProfileNames)", + "description": "Returns a set of unique asset profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileNames", "parameters": [ { - "name": "activateToken", + "name": "activeOnly", "in": "query", - "description": "The activate token string.", - "required": true, + "description": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "required": false, "schema": { - "type": "string" + "type": "boolean", + "default": false } } ], @@ -15404,7 +15161,10 @@ "content": { "application/json": { "schema": { - "type": "object" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -15514,43 +15274,52 @@ } } } - } - }, - "post": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/assetProfile/{assetProfileId}": { + "get": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Activate User", - "description": "Checks the activation token and updates corresponding user password in the database. Now the user may start using his password to login. The response already contains the [JWT](https://jwt.io) activation and refresh tokens, to simplify the user activation flow and avoid asking user to input password again after activation. If token is valid, returns the object that contains [JWT](https://jwt.io/) access and refresh tokens. If token is not valid, returns '400 Bad Request'.", - "operationId": "activateUser", + "summary": "Get Asset Profile (getAssetProfileById)", + "description": "Fetch the Asset Profile object based on the provided Asset Profile Id. The server checks that the asset profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAssetProfileById", "parameters": [ { - "name": "sendActivationMail", + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "inlineImages", "in": "query", + "description": "Inline images as a data URL (Base64)", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "boolean" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ActivateUserRequest" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JwtPair" + "$ref": "#/components/schemas/AssetProfile" } } } @@ -15567,7 +15336,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -15660,22 +15429,28 @@ } } } - } - } - }, - "/api/noauth/resetPassword": { - "get": { + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + }, + "delete": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Check password reset token (checkResetToken)", - "description": "Checks the password reset token and forwards user to 'Reset Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Reset Password' page and same 'resetToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", - "operationId": "checkResetToken", + "summary": "Delete asset profile (deleteAssetProfile)", + "description": "Deletes the asset profile. Referencing non-existing asset profile Id will cause an error. Can't delete the asset profile if it is referenced by existing assets.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAssetProfile", "parameters": [ { - "name": "resetToken", - "in": "query", - "description": "The reset token string.", + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -15684,14 +15459,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -15798,28 +15566,46 @@ } } } - } - }, + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/assetProfile/{assetProfileId}/default": { "post": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Reset password (resetPassword)", - "description": "Checks the password reset token and updates the password. If token is not valid, returns '400 Bad Request'.", - "operationId": "resetPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPasswordRequest" - } + "summary": "Make Asset Profile Default (setDefaultAssetProfile)", + "description": "Marks asset profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultAssetProfile", + "parameters": [ + { + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } }, "400": { "description": "Bad Request", @@ -15926,30 +15712,35 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/resetPasswordByEmail": { - "post": { + "/api/assetProfileInfo/default": { + "get": { "tags": [ - "auth-controller" + "asset-profile-controller" ], - "summary": "Request reset password email (requestResetPasswordByEmail)", - "description": "Request to send the reset password email if the user with specified email address is present in the database. Always return '200 OK' status for security purposes.", - "operationId": "requestResetPasswordByEmail", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ResetPasswordEmailRequest" - } - } - }, - "required": true - }, + "summary": "Get Default Asset Profile (getDefaultAssetProfileInfo)", + "description": "Fetch the Default Asset Profile Info object. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultAssetProfileInfo", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfileInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -15963,7 +15754,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -16056,24 +15847,43 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/noauth/userPasswordPolicy": { + "/api/assetProfileInfo/{assetProfileId}": { "get": { "tags": [ - "auth-controller" + "asset-profile-controller" + ], + "summary": "Get Asset Profile Info (getAssetProfileInfoById)", + "description": "Fetch the Asset Profile Info object based on the provided Asset Profile Id. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileInfoById", + "parameters": [ + { + "name": "assetProfileId", + "in": "path", + "description": "A string value representing the asset profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get the current User password policy (getUserPasswordPolicy)", - "description": "API call to get the password policy for the password validation form(s).", - "operationId": "getUserPasswordPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserPasswordPolicy" + "$ref": "#/components/schemas/AssetProfileInfo" } } } @@ -16183,17 +15993,25 @@ } } } - } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] } }, - "/api/blobEntities": { + "/api/assetProfileInfos": { "get": { "tags": [ - "blob-entity-controller" + "asset-profile-controller" ], - "summary": "Get Blob Entities (getBlobEntities)", - "description": "Returns a page of BlobEntityWithCustomerInfo object that are available for the current user. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. You can specify parameters to filter the 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": "getBlobEntities", + "summary": "Get Asset Profile infos (getAssetProfileInfos)", + "description": "Returns a page of asset profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Asset Profile Info is a lightweight object that includes main information about Asset Profile. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAssetProfileInfos", "parameters": [ { "name": "pageSize", @@ -16215,19 +16033,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "A string value representing the blob entity type. For example, 'report'", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'startsWith' filter based on the blob entity name.", + "description": "The case insensitive 'substring' filter based on the asset profile name.", "required": false, "schema": { "type": "string" @@ -16243,9 +16052,8 @@ "enum": [ "createdTime", "name", - "type", - "contentType", - "customerTitle" + "description", + "isDefault" ] } }, @@ -16261,26 +16069,6 @@ "DESC" ] } - }, - { - "name": "startTime", - "in": "query", - "description": "The start timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "The end timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } } ], "responses": { @@ -16289,7 +16077,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataBlobEntityWithCustomerInfo" + "$ref": "#/components/schemas/PageDataAssetProfileInfo" } } } @@ -16410,19 +16198,19 @@ ] } }, - "/api/blobEntities/list": { + "/api/assetProfileInfos/list": { "get": { "tags": [ - "blob-entity-controller" + "asset-profile-controller" ], - "summary": "Get Blob Entities By Ids (getBlobEntitiesByIds)", - "description": "Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getBlobEntitiesByIds", + "summary": "Get Asset Profiles By Ids (getAssetProfilesByIds)", + "description": "Requested asset profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAssetProfilesByIds", "parameters": [ { - "name": "blobEntityIds", + "name": "assetProfileIds", "in": "query", - "description": "A list of blob entity ids, separated by comma ','", + "description": "A list of asset profile ids, separated by comma ','", "required": true, "schema": { "type": "array", @@ -16440,7 +16228,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/BlobEntityInfo" + "$ref": "#/components/schemas/AssetProfileInfo" } } } @@ -16562,23 +16350,71 @@ ] } }, - "/api/blobEntity/info/{blobEntityId}": { + "/api/assetProfiles": { "get": { "tags": [ - "blob-entity-controller" + "asset-profile-controller" ], - "summary": "Get Blob Entity With Customer Info (getBlobEntityInfoById)", - "description": "Fetch the BlobEntityWithCustomerInfo object based on the provided Blob entity Id. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getBlobEntityInfoById", + "summary": "Get Asset Profiles (getAssetProfiles)", + "description": "Returns a page of asset profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAssetProfiles", "parameters": [ { - "name": "blobEntityId", - "in": "path", - "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the asset profile name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -16587,7 +16423,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BlobEntityWithCustomerInfo" + "$ref": "#/components/schemas/PageDataAssetProfile" } } } @@ -16708,20 +16544,99 @@ ] } }, - "/api/blobEntity/{blobEntityId}": { - "delete": { + "/api/audit/logs": { + "get": { "tags": [ - "blob-entity-controller" + "audit-log-controller" ], - "summary": "Delete Blob Entity (deleteBlobEntity)", - "description": "Delete Blob entity based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteBlobEntity", + "summary": "Get all audit logs (getAuditLogs)", + "description": "Returns a page of audit logs related to all entities in the scope of the current user's 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 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", + "operationId": "getAuditLogs", "parameters": [ { - "name": "blobEntityId", - "in": "path", - "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, "schema": { "type": "string" } @@ -16729,7 +16644,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAuditLog" + } + } + } }, "400": { "description": "Bad Request", @@ -16847,20 +16769,108 @@ ] } }, - "/api/blobEntity/{blobEntityId}/download": { + "/api/audit/logs/customer/{customerId}": { "get": { "tags": [ - "blob-entity-controller" + "audit-log-controller" ], - "summary": "Download Blob Entity By Id (downloadBlobEntity)", - "description": "Download report file based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "downloadBlobEntity", + "summary": "Get audit logs by customer id (getAuditLogsByCustomerId)", + "description": "Returns a page of audit logs related to the targeted customer entities (devices, assets, etc.), and users actions (login, logout, etc.) that belong to this customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", + "operationId": "getAuditLogsByCustomerId", "parameters": [ { - "name": "blobEntityId", + "name": "customerId", "in": "path", - "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, "schema": { "type": "string" } @@ -16872,8 +16882,7 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/PageDataAuditLog" } } } @@ -16994,32 +17003,129 @@ ] } }, - "/api/calculatedField": { - "post": { + "/api/audit/logs/entity/{entityType}/{entityId}": { + "get": { "tags": [ - "calculated-field-controller" + "audit-log-controller" ], - "summary": "Create Or Update Calculated Field (saveCalculatedField)", - "description": "Creates or Updates the Calculated Field. When creating calculated field, platform generates Calculated Field Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Calculated Field Id will be present in the response. Specify existing Calculated Field Id to update the calculated field. Referencing non-existing Calculated Field Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Calculated Field entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveCalculatedField", - "requestBody": { - "description": "A JSON value representing the calculated field.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CalculatedField" - } + "summary": "Get audit logs by entity id (getAuditLogsByEntityId)", + "description": "Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the audit logs.", + "operationId": "getAuditLogsByEntityId", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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": "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 one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CalculatedField" + "$ref": "#/components/schemas/PageDataAuditLog" } } } @@ -17036,7 +17142,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -17140,32 +17246,120 @@ ] } }, - "/api/calculatedField/testScript": { - "post": { + "/api/audit/logs/user/{userId}": { + "get": { "tags": [ - "calculated-field-controller" + "audit-log-controller" ], - "summary": "Test Script expression", - "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "testCalculatedFieldScript", - "requestBody": { - "description": "Test calculated field TBEL expression.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Get audit logs by user id (getAuditLogsByUserId)", + "description": "Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \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 audit logs.", + "operationId": "getAuditLogsByUserId", + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on one of the next properties: entityType, entityName, userName, actionType, actionStatus.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of audit log to sort by. See the 'Model' tab of the Response Class for more details. Note: entityType sort property is not defined in the AuditLog class, however, it can be used to sort audit logs by types of entities that were logged.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the AuditLog class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "actionTypes", + "in": "query", + "description": "A String value representing comma-separated list of action types. This parameter is optional, but it can be used to filter results to fetch only audit logs of specific action types. For example, 'LOGIN', 'LOGOUT'. See the 'Model' tab of the Response Class for more details.", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/PageDataAuditLog" } } } @@ -17182,7 +17376,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -17286,31 +17480,31 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}": { - "get": { + "/api/auth/changePassword": { + "post": { "tags": [ - "calculated-field-controller" + "auth-controller" ], - "summary": "Get Calculated Field (getCalculatedFieldById)", - "description": "Fetch the Calculated Field object based on the provided Calculated Field Id.", - "operationId": "getCalculatedFieldById", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Change password for current User (changePassword)", + "description": "Change the password for the User which credentials are used to perform this REST API call. Be aware that previously generated [JWT](https://jwt.io/) tokens will be still valid until they expire.", + "operationId": "changePassword", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangePasswordRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CalculatedField" + "$ref": "#/components/schemas/JwtPair" } } } @@ -17327,7 +17521,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -17429,24 +17623,16 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/auth/logout": { + "post": { "tags": [ - "calculated-field-controller" - ], - "summary": "Delete Calculated Field (deleteCalculatedField)", - "description": "Deletes the calculated field. Referencing non-existing Calculated Field Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteCalculatedField", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } + "auth-controller" ], + "summary": "Logout (logout)", + "description": "Special API call to record the 'logout' of the user to the Audit Logs. Since platform uses [JWT](https://jwt.io/), the actual logout is the procedure of clearing the [JWT](https://jwt.io/) token on the client side. ", + "operationId": "logout", "responses": { "200": { "description": "OK" @@ -17463,7 +17649,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -17567,31 +17753,21 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}/debug": { + "/api/auth/user": { "get": { "tags": [ - "calculated-field-controller" - ], - "summary": "Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent)", - "description": "Gets latest calculated field debug event for specified calculated field id. Referencing non-existing calculated field id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getLatestCalculatedFieldDebugEvent", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } + "auth-controller" ], + "summary": "Get current User (getUser)", + "description": "Get the information about the User which credentials are used to perform this REST API call.", + "operationId": "getUser", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/User" } } } @@ -17712,39 +17888,22 @@ ] } }, - "/api/calculatedField/{calculatedFieldId}/reprocess": { + "/api/noauth/activate": { "get": { "tags": [ - "calculated-field-controller" + "auth-controller" ], - "summary": "Reprocess Calculated Field (reprocessCalculatedField)", - "description": "Reprocesses the calculated field.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "reprocessCalculatedField", + "summary": "Check Activate User Token (checkActivateToken)", + "description": "Checks the activation token and forwards user to 'Create Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Create Password' page and same 'activateToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", + "operationId": "checkActivateToken", "parameters": [ { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "startTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTs", + "name": "activateToken", "in": "query", + "description": "The activate token string.", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "string" } } ], @@ -17754,7 +17913,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "type": "object" } } } @@ -17864,42 +18023,43 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/calculatedField/{calculatedFieldId}/reprocess/job": { - "get": { + } + }, + "post": { "tags": [ - "calculated-field-controller" + "auth-controller" ], - "summary": "getLastCalculatedFieldReprocessingJob", - "operationId": "getLastCalculatedFieldReprocessingJob", + "summary": "Activate User", + "description": "Checks the activation token and updates corresponding user password in the database. Now the user may start using his password to login. The response already contains the [JWT](https://jwt.io) activation and refresh tokens, to simplify the user activation flow and avoid asking user to input password again after activation. If token is valid, returns the object that contains [JWT](https://jwt.io/) access and refresh tokens. If token is not valid, returns '400 Bad Request'.", + "operationId": "activateUser", "parameters": [ { - "name": "calculatedFieldId", - "in": "path", - "required": true, + "name": "sendActivationMail", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid" + "type": "boolean", + "default": true } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateUserRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Job" + "$ref": "#/components/schemas/JwtPair" } } } @@ -17916,7 +18076,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -18009,29 +18169,22 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/calculatedField/{calculatedFieldId}/reprocess/validate": { + "/api/noauth/resetPassword": { "get": { "tags": [ - "calculated-field-controller" + "auth-controller" ], - "summary": "Validate reprocessing capability of a calculated field (validateCalculatedFieldReprocessing)", - "description": "Checks whether the specified calculated field can be reprocessed. Returns a validation result indicating if reprocessing is allowed and, if not, provides a reason. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "validateCalculatedFieldReprocessing", + "summary": "Check password reset token (checkResetToken)", + "description": "Checks the password reset token and forwards user to 'Reset Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Reset Password' page and same 'resetToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'. If token is expired, redirects to error page.", + "operationId": "checkResetToken", "parameters": [ { - "name": "calculatedFieldId", - "in": "path", + "name": "resetToken", + "in": "query", + "description": "The reset token string.", "required": true, "schema": { "type": "string" @@ -18044,7 +18197,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CfReprocessingValidationResult" + "type": "object" } } } @@ -18154,53 +18307,25 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/calculatedField/{calculatedFieldId}/reprocessAndWait": { - "get": { + } + }, + "post": { "tags": [ - "calculated-field-controller" + "auth-controller" ], - "summary": "Reprocess Calculated Field and wait for completion (reprocessCalculatedFieldAndWait)", - "description": "Reprocesses the calculated field and waits until the job completes or fails.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "reprocessCalculatedFieldAndWait", - "parameters": [ - { - "name": "calculatedFieldId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "startTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" + "summary": "Reset password (resetPassword)", + "description": "Checks the password reset token and updates the password. If token is not valid, returns '400 Bad Request'.", + "operationId": "resetPassword", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordRequest" + } } }, - { - "name": "endTs", - "in": "query", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK" @@ -18217,7 +18342,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -18310,119 +18435,30 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/calculatedField/{entityType}/{entityId}": { - "get": { + "/api/noauth/resetPasswordByEmail": { + "post": { "tags": [ - "calculated-field-controller" + "auth-controller" ], - "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", - "description": "Fetch the Calculated Fields based on the provided Entity Id.", - "operationId": "getCalculatedFieldsByEntityId", - "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": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "Calculated field type. If not specified, all types will be returned.", - "required": false, - "schema": { - "$ref": "#/components/schemas/CalculatedFieldType" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field 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" - ] + "summary": "Request reset password email (requestResetPasswordByEmail)", + "description": "Request to send the reset password email if the user with specified email address is present in the database. Always return '200 OK' status for security purposes.", + "operationId": "requestResetPasswordByEmail", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordEmailRequest" + } } }, - { - "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/PageDataCalculatedField" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -18436,7 +18472,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -18529,136 +18565,24 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/calculatedFields": { + "/api/noauth/userPasswordPolicy": { "get": { "tags": [ - "calculated-field-controller" - ], - "summary": "Get calculated fields (getCalculatedFields)", - "description": "Fetch tenant calculated fields based on the filter.", - "operationId": "getCalculatedFields", - "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": "types", - "in": "query", - "description": "Calculated field types filter.", - "required": false, - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CalculatedFieldType" - }, - "uniqueItems": true - } - }, - { - "name": "entityType", - "in": "query", - "description": "Entity type filter. If not specified, calculated fields for all supported entity types will be returned.", - "required": false, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "entities", - "in": "query", - "description": "Entities filter. If not specified, calculated fields for entity type filter will be returned.", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - }, - "uniqueItems": true - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field 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" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "name", - "in": "query", - "description": "Repeatable name query parameter", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } + "auth-controller" ], + "summary": "Get the current User password policy (getUserPasswordPolicy)", + "description": "API call to get the password policy for the password validation form(s).", + "operationId": "getUserPasswordPolicy", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCalculatedFieldInfo" + "$ref": "#/components/schemas/UserPasswordPolicy" } } } @@ -18768,35 +18692,18 @@ } } } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] + } } }, - "/api/calculatedFields/names": { + "/api/blobEntities": { "get": { "tags": [ - "calculated-field-controller" + "blob-entity-controller" ], - "summary": "Get calculated field names (getCalculatedFieldNames)", - "description": "Fetch the list of calculated field names for specified type.", - "operationId": "getCalculatedFieldNames", + "summary": "Get Blob Entities (getBlobEntities)", + "description": "Returns a page of BlobEntityWithCustomerInfo object that are available for the current user. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. You can specify parameters to filter the 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": "getBlobEntities", "parameters": [ - { - "name": "type", - "in": "query", - "description": "Calculated field type filter.", - "required": true, - "schema": { - "$ref": "#/components/schemas/CalculatedFieldType" - } - }, { "name": "pageSize", "in": "query", @@ -18817,15 +18724,40 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "A string value representing the blob entity type. For example, 'report'", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the calculated field name.", + "description": "The case insensitive 'startsWith' filter based on the blob entity 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", + "contentType", + "customerTitle" + ] + } + }, { "name": "sortOrder", "in": "query", @@ -18838,6 +18770,26 @@ "DESC" ] } + }, + { + "name": "startTime", + "in": "query", + "description": "The start timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "The end timestamp in milliseconds of the search time range over the BlobEntityWithCustomerInfo class field: 'createdTime'.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -18846,7 +18798,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataString" + "$ref": "#/components/schemas/PageDataBlobEntityWithCustomerInfo" } } } @@ -18967,22 +18919,25 @@ ] } }, - "/api/component/{componentDescriptorClazz}": { + "/api/blobEntities/list": { "get": { "tags": [ - "component-descriptor-controller" + "blob-entity-controller" ], - "summary": "Get Component Descriptor (getComponentDescriptorByClazz)", - "description": "Gets the Component Descriptor object using class name from the path parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getComponentDescriptorByClazz", + "summary": "Get Blob Entities By Ids (getBlobEntitiesByIds)", + "description": "Requested blob entities must be owned by tenant or assigned to customer which user is performing the request. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.). See the 'Model' tab of the Response Class for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getBlobEntitiesByIds", "parameters": [ { - "name": "componentDescriptorClazz", - "in": "path", - "description": "Component Descriptor class name", + "name": "blobEntityIds", + "in": "query", + "description": "A list of blob entity ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -18992,7 +18947,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ComponentDescriptor" + "type": "array", + "items": { + "$ref": "#/components/schemas/BlobEntityInfo" + } } } } @@ -19113,38 +19071,22 @@ ] } }, - "/api/components": { + "/api/blobEntity/info/{blobEntityId}": { "get": { "tags": [ - "component-descriptor-controller" + "blob-entity-controller" ], - "summary": "Get Component Descriptors (getComponentDescriptorsByTypes)", - "description": "Gets the Component Descriptors using coma separated list of rule node types and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getComponentDescriptorsByTypes", + "summary": "Get Blob Entity With Customer Info (getBlobEntityInfoById)", + "description": "Fetch the BlobEntityWithCustomerInfo object based on the provided Blob entity Id. The platform uses Blob(binary large object) entities in the reporting feature, in order to store Dashboard states snapshots of different content types in base64 format. BlobEntityWithCustomerInfo represents an object that contains base info about the blob entity(name, type, contentType, etc.) and info about the customer(customerTitle, customerIsPublic) of the user that scheduled generation of the dashboard report. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getBlobEntityInfoById", "parameters": [ { - "name": "componentTypes", - "in": "query", - "description": "List of types of the Rule Nodes, (ENRICHMENT, FILTER, TRANSFORMATION, ACTION or EXTERNAL)", + "name": "blobEntityId", + "in": "path", + "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "ruleChainType", - "in": "query", - "description": "Type of the Rule Chain", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] + "type": "string" } } ], @@ -19154,10 +19096,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentDescriptor" - } + "$ref": "#/components/schemas/BlobEntityWithCustomerInfo" } } } @@ -19278,58 +19217,28 @@ ] } }, - "/api/components/{componentType}": { - "get": { + "/api/blobEntity/{blobEntityId}": { + "delete": { "tags": [ - "component-descriptor-controller" + "blob-entity-controller" ], - "summary": "Get Component Descriptors (getComponentDescriptorsByType)", - "description": "Gets the Component Descriptors using rule node type and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", - "operationId": "getComponentDescriptorsByType", + "summary": "Delete Blob Entity (deleteBlobEntity)", + "description": "Delete Blob entity based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteBlobEntity", "parameters": [ { - "name": "componentType", + "name": "blobEntityId", "in": "path", - "description": "Type of the Rule Node", + "description": "A string value representing the blob entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "ENRICHMENT", - "FILTER", - "TRANSFORMATION", - "ACTION", - "EXTERNAL" - ] - } - }, - { - "name": "ruleChainType", - "in": "query", - "description": "Type of the Rule Chain", - "required": false, - "schema": { - "type": "string", - "enum": [ - "CORE", - "EDGE" - ] + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentDescriptor" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -19447,32 +19356,33 @@ ] } }, - "/api/converter": { - "post": { + "/api/blobEntity/{blobEntityId}/download": { + "get": { "tags": [ - "converter-controller" + "blob-entity-controller" ], - "summary": "Create Or Update Converter (saveConverter)", - "description": "Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. \n\n# Converter Configuration\n\nConverter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. \n\n## Uplink Converter Configuration\n\n***Default converter may be different, depending on integration type***.\n\n```json\n{\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n contentAwareAttributeKeys: ['manufacturer'],\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName'],\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\",\n \"encoder\":null\n}\n```\n\nDecoder field in the more readable form:\n\n```text\n// Decode an uplink message from a buffer\n// payload - array of bytes\n// metadata - key/value object\n\n/** Decoder **/\n\n// decode payload to string\nvar payloadStr = decodeToString(payload);\n\n// decode payload to JSON\n// var data = decodeToJson(payload);\n\nvar deviceName = 'Device A';\nvar deviceType = 'thermostat';\nvar customerName = 'customer';\nvar groupName = 'thermostat devices';\nvar manufacturer = 'Example corporation';\n// use assetName and assetType instead of deviceName and deviceType\n// to automatically create assets instead of devices.\n// var assetName = 'Asset A';\n// var assetType = 'building';\n\n// Result object with device/asset attributes/telemetry data\nvar result = {\n// Use deviceName and deviceType or assetName and assetType, but not both.\n deviceName: deviceName,\n deviceType: deviceType,\n// assetName: assetName,\n// assetType: assetType,\n customerName: customerName,\n groupName: groupName,\n attributes: {\n model: 'Model A',\n serialNumber: 'SN111',\n integrationName: metadata['integrationName']\n manufacturer: manufacturer,\n },\n telemetry: {\n temperature: 42,\n humidity: 80,\n rawData: payloadStr\n }\n};\n\n/** Helper functions **/\n\nfunction decodeToString(payload) {\n return String.fromCharCode.apply(String, payload);\n}\n\nfunction decodeToJson(payload) {\n // covert payload to string.\n var str = decodeToString(payload);\n\n // parse string to JSON\n var data = JSON.parse(str);\n return data;\n}\n\nreturn result;\n```\n\n## Downlink Converter Configuration\n\n```json\n{\n \"decoder\":null,\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\nEncoder field in the more readable form:\n\n```text\n// Encode downlink data from incoming Rule Engine message\n\n// msg - JSON message payload downlink message json\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\n// metadata - list of key-value pairs with additional data about the message\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\n\n/** Encoder **/\n\nvar data = {};\n\n// Process data from incoming message and metadata\n\ndata.tempFreq = msg.temperatureUploadFrequency;\ndata.humFreq = msg.humidityUploadFrequency;\n\ndata.devSerialNumber = metadata['ss_serialNumber'];\n\n// Result object with encoded downlink payload\nvar result = {\n\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\n contentType: \"JSON\",\n\n // downlink data\n data: JSON.stringify(data),\n\n // Optional metadata object presented in key/value format\n metadata: {\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\n }\n\n};\n\nreturn result;\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new converter entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveConverter", - "requestBody": { - "description": "A JSON value representing the converter.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Converter" - } + "summary": "Download Blob Entity By Id (downloadBlobEntity)", + "description": "Download report file based on the provided Blob entity Id. Referencing non-existing Blob entity Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "downloadBlobEntity", + "parameters": [ + { + "name": "blobEntityId", + "in": "path", + "description": "A string value representing the blob entity 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/Converter" + "type": "string", + "format": "binary" } } } @@ -19489,7 +19399,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -19593,31 +19503,20 @@ ] } }, - "/api/converter/testDownLink": { + "/api/calculatedField": { "post": { "tags": [ - "converter-controller" - ], - "summary": "Test converter function (testDownLinkConverter)", - "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n \"data\":\"40\"\n },\n \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"integrationMetadata\":{\n \"integrationName\":\"Integration\"\n },\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - message metadata pushed from the rule engine; \n * 'msg' - message data pushed from the rule engine; \n * 'msgType' - type of the message pushed from the rule engine; \n * 'integrationMetadata' - integration metadata object; \n * 'encoder' - string representation of the encoder configuration.\n\n## Response Body Example\n\n```json\n{\n \"contentType\":\"JSON\",\n \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\",\n \"metadata\":{\n \"topic\":\"sensor/Temp Sensor/upload\"\n }\n}\n```\n\n * 'contentType' - downlink data content type; \n * 'data' - downlink data; \n * 'metadata' - optional metadata object. \n", - "operationId": "testDownLinkConverter", - "parameters": [ - { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, - "schema": { - "$ref": "#/components/schemas/ScriptLanguage" - } - } + "calculated-field-controller" ], + "summary": "Create Or Update Calculated Field (saveCalculatedField)", + "description": "Creates or Updates the Calculated Field. When creating calculated field, platform generates Calculated Field Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Calculated Field Id will be present in the response. Specify existing Calculated Field Id to update the calculated field. Referencing non-existing Calculated Field Id will cause 'Not Found' error. Remove 'id', 'tenantId' from the request body example (below) to create new Calculated Field entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveCalculatedField", "requestBody": { - "description": "A JSON value representing the input to the converter function.", + "description": "A JSON value representing the calculated field.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/CalculatedField" } } }, @@ -19629,7 +19528,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/CalculatedField" } } } @@ -19750,27 +19649,16 @@ ] } }, - "/api/converter/testUpLink": { + "/api/calculatedField/testScript": { "post": { "tags": [ - "converter-controller" - ], - "summary": "Test converter function (testUpLinkConverter)", - "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - integration metadata; \n * 'payload' - base64 string representation of the data; \n * 'decoder' - string representation of the decoder configuration; \n * 'converter' - JSON object representing converter.\n\n## Response Body Example\n\n```json\n{\n \"output\":\"{\\\"deviceName\\\":\\\"Device A\\\",\\\"deviceType\\\":\\\"thermostat\\\",\\\"customerName\\\":\\\"customer\\\",\\\"groupName\\\":\\\"thermostat devices\\\",\\\"attributes\\\":{\\\"model\\\":\\\"Model A\\\",\\\"serialNumber\\\":\\\"SN111\\\"},\\\"telemetry\\\":{\\\"temperature\\\":42,\\\"humidity\\\":80,\\\"rawData\\\":\\\"{\\\\n \\\\\\\"data\\\\\\\": \\\\\\\"data\\\\\\\"\\\\n}\\\"}}\",\n \"error\":\"\"\n}\n```\n\n * 'output' - string representation of the output message; \n * 'error' - string representation of the error message. \n", - "operationId": "testUpLinkConverter", - "parameters": [ - { - "name": "scriptLang", - "in": "query", - "description": "Script language: JS or TBEL", - "required": false, - "schema": { - "$ref": "#/components/schemas/ScriptLanguage" - } - } + "calculated-field-controller" ], + "summary": "Test Script expression", + "description": "Execute the Script expression and return the result. The format of request: \n\n```json\n{\n \"expression\": \"var temp = 0; foreach(element: temperature.values) {temp += element.value;} var avgTemperature = temp / temperature.values.size(); var adjustedTemperature = avgTemperature + 0.1 * humidity.value; return {\\\"adjustedTemperature\\\": adjustedTemperature};\",\n \"arguments\": {\n \"temperature\": {\n \"type\": \"TS_ROLLING\",\n \"timeWindow\": {\n \"startTs\": 1739775630002,\n \"endTs\": 65432211,\n \"limit\": 5\n },\n \"values\": [\n { \"ts\": 1739775639851, \"value\": 23 },\n { \"ts\": 1739775664561, \"value\": 43 },\n { \"ts\": 1739775713079, \"value\": 15 },\n { \"ts\": 1739775999522, \"value\": 34 },\n { \"ts\": 1739776228452, \"value\": 22 }\n ]\n },\n \"humidity\": { \"type\": \"SINGLE_VALUE\", \"ts\": 1739776478057, \"value\": 23 }\n }\n}\n```\n\n Expected result JSON contains \"output\" and \"error\".\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "testCalculatedFieldScript", "requestBody": { - "description": "A JSON value representing the input to the converter function.", + "description": "Test calculated field TBEL expression.", "content": { "application/json": { "schema": { @@ -19907,43 +19795,31 @@ ] } }, - "/api/converter/unwrap/{integrationType}": { - "post": { + "/api/calculatedField/{calculatedFieldId}": { + "get": { "tags": [ - "converter-controller" + "calculated-field-controller" ], - "summary": "Transform input raw payload to the dedicated converter data (unwrapRawPayload)", - "description": "Returns a JSON object representing the result of the unwrapped incoming raw message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n}\n``` * 'metadata' - integration metadata; \n * 'payload' - JSON object representing the input raw message.\n\n## Response Body Example\n\n * 'metadata' - integration metadata enriched with the data from the input message; \n * 'payload' - base64 string representation of the payload from the unwrapped input message; \n * 'contentType' - string representation payload contentType.", - "operationId": "unwrapRawPayload", + "summary": "Get Calculated Field (getCalculatedFieldById)", + "description": "Fetch the Calculated Field object based on the provided Calculated Field Id.", + "operationId": "getCalculatedFieldById", "parameters": [ { - "name": "integrationType", + "name": "calculatedFieldId", "in": "path", - "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", "required": true, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "type": "string" } } ], - "requestBody": { - "description": "A JSON value representing the input message.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/CalculatedField" } } } @@ -19960,7 +19836,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -20062,21 +19938,18 @@ "ApiKeyForm": [] } ] - } - }, - "/api/converter/{converterId}": { - "get": { + }, + "delete": { "tags": [ - "converter-controller" + "calculated-field-controller" ], - "summary": "Get Converter (getConverterById)", - "description": "Fetch the Converter object based on the provided Converter Id. The server checks that the converter is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getConverterById", + "summary": "Delete Calculated Field (deleteCalculatedField)", + "description": "Deletes the calculated field. Referencing non-existing Calculated Field Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteCalculatedField", "parameters": [ { - "name": "converterId", + "name": "calculatedFieldId", "in": "path", - "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -20085,14 +19958,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Converter" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -20208,19 +20074,20 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/calculatedField/{calculatedFieldId}/debug": { + "get": { "tags": [ - "converter-controller" + "calculated-field-controller" ], - "summary": "Delete converter (deleteConverter)", - "description": "Deletes the converter and all the relations (from and to the converter). Referencing non-existing converter Id will cause an error. If the converter is associated with the integration, it will not be allowed for deletion.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteConverter", + "summary": "Get latest calculated field debug event (getLatestCalculatedFieldDebugEvent)", + "description": "Gets latest calculated field debug event for specified calculated field id. Referencing non-existing calculated field id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestCalculatedFieldDebugEvent", "parameters": [ { - "name": "converterId", + "name": "calculatedFieldId", "in": "path", - "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -20229,7 +20096,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } }, "400": { "description": "Bad Request", @@ -20347,59 +20221,39 @@ ] } }, - "/api/converter/{converterId}/debugIn": { + "/api/calculatedField/{calculatedFieldId}/reprocess": { "get": { "tags": [ - "converter-controller" + "calculated-field-controller" ], - "summary": "Get latest debug input event (getLatestConverterDebugInput)", - "description": "Returns a JSON object of the latest debug event representing the input message the converter processed. \n\n## Uplink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":40}\",\n \"inMetadata\":\"{\\\"Header:sec-ch-ua\\\":\\\"\\\\\\\"Chromium\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\"Google Chrome\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\";Not A Brand\\\\\\\";v=\\\\\\\"99\\\\\\\"\\\",\\\"Header:user-agent\\\":\\\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36\\\",\\\"integrationName\\\":\\\"Integration\\\",\\\"Header:cookie\\\":\\\"GUID=zYSs8hymSwZKv8kHALKY; redirect_to=%2F; JSESSIONID=B0A7C8E481409CE7924E738DB04F62F9\\\",\\\"Header:sec-ch-ua-platform\\\":\\\"\\\\\\\"Linux\\\\\\\"\\\",\\\"Header:accept\\\":\\\"*/*\\\",\\\"Header:origin\\\":\\\"http://localhost:8080\\\",\\\"Header:sec-fetch-site\\\":\\\"same-origin\\\",\\\"Header:connection\\\":\\\"keep-alive\\\",\\\"Header:accept-encoding\\\":\\\"gzip, deflate, br\\\",\\\"Header:content-type\\\":\\\"application/json\\\",\\\"Header:content-length\\\":\\\"16\\\",\\\"Header:sec-fetch-mode\\\":\\\"cors\\\",\\\"Header:sec-ch-ua-mobile\\\":\\\"?0\\\",\\\"Header:sec-fetch-dest\\\":\\\"empty\\\",\\\"Header:host\\\":\\\"localhost:8080\\\",\\\"Header:referer\\\":\\\"http://localhost:8080/swagger-ui.html\\\",\\\"Header:accept-language\\\":\\\"en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7,uk;q=0.6,und;q=0.5\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - message data received; \n * 'inMetadata' - integration metadata (e.g. headers).\n\n## Downlink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":42,\\\"humidity\\\":77}\",\n \"inMsgType\":\"POST_TELEMETRY_REQUEST\",\n \"inMetadata\":\"{\\\"data\\\":\\\"40\\\"}\",\n \"inIntegrationMetadata\":\"{\\\"integrationName\\\":\\\"Integration\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - content of the message pushed from the rule engine; \n * 'inMsgType' - type of the message pushed from the rule engine; \n * 'inMetadata' - content of the message metadata pushed from the rule engine; \n * 'inIntegrationMetadata' - integration metadata. \n\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getLatestConverterDebugInput", + "summary": "Reprocess Calculated Field (reprocessCalculatedField)", + "description": "Reprocesses the calculated field.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "reprocessCalculatedField", "parameters": [ { - "name": "converterId", + "name": "calculatedFieldId", "in": "path", - "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } }, { - "name": "converterType", - "in": "query", - "description": "A string value representing the converter type. One of the following:\nUPLINK, DOWNLINK", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "integrationType", - "in": "query", - "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "integrationName", + "name": "startTs", "in": "query", - "description": "A string value representing the integration name. For example, 'My New Integration'", - "required": false, + "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int64" } }, { - "name": "converterVersion", + "name": "endTs", "in": "query", - "description": "Converter version.", - "required": false, + "required": true, "schema": { "type": "integer", - "format": "int32" + "format": "int64" } } ], @@ -20409,7 +20263,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/Job" } } } @@ -20530,89 +20384,21 @@ ] } }, - "/api/converters": { + "/api/calculatedField/{calculatedFieldId}/reprocess/job": { "get": { "tags": [ - "converter-controller" + "calculated-field-controller" ], - "summary": "Get Converters (getConverters)", - "description": "Returns a page of converters 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": "getConverters", + "summary": "getLastCalculatedFieldReprocessingJob", + "operationId": "getLastCalculatedFieldReprocessingJob", "parameters": [ { - "name": "isEdgeTemplate", - "in": "query", - "description": "Fetch edge template converters", - "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": "calculatedFieldId", + "in": "path", "required": true, "schema": { "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the converter 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" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "integrationType", - "in": "query", - "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", - "required": false, - "schema": { - "$ref": "#/components/schemas/IntegrationType" + "format": "uuid" } } ], @@ -20622,7 +20408,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataConverter" + "$ref": "#/components/schemas/Job" } } } @@ -20743,25 +20529,21 @@ ] } }, - "/api/converters/list": { + "/api/calculatedField/{calculatedFieldId}/reprocess/validate": { "get": { "tags": [ - "converter-controller" + "calculated-field-controller" ], - "summary": "Get Converters By Ids (getConvertersByIds)", - "description": "Requested converters must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getConvertersByIds", + "summary": "Validate reprocessing capability of a calculated field (validateCalculatedFieldReprocessing)", + "description": "Checks whether the specified calculated field can be reprocessed. Returns a validation result indicating if reprocessing is allowed and, if not, provides a reason. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "validateCalculatedFieldReprocessing", "parameters": [ { - "name": "converterIds", - "in": "query", - "description": "A list of converter ids, separated by comma ','", + "name": "calculatedFieldId", + "in": "path", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -20771,10 +20553,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Converter" - } + "$ref": "#/components/schemas/CfReprocessingValidationResult" } } } @@ -20895,74 +20674,45 @@ ] } }, - "/api/converter/library/{integrationType}/vendors": { + "/api/calculatedField/{calculatedFieldId}/reprocessAndWait": { "get": { "tags": [ - "converter-library-controller" + "calculated-field-controller" ], - "summary": "Get vendors (getVendors)", - "description": "Returns a list of vendors for the integration type", - "operationId": "getVendors", + "summary": "Reprocess Calculated Field and wait for completion (reprocessCalculatedFieldAndWait)", + "description": "Reprocesses the calculated field and waits until the job completes or fails.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "reprocessCalculatedFieldAndWait", "parameters": [ { - "name": "integrationType", + "name": "calculatedFieldId", "in": "path", "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "converterType", - "in": "query", - "required": false, "schema": { "type": "string" } }, { - "name": "page", + "name": "startTs", "in": "query", - "required": false, + "required": true, "schema": { "type": "integer", - "format": "int32", - "default": 0 + "format": "int64" } }, { - "name": "pageSize", + "name": "endTs", "in": "query", - "required": false, + "required": true, "schema": { "type": "integer", - "format": "int32", - "default": 2147483647 - } - }, - { - "name": "loadImages", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "default": true + "format": "int64" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Vendor" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -21080,66 +20830,95 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/models": { + "/api/calculatedField/{entityType}/{entityId}": { "get": { "tags": [ - "converter-library-controller" + "calculated-field-controller" ], - "summary": "Get vendor models (getVendorModels)", - "description": "Returns a list of models for the vendor, integration type and converter type", - "operationId": "getVendorModels", + "summary": "Get Calculated Fields by Entity Id (getCalculatedFieldsByEntityId)", + "description": "Fetch the Calculated Fields based on the provided Entity Id.", + "operationId": "getCalculatedFieldsByEntityId", "parameters": [ { - "name": "integrationType", + "name": "entityType", "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "type": "string" } }, { - "name": "vendorName", + "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": "converterType", + "name": "pageSize", "in": "query", - "required": false, + "description": "Maximum amount of entities in a one page", + "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { "name": "page", "in": "query", - "required": false, + "description": "Sequence number of page starting from 0", + "required": true, "schema": { "type": "integer", - "format": "int32", - "default": 0 + "format": "int32" } }, { - "name": "pageSize", + "name": "type", "in": "query", + "description": "Calculated field type. If not specified, all types will be returned.", "required": false, "schema": { - "type": "integer", - "format": "int32", - "default": 2147483647 + "$ref": "#/components/schemas/CalculatedFieldType" } }, { - "name": "loadImages", + "name": "textSearch", "in": "query", + "description": "The case insensitive 'substring' filter based on the calculated field name.", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -21149,10 +20928,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Model" - } + "$ref": "#/components/schemas/PageDataCalculatedField" } } } @@ -21273,47 +21049,125 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink": { + "/api/calculatedFields": { "get": { "tags": [ - "converter-library-controller" + "calculated-field-controller" ], - "summary": "Get downlink converter (getDownlinkConverter)", - "description": "Returns downlink converter body for the vendor, integration type and model", - "operationId": "getDownlinkConverter", + "summary": "Get calculated fields (getCalculatedFields)", + "description": "Fetch tenant calculated fields based on the filter.", + "operationId": "getCalculatedFields", "parameters": [ { - "name": "integrationType", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "type": "integer", + "format": "int32" } }, { - "name": "vendorName", - "in": "path", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "model", - "in": "path", - "required": true, + "name": "types", + "in": "query", + "description": "Calculated field types filter.", + "required": false, + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalculatedFieldType" + }, + "uniqueItems": true + } + }, + { + "name": "entityType", + "in": "query", + "description": "Entity type filter. If not specified, calculated fields for all supported entity types will be returned.", + "required": false, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "entities", + "in": "query", + "description": "Entities filter. If not specified, calculated fields for entity type filter will be returned.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the calculated field 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" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "name", + "in": "query", + "description": "Repeatable name query parameter", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } } ], "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataCalculatedFieldInfo" } } } @@ -21434,47 +21288,74 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/metadata": { + "/api/calculatedFields/names": { "get": { "tags": [ - "converter-library-controller" + "calculated-field-controller" ], - "summary": "Get downlink converter metadata (getDownlinkConverterMetadata)", - "description": "Returns downlink converter metadata for the vendor, integration type and model", - "operationId": "getDownlinkConverterMetadata", + "summary": "Get calculated field names (getCalculatedFieldNames)", + "description": "Fetch the list of calculated field names for specified type.", + "operationId": "getCalculatedFieldNames", "parameters": [ { - "name": "integrationType", - "in": "path", + "name": "type", + "in": "query", + "description": "Calculated field type filter.", "required": true, "schema": { - "$ref": "#/components/schemas/IntegrationType" + "$ref": "#/components/schemas/CalculatedFieldType" } }, { - "name": "vendorName", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "model", - "in": "path", + "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 calculated field name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataString" } } } @@ -21595,34 +21476,19 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/payload": { + "/api/component/{componentDescriptorClazz}": { "get": { "tags": [ - "converter-library-controller" + "component-descriptor-controller" ], - "summary": "Get downlink payload (getDownlinkPayload)", - "description": "Returns payload example for the downlink converter for the vendor, integration type and model", - "operationId": "getDownlinkPayload", + "summary": "Get Component Descriptor (getComponentDescriptorByClazz)", + "description": "Gets the Component Descriptor object using class name from the path parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getComponentDescriptorByClazz", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "model", + "name": "componentDescriptorClazz", "in": "path", + "description": "Component Descriptor class name", "required": true, "schema": { "type": "string" @@ -21633,9 +21499,9 @@ "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/ComponentDescriptor" } } } @@ -21756,37 +21622,38 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink": { + "/api/components": { "get": { "tags": [ - "converter-library-controller" + "component-descriptor-controller" ], - "summary": "Get uplink converter (getUplinkConverter)", - "description": "Returns uplink converter body for the vendor, integration type and model", - "operationId": "getUplinkConverter", + "summary": "Get Component Descriptors (getComponentDescriptorsByTypes)", + "description": "Gets the Component Descriptors using coma separated list of rule node types and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getComponentDescriptorsByTypes", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", - "in": "path", + "name": "componentTypes", + "in": "query", + "description": "List of types of the Rule Nodes, (ENRICHMENT, FILTER, TRANSFORMATION, ACTION or EXTERNAL)", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { - "name": "model", - "in": "path", - "required": true, + "name": "ruleChainType", + "in": "query", + "description": "Type of the Rule Chain", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] } } ], @@ -21794,9 +21661,12 @@ "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentDescriptor" + } } } } @@ -21917,37 +21787,42 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/metadata": { + "/api/components/{componentType}": { "get": { "tags": [ - "converter-library-controller" + "component-descriptor-controller" ], - "summary": "Get uplink converter metadata (getUplinkConverterMetadata)", - "description": "Returns uplink converter metadata for the vendor, integration type and model", - "operationId": "getUplinkConverterMetadata", + "summary": "Get Component Descriptors (getComponentDescriptorsByType)", + "description": "Gets the Component Descriptors using rule node type and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getComponentDescriptorsByType", "parameters": [ { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", + "name": "componentType", "in": "path", + "description": "Type of the Rule Node", "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "ENRICHMENT", + "FILTER", + "TRANSFORMATION", + "ACTION", + "EXTERNAL" + ] } }, { - "name": "model", - "in": "path", - "required": true, + "name": "ruleChainType", + "in": "query", + "description": "Type of the Rule Chain", + "required": false, "schema": { - "type": "string" + "type": "string", + "enum": [ + "CORE", + "EDGE" + ] } } ], @@ -21955,9 +21830,12 @@ "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentDescriptor" + } } } } @@ -22078,47 +21956,32 @@ ] } }, - "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/payload": { - "get": { + "/api/converter": { + "post": { "tags": [ - "converter-library-controller" + "converter-controller" ], - "summary": "Get uplink payload (getUplinkPayload)", - "description": "Returns payload example for the uplink converter for the vendor, integration type and model", - "operationId": "getUplinkPayload", - "parameters": [ - { - "name": "integrationType", - "in": "path", - "required": true, - "schema": { - "$ref": "#/components/schemas/IntegrationType" - } - }, - { - "name": "vendorName", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Create Or Update Converter (saveConverter)", + "description": "Create or update the Converter. When creating converter, platform generates Converter Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created converter id will be present in the response. Specify existing Converter id to update the converter. Referencing non-existing converter Id will cause 'Not Found' error. Converter name is unique in the scope of tenant. \n\n# Converter Configuration\n\nConverter configuration (**'configuration'** field) is the JSON object that should contain one of two possible fields: **'decoder'** or **'encoder'**. The former is used when the converter has UPLINK type, the latter is used - when DOWNLINK type. It can contain both 'decoder' and 'encoder' fields, when the correct one is specified for the appropriate converter type, another one can be set to 'null'. See the examples of each one below. \n\n## Uplink Converter Configuration\n\n***Default converter may be different, depending on integration type***.\n\n```json\n{\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n contentAwareAttributeKeys: ['manufacturer'],\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName'],\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\",\n \"encoder\":null\n}\n```\n\nDecoder field in the more readable form:\n\n```text\n// Decode an uplink message from a buffer\n// payload - array of bytes\n// metadata - key/value object\n\n/** Decoder **/\n\n// decode payload to string\nvar payloadStr = decodeToString(payload);\n\n// decode payload to JSON\n// var data = decodeToJson(payload);\n\nvar deviceName = 'Device A';\nvar deviceType = 'thermostat';\nvar customerName = 'customer';\nvar groupName = 'thermostat devices';\nvar manufacturer = 'Example corporation';\n// use assetName and assetType instead of deviceName and deviceType\n// to automatically create assets instead of devices.\n// var assetName = 'Asset A';\n// var assetType = 'building';\n\n// Result object with device/asset attributes/telemetry data\nvar result = {\n// Use deviceName and deviceType or assetName and assetType, but not both.\n deviceName: deviceName,\n deviceType: deviceType,\n// assetName: assetName,\n// assetType: assetType,\n customerName: customerName,\n groupName: groupName,\n attributes: {\n model: 'Model A',\n serialNumber: 'SN111',\n integrationName: metadata['integrationName']\n manufacturer: manufacturer,\n },\n telemetry: {\n temperature: 42,\n humidity: 80,\n rawData: payloadStr\n }\n};\n\n/** Helper functions **/\n\nfunction decodeToString(payload) {\n return String.fromCharCode.apply(String, payload);\n}\n\nfunction decodeToJson(payload) {\n // covert payload to string.\n var str = decodeToString(payload);\n\n // parse string to JSON\n var data = JSON.parse(str);\n return data;\n}\n\nreturn result;\n```\n\n## Downlink Converter Configuration\n\n```json\n{\n \"decoder\":null,\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempFreq = msg.temperatureUploadFrequency;\\ndata.humFreq = msg.humidityUploadFrequency;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\nEncoder field in the more readable form:\n\n```text\n// Encode downlink data from incoming Rule Engine message\n\n// msg - JSON message payload downlink message json\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\n// metadata - list of key-value pairs with additional data about the message\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\n\n/** Encoder **/\n\nvar data = {};\n\n// Process data from incoming message and metadata\n\ndata.tempFreq = msg.temperatureUploadFrequency;\ndata.humFreq = msg.humidityUploadFrequency;\n\ndata.devSerialNumber = metadata['ss_serialNumber'];\n\n// Result object with encoded downlink payload\nvar result = {\n\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\n contentType: \"JSON\",\n\n // downlink data\n data: JSON.stringify(data),\n\n // Optional metadata object presented in key/value format\n metadata: {\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\n }\n\n};\n\nreturn result;\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new converter entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveConverter", + "requestBody": { + "description": "A JSON value representing the converter.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Converter" + } } }, - { - "name": "model", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/Converter" } } } @@ -22135,7 +21998,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -22239,31 +22102,43 @@ ] } }, - "/api/customMenu": { - "get": { + "/api/converter/testDownLink": { + "post": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Get end-user Custom Menu configuration (getCustomMenu)", - "description": "Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration.", - "operationId": "getCustomMenu", + "summary": "Test converter function (testDownLinkConverter)", + "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n \"data\":\"40\"\n },\n \"msg\":\"{\\n \\\"temp\\\": 42,\\n \\\"humidity\\\": 77\\n}\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"integrationMetadata\":{\n \"integrationName\":\"Integration\"\n },\n \"encoder\":\"// Encode downlink data from incoming Rule Engine message\\n\\n// msg - JSON message payload downlink message json\\n// msgType - type of message, for ex. 'ATTRIBUTES_UPDATED', 'POST_TELEMETRY_REQUEST', etc.\\n// metadata - list of key-value pairs with additional data about the message\\n// integrationMetadata - list of key-value pairs with additional data defined in Integration executing this converter\\n\\n/** Encoder **/\\n\\nvar data = {};\\n\\n// Process data from incoming message and metadata\\n\\ndata.tempValue = msg.temp;\\ndata.humValue = msg.humidity;\\n\\ndata.devSerialNumber = metadata['ss_serialNumber'];\\n\\n// Result object with encoded downlink payload\\nvar result = {\\n\\n // downlink data content type: JSON, TEXT or BINARY (base64 format)\\n contentType: \\\"JSON\\\",\\n\\n // downlink data\\n data: JSON.stringify(data),\\n\\n // Optional metadata object presented in key/value format\\n metadata: {\\n topic: metadata['deviceType']+'/'+metadata['deviceName']+'/upload'\\n }\\n\\n};\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - message metadata pushed from the rule engine; \n * 'msg' - message data pushed from the rule engine; \n * 'msgType' - type of the message pushed from the rule engine; \n * 'integrationMetadata' - integration metadata object; \n * 'encoder' - string representation of the encoder configuration.\n\n## Response Body Example\n\n```json\n{\n \"contentType\":\"JSON\",\n \"data\":\"{\\\"tempValue\\\":42,\\\"humValue\\\":77}\",\n \"metadata\":{\n \"topic\":\"sensor/Temp Sensor/upload\"\n }\n}\n```\n\n * 'contentType' - downlink data content type; \n * 'data' - downlink data; \n * 'metadata' - optional metadata object. \n", + "operationId": "testDownLinkConverter", "parameters": [ { - "name": "If-None-Match", - "in": "header", + "name": "scriptLang", + "in": "query", + "description": "Script language: JS or TBEL", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/ScriptLanguage" } } ], + "requestBody": { + "description": "A JSON value representing the input to the converter function.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenuConfig" + "$ref": "#/components/schemas/JsonNode" } } } @@ -22280,7 +22155,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -22382,42 +22257,33 @@ "ApiKeyForm": [] } ] - }, + } + }, + "/api/converter/testUpLink": { "post": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Create Custom Menu (createCustomMenu)", - "description": "The api is designed to create Custom Menu without configuration. Is not applicable for update.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "createCustomMenu", + "summary": "Test converter function (testUpLinkConverter)", + "description": "Returns a JSON object representing the result of the processed incoming message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n \"decoder\":\"// Decode an uplink message from a buffer\\n// payload - array of bytes\\n// metadata - key/value object\\n\\n/** Decoder **/\\n\\n// decode payload to string\\nvar payloadStr = decodeToString(payload);\\n\\n// decode payload to JSON\\n// var data = decodeToJson(payload);\\n\\nvar deviceName = 'Device A';\\nvar deviceType = 'thermostat';\\nvar customerName = 'customer';\\nvar groupName = 'thermostat devices';\\nvar manufacturer = 'Example corporation';\\n// use assetName and assetType instead of deviceName and deviceType\\n// to automatically create assets instead of devices.\\n// var assetName = 'Asset A';\\n// var assetType = 'building';\\n\\n// Result object with device/asset attributes/telemetry data\\nvar result = {\\n// Use deviceName and deviceType or assetName and assetType, but not both.\\n deviceName: deviceName,\\n deviceType: deviceType,\\n// assetName: assetName,\\n// assetType: assetType,\\n customerName: customerName,\\n groupName: groupName,\\n attributes: {\\n model: 'Model A',\\n serialNumber: 'SN111',\\n integrationName: metadata['integrationName']\\n manufacturer: manufacturer\\n },\\n telemetry: {\\n temperature: 42,\\n humidity: 80,\\n rawData: payloadStr\\n }\\n};\\n\\n/** Helper functions **/\\n\\nfunction decodeToString(payload) {\\n return String.fromCharCode.apply(String, payload);\\n}\\n\\nfunction decodeToJson(payload) {\\n // covert payload to string.\\n var str = decodeToString(payload);\\n\\n // parse string to JSON\\n var data = JSON.parse(str);\\n return data;\\n}\\n\\nreturn result;\"\n}\n```\n\n * 'metadata' - integration metadata; \n * 'payload' - base64 string representation of the data; \n * 'decoder' - string representation of the decoder configuration; \n * 'converter' - JSON object representing converter.\n\n## Response Body Example\n\n```json\n{\n \"output\":\"{\\\"deviceName\\\":\\\"Device A\\\",\\\"deviceType\\\":\\\"thermostat\\\",\\\"customerName\\\":\\\"customer\\\",\\\"groupName\\\":\\\"thermostat devices\\\",\\\"attributes\\\":{\\\"model\\\":\\\"Model A\\\",\\\"serialNumber\\\":\\\"SN111\\\"},\\\"telemetry\\\":{\\\"temperature\\\":42,\\\"humidity\\\":80,\\\"rawData\\\":\\\"{\\\\n \\\\\\\"data\\\\\\\": \\\\\\\"data\\\\\\\"\\\\n}\\\"}}\",\n \"error\":\"\"\n}\n```\n\n * 'output' - string representation of the output message; \n * 'error' - string representation of the error message. \n", + "operationId": "testUpLinkConverter", "parameters": [ { - "name": "assignToList", - "in": "query", - "description": "A list of entity ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "force", + "name": "scriptLang", "in": "query", - "description": "Use force if you want to create default menu that conflicts with the existing one (old one will be update NO_ASSIGN assignee type)", + "description": "Script language: JS or TBEL", "required": false, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/ScriptLanguage" } } ], "requestBody": { + "description": "A JSON value representing the input to the converter function.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenuInfo" + "$ref": "#/components/schemas/JsonNode" } } }, @@ -22429,7 +22295,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenu" + "$ref": "#/components/schemas/JsonNode" } } } @@ -22550,96 +22416,43 @@ ] } }, - "/api/customMenu/infos": { - "get": { + "/api/converter/unwrap/{integrationType}": { + "post": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Get all custom menus configured at user level (getCustomMenuInfos)", - "description": "Returns a page of custom menu info objects owned by the tenant or the customer of a current user, scope and assigneeType request parameters can be used to filter the result.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getCustomMenuInfos", + "summary": "Transform input raw payload to the dedicated converter data (unwrapRawPayload)", + "description": "Returns a JSON object representing the result of the unwrapped incoming raw message. \n\n## Request Body Example\n\n```json\n{\n \"metadata\":{\n },\n \"payload\":\"ewogICAgImRhdGEiOiAiZGF0YSIKfQ==\",\n}\n``` * 'metadata' - integration metadata; \n * 'payload' - JSON object representing the input raw message.\n\n## Response Body Example\n\n * 'metadata' - integration metadata enriched with the data from the input message; \n * 'payload' - base64 string representation of the payload from the unwrapped input message; \n * 'contentType' - string representation payload contentType.", + "operationId": "unwrapRawPayload", "parameters": [ { - "name": "scope", - "in": "query", - "description": "Custom menu scope.", - "required": false, - "schema": { - "$ref": "#/components/schemas/CMScope" - } - }, - { - "name": "assigneeType", - "in": "query", - "description": "Custom menu assignee type.", - "required": false, - "schema": { - "$ref": "#/components/schemas/CMAssigneeType" - } - }, - { - "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": "integrationType", + "in": "path", + "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the custom menu name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/IntegrationType" } } ], + "requestBody": { + "description": "A JSON value representing the input message.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCustomMenuInfo" + "$ref": "#/components/schemas/JsonNode" } } } @@ -22656,7 +22469,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -22760,32 +22573,22 @@ ] } }, - "/api/customMenu/{customMenuId}": { - "delete": { + "/api/converter/{converterId}": { + "get": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Delete custom menu (deleteCustomMenu)", - "description": "Deletes the custom menu based on the provided Custom Menu Id. Referencing non-existing custom menu Id will cause an error. If the custom menu is assigned to the list of users or customers bad request is returned.To delete a custom menu that has assignee list set 'force' request param to true ", - "operationId": "deleteCustomMenu", + "summary": "Get Converter (getConverterById)", + "description": "Fetch the Converter object based on the provided Converter Id. The server checks that the converter is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getConverterById", "parameters": [ { - "name": "customMenuId", + "name": "converterId", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "force", - "in": "query", - "description": "Force set to true will unassign menu before deletion", - "required": false, - "schema": { - "type": "boolean" + "type": "string" } } ], @@ -22795,7 +22598,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenuDeleteResult" + "$ref": "#/components/schemas/Converter" } } } @@ -22914,41 +22717,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customMenu/{customMenuId}/assigneeList": { - "get": { + }, + "delete": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Get Custom Menu assignee list (getCustomMenuAssigneeList)", - "description": "Fetch the list of Entity Info objects that represents users or customers, or empty list if custom menu is not assigned or has NO_ASSIGN/ALL assignee type.\n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", - "operationId": "getCustomMenuAssigneeList", + "summary": "Delete converter (deleteConverter)", + "description": "Deletes the converter and all the relations (from and to the converter). Referencing non-existing converter Id will cause an error. If the converter is associated with the integration, it will not be allowed for deletion.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteConverter", "parameters": [ { - "name": "customMenuId", + "name": "converterId", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -23066,23 +22856,59 @@ ] } }, - "/api/customMenu/{customMenuId}/config": { + "/api/converter/{converterId}/debugIn": { "get": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Get Custom Menu configuration by id (getCustomMenuConfig)", - "description": "Fetch the Custom Menu configuration based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", - "operationId": "getCustomMenuConfig", + "summary": "Get latest debug input event (getLatestConverterDebugInput)", + "description": "Returns a JSON object of the latest debug event representing the input message the converter processed. \n\n## Uplink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":40}\",\n \"inMetadata\":\"{\\\"Header:sec-ch-ua\\\":\\\"\\\\\\\"Chromium\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\"Google Chrome\\\\\\\";v=\\\\\\\"94\\\\\\\", \\\\\\\";Not A Brand\\\\\\\";v=\\\\\\\"99\\\\\\\"\\\",\\\"Header:user-agent\\\":\\\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36\\\",\\\"integrationName\\\":\\\"Integration\\\",\\\"Header:cookie\\\":\\\"GUID=zYSs8hymSwZKv8kHALKY; redirect_to=%2F; JSESSIONID=B0A7C8E481409CE7924E738DB04F62F9\\\",\\\"Header:sec-ch-ua-platform\\\":\\\"\\\\\\\"Linux\\\\\\\"\\\",\\\"Header:accept\\\":\\\"*/*\\\",\\\"Header:origin\\\":\\\"http://localhost:8080\\\",\\\"Header:sec-fetch-site\\\":\\\"same-origin\\\",\\\"Header:connection\\\":\\\"keep-alive\\\",\\\"Header:accept-encoding\\\":\\\"gzip, deflate, br\\\",\\\"Header:content-type\\\":\\\"application/json\\\",\\\"Header:content-length\\\":\\\"16\\\",\\\"Header:sec-fetch-mode\\\":\\\"cors\\\",\\\"Header:sec-ch-ua-mobile\\\":\\\"?0\\\",\\\"Header:sec-fetch-dest\\\":\\\"empty\\\",\\\"Header:host\\\":\\\"localhost:8080\\\",\\\"Header:referer\\\":\\\"http://localhost:8080/swagger-ui.html\\\",\\\"Header:accept-language\\\":\\\"en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7,uk;q=0.6,und;q=0.5\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - message data received; \n * 'inMetadata' - integration metadata (e.g. headers).\n\n## Downlink Converter Debug Input Event Example\n\n```json\n{\n \"inContentType\":\"JSON\",\n \"inContent\":\"{\\\"temp\\\":42,\\\"humidity\\\":77}\",\n \"inMsgType\":\"POST_TELEMETRY_REQUEST\",\n \"inMetadata\":\"{\\\"data\\\":\\\"40\\\"}\",\n \"inIntegrationMetadata\":\"{\\\"integrationName\\\":\\\"Integration\\\"}\"\n}\n```\n\n * 'inContentType' - content type of the message received by the integration; \n * 'inContent' - content of the message pushed from the rule engine; \n * 'inMsgType' - type of the message pushed from the rule engine; \n * 'inMetadata' - content of the message metadata pushed from the rule engine; \n * 'inIntegrationMetadata' - integration metadata. \n\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getLatestConverterDebugInput", "parameters": [ { - "name": "customMenuId", + "name": "converterId", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the converter id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "converterType", + "in": "query", + "description": "A string value representing the converter type. One of the following:\nUPLINK, DOWNLINK", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "integrationType", + "in": "query", + "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "integrationName", + "in": "query", + "description": "A string value representing the integration name. For example, 'My New Integration'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "converterVersion", + "in": "query", + "description": "Converter version.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" } } ], @@ -23092,7 +22918,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenuConfig" + "$ref": "#/components/schemas/JsonNode" } } } @@ -23211,43 +23037,101 @@ "ApiKeyForm": [] } ] - }, - "put": { + } + }, + "/api/converters": { + "get": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Update Custom Menu configuration based on the provided Custom Menu Id (updateCustomMenuConfig)", - "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "updateCustomMenuConfig", + "summary": "Get Converters (getConverters)", + "description": "Returns a page of converters 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": "getConverters", "parameters": [ { - "name": "customMenuId", - "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template converters", + "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", - "format": "uuid" + "minimum": 1 } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomMenuConfig" - } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 } }, - "required": true - }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the converter 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" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "integrationType", + "in": "query", + "description": "A string value representing the integration type. One of the following:\nAPACHE_PULSAR, AWS_IOT, AWS_KINESIS, AWS_SQS, AZURE_EVENT_HUB, AZURE_IOT_HUB, AZURE_SERVICE_BUS, CHIRPSTACK, COAP, CUSTOM, HTTP, IBM_WATSON_IOT, KAFKA, LORIOT, MQTT, OCEANCONNECT, OPC_UA, PUB_SUB, RABBITMQ, SIGFOX, TCP, THINGPARK, TMOBILE_IOT_CDP, TPE, TTI, TTN, TUYA, UDP", + "required": false, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenu" + "$ref": "#/components/schemas/PageDataConverter" } } } @@ -23368,23 +23252,25 @@ ] } }, - "/api/customMenu/{customMenuId}/info": { + "/api/converters/list": { "get": { "tags": [ - "custom-menu-controller" + "converter-controller" ], - "summary": "Get Custom Menu Info (getCustomMenuInfoById)", - "description": "Fetch the Custom Menu Info object based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", - "operationId": "getCustomMenuInfoById", + "summary": "Get Converters By Ids (getConvertersByIds)", + "description": "Requested converters must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getConvertersByIds", "parameters": [ { - "name": "customMenuId", - "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "converterIds", + "in": "query", + "description": "A list of converter ids, separated by comma ','", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -23394,7 +23280,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomMenuInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/Converter" + } } } } @@ -23515,40 +23404,74 @@ ] } }, - "/api/customMenu/{customMenuId}/name": { - "put": { + "/api/converter/library/{integrationType}/vendors": { + "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Update Custom Menu name based on the provided Custom Menu Id (updateCustomMenuName)", - "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "updateCustomMenuName", + "summary": "Get vendors (getVendors)", + "description": "Returns a list of vendors for the integration type", + "operationId": "getVendors", "parameters": [ { - "name": "customMenuId", + "name": "integrationType", "in": "path", - "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/IntegrationType" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "string", - "description": "New name of the custom menu" - } + }, + { + "name": "converterType", + "in": "query", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "loadImages", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vendor" + } + } + } + } }, "400": { "description": "Bad Request", @@ -23666,57 +23589,82 @@ ] } }, - "/api/customMenu/{id}/assign/{assigneeType}": { - "put": { + "/api/converter/library/{integrationType}/{vendorName}/models": { + "get": { "tags": [ - "custom-menu-controller" + "converter-library-controller" ], - "summary": "Update custom menu assignee list (updateCustomMenuAssigneeList)", - "description": "The api designed to update the list of assignees or assignee type based on the provided Custom Menu Id. To change assignee type, put new assignee type in path parameter.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", - "operationId": "updateCustomMenuAssigneeList", + "summary": "Get vendor models (getVendorModels)", + "description": "Returns a list of models for the vendor, integration type and converter type", + "operationId": "getVendorModels", "parameters": [ { - "name": "id", + "name": "integrationType", "in": "path", "required": true, "schema": { - "type": "string", - "format": "uuid" + "$ref": "#/components/schemas/IntegrationType" } }, { - "name": "assigneeType", + "name": "vendorName", "in": "path", "required": true, "schema": { - "$ref": "#/components/schemas/CMAssigneeType" + "type": "string" } }, { - "name": "force", + "name": "converterType", "in": "query", - "description": "Use force if you want to override default menu", "required": false, "schema": { - "type": "boolean" + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 0 + } + }, + { + "name": "pageSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 2147483647 + } + }, + { + "name": "loadImages", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model" + } } } } - } - }, - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -23834,19 +23782,34 @@ ] } }, - "/api/translation/custom/merged/{localeCode}": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink": { "get": { "tags": [ - "custom-translation-controller" + "converter-library-controller" ], - "summary": "Get end-user Custom Translation configuration (getMergedCustomTranslation)", - "description": "Fetch end-user Custom Translation for specified locale. The custom translation is configured in the white labeling parameters. If custom translation translation is defined on the tenant level, it overrides the custom translation of the system level. Similar, if the custom translation is defined on the customer level, it overrides the translation configuration of the tenant level.", - "operationId": "getMergedCustomTranslation", + "summary": "Get downlink converter (getDownlinkConverter)", + "description": "Returns downlink converter body for the vendor, integration type and model", + "operationId": "getDownlinkConverter", "parameters": [ { - "name": "localeCode", + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" @@ -23857,9 +23820,9 @@ "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string" } } } @@ -23980,19 +23943,34 @@ ] } }, - "/api/translation/custom/{localeCode}": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/metadata": { "get": { "tags": [ - "custom-translation-controller" + "converter-library-controller" ], - "summary": "Get Custom Translation configuration (getCustomTranslation)", - "description": "Fetch the Custom Translation for specified locale that corresponds to the authority of the user. The API call is designed to load the custom translation items for edition. So, the result is NOT merged with the parent level configuration. Let's assume there is a custom translation configured on a system level. And there is no custom translation items configured on a tenant level. In such a case, the API call will return empty object for the tenant administrator. \n\n Response example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getCustomTranslation", + "summary": "Get downlink converter metadata (getDownlinkConverterMetadata)", + "description": "Returns downlink converter metadata for the vendor, integration type and model", + "operationId": "getDownlinkConverterMetadata", "parameters": [ { - "name": "localeCode", + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" @@ -24003,9 +23981,9 @@ "200": { "description": "OK", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "string" } } } @@ -24124,38 +24102,52 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/payload": { + "get": { "tags": [ - "custom-translation-controller" + "converter-library-controller" ], - "summary": "Create Or Update Custom Translation (saveCustomTranslation)", - "description": "Creates or Updates the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "saveCustomTranslation", + "summary": "Get downlink payload (getDownlinkPayload)", + "description": "Returns payload example for the downlink converter for the vendor, integration type and model", + "operationId": "getDownlinkPayload", "parameters": [ { - "name": "localeCode", + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -24169,7 +24161,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24271,19 +24263,36 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink": { + "get": { "tags": [ - "custom-translation-controller" + "converter-library-controller" ], - "summary": "Delete Custom Translation for specified locale (deleteCustomTranslation)", - "description": "Delete entire custom translation settings for end-user\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "deleteCustomTranslation", + "summary": "Get uplink converter (getUplinkConverter)", + "description": "Returns uplink converter body for the vendor, integration type and model", + "operationId": "getUplinkConverter", "parameters": [ { - "name": "localeCode", + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" @@ -24292,7 +24301,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -24408,38 +24424,52 @@ "ApiKeyForm": [] } ] - }, - "patch": { + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/metadata": { + "get": { "tags": [ - "custom-translation-controller" + "converter-library-controller" ], - "summary": "Update Custom Translation for specified translation keys only (patchCustomTranslation)", - "description": "The API call is designed to update the custom translation for specified key only. \n\n Request example: \n\n```json\n{\"notification.active\":\"active\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "patchCustomTranslation", + "summary": "Get uplink converter metadata (getUplinkConverterMetadata)", + "description": "Returns uplink converter metadata for the vendor, integration type and model", + "operationId": "getUplinkConverterMetadata", "parameters": [ { - "name": "localeCode", + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -24557,46 +24587,50 @@ ] } }, - "/api/translation/custom/{localeCode}/upload": { - "post": { + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/payload": { + "get": { "tags": [ - "custom-translation-controller" + "converter-library-controller" ], - "summary": "Upload Custom Translation (uploadCustomTranslation)", - "description": "Upload the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "uploadCustomTranslation", + "summary": "Get uplink payload (getUplinkPayload)", + "description": "Returns payload example for the uplink converter for the vendor, integration type and model", + "operationId": "getUplinkPayload", "parameters": [ { - "name": "localeCode", + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/IntegrationType" + } + }, + { + "name": "vendorName", "in": "path", - "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "multipart/form-data": { - "schema": { - "type": "object", - "properties": { - "file": { - "type": "string", - "format": "binary" - } - }, - "required": [ - "file" - ] - } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, "400": { "description": "Bad Request", @@ -24610,7 +24644,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -24714,29 +24748,19 @@ ] } }, - "/api/translation/custom/{localeCode}/{keyPath}": { - "delete": { + "/api/customMenu": { + "get": { "tags": [ - "custom-translation-controller" + "custom-menu-controller" ], - "summary": "Delete specified key of Custom Translation (deleteCustomTranslationKey) ", - "description": "The API call is designed to delete specified key of the custom translation and return as a result parent translation.(e.g. if tenant translation for key is 'value1' and customer translation is 'value2' then by deletinf key onn customer level you will get 'value1' in response) \n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "deleteCustomTranslationKey", + "summary": "Get end-user Custom Menu configuration (getCustomMenu)", + "description": "Fetch the Custom Menu configuration object for the authorized user. The custom menu is configured in the white labeling parameters and has one of three user scopes:SYSTEM, TENANT, CUSTOMER and four assignee type: NO_ASSIGN, ALL, CUSTOMERS, USERS.There are three default (assignee type: ALL) menus configured on the system level for each scope and if no other menu is configured for user, system configuration of the corresponding scope will be applied.If a custom menu with assignee type ALL is configured on the tenant level, it overrides the menu configuration of the corresponding scope on the system level. If a custom menu with assignee type USER_GROUPS is configured on the tenant level, it overrides default tenant menu.If a custom menu with assignee type CUSTOMERS is configured on tenant level for specific customer, it will be applied to all customer users.If a custom menu with assignee type ALL is configured on the customer level, it overrides the menu assigned on tenant level.If a custom menu with assignee type USER_GROUPS is configured on the customer level, it overrides default customer menu.If a custom menu is assigned to specific user, it overrides all other configuration.", + "operationId": "getCustomMenu", "parameters": [ { - "name": "localeCode", - "in": "path", - "description": "Locale code (e.g. 'en_US').", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "keyPath", - "in": "path", - "description": "A string value representing key of the custom translation (e.g. 'notification.active').", - "required": true, + "name": "If-None-Match", + "in": "header", + "required": false, "schema": { "type": "string" } @@ -24744,7 +24768,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuConfig" + } + } + } }, "400": { "description": "Bad Request", @@ -24860,30 +24891,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customer": { + }, "post": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Create or update Customer (saveCustomer)", - "description": "Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveCustomer", + "summary": "Create Custom Menu (createCustomMenu)", + "description": "The api is designed to create Custom Menu without configuration. Is not applicable for update.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "createCustomMenu", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupIds", + "name": "assignToList", "in": "query", - "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", + "description": "A list of entity ids, separated by comma ','", "required": false, "schema": { "type": "array", @@ -24893,42 +24913,20 @@ } }, { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", + "name": "force", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "Use force if you want to create default menu that conflicts with the existing one (old one will be update NO_ASSIGN assignee type)", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "boolean" } } ], "requestBody": { - "description": "A JSON value representing the customer.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/CustomMenuInfo" } } }, @@ -24940,7 +24938,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/CustomMenu" } } } @@ -25061,23 +25059,87 @@ ] } }, - "/api/customer/info/{customerId}": { + "/api/customMenu/infos": { "get": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Get Customer info (getCustomerInfoById)", - "description": "Get the Customer info object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerInfoById", + "summary": "Get all custom menus configured at user level (getCustomMenuInfos)", + "description": "Returns a page of custom menu info objects owned by the tenant or the customer of a current user, scope and assigneeType request parameters can be used to filter the result.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCustomMenuInfos", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "scope", + "in": "query", + "description": "Custom menu scope.", + "required": false, + "schema": { + "$ref": "#/components/schemas/CMScope" + } + }, + { + "name": "assigneeType", + "in": "query", + "description": "Custom menu assignee type.", + "required": false, + "schema": { + "$ref": "#/components/schemas/CMAssigneeType" + } + }, + { + "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 custom menu name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -25086,7 +25148,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerInfo" + "$ref": "#/components/schemas/PageDataCustomMenuInfo" } } } @@ -25207,22 +25269,32 @@ ] } }, - "/api/customer/{customerId}": { - "get": { + "/api/customMenu/{customMenuId}": { + "delete": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Get Customer (getCustomerById)", - "description": "Get the Customer object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerById", + "summary": "Delete custom menu (deleteCustomMenu)", + "description": "Deletes the custom menu based on the provided Custom Menu Id. Referencing non-existing custom menu Id will cause an error. If the custom menu is assigned to the list of users or customers bad request is returned.To delete a custom menu that has assignee list set 'force' request param to true ", + "operationId": "deleteCustomMenu", "parameters": [ { - "name": "customerId", + "name": "customMenuId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + }, + { + "name": "force", + "in": "query", + "description": "Force set to true will unassign menu before deletion", + "required": false, + "schema": { + "type": "boolean" } } ], @@ -25232,7 +25304,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/CustomMenuDeleteResult" } } } @@ -25351,28 +25423,41 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customMenu/{customMenuId}/assigneeList": { + "get": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Delete Customer (deleteCustomer)", - "description": "Deletes the Customer and all customer Users. All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. Referencing non-existing Customer Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteCustomer", + "summary": "Get Custom Menu assignee list (getCustomMenuAssigneeList)", + "description": "Fetch the list of Entity Info objects that represents users or customers, or empty list if custom menu is not assigned or has NO_ASSIGN/ALL assignee type.\n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", + "operationId": "getCustomMenuAssigneeList", "parameters": [ { - "name": "customerId", + "name": "customMenuId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -25490,99 +25575,188 @@ ] } }, - "/api/customer/{customerId}/customerInfos": { + "/api/customMenu/{customMenuId}/config": { "get": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Get Customer sub-customers Infos (getCustomerCustomerInfos)", - "description": "Returns a page of customer info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerCustomerInfos", + "summary": "Get Custom Menu configuration by id (getCustomMenuConfig)", + "description": "Fetch the Custom Menu configuration based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", + "operationId": "getCustomMenuConfig", "parameters": [ { - "name": "customerId", + "name": "customMenuId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuConfig" + } + } } }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the customer title.", - "required": false, - "schema": { - "type": "string" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } } }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title", - "email", - "country", - "city" - ] + "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": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "ApiKeyForm": [] + } + ] + }, + "put": { + "tags": [ + "custom-menu-controller" + ], + "summary": "Update Custom Menu configuration based on the provided Custom Menu Id (updateCustomMenuConfig)", + "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "updateCustomMenuConfig", + "parameters": [ + { + "name": "customMenuId", + "in": "path", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuConfig" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCustomerInfo" + "$ref": "#/components/schemas/CustomMenu" } } } @@ -25703,22 +25877,23 @@ ] } }, - "/api/customer/{customerId}/shortInfo": { + "/api/customMenu/{customMenuId}/info": { "get": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Get short Customer info (getShortCustomerInfoById)", - "description": "Get the short customer object that contains only the title and 'isPublic' flag. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getShortCustomerInfoById", + "summary": "Get Custom Menu Info (getCustomMenuInfoById)", + "description": "Fetch the Custom Menu Info object based on the provided Custom Menu Id. \n\nSecurity check is performed to verify that the user has 'READ' permission for the custom menu with specified id.", + "operationId": "getCustomMenuInfoById", "parameters": [ { - "name": "customerId", + "name": "customMenuId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -25728,7 +25903,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/CustomMenuInfo" } } } @@ -25849,36 +26024,41 @@ ] } }, - "/api/customer/{customerId}/title": { - "get": { + "/api/customMenu/{customMenuId}/name": { + "put": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Get Customer Title (getCustomerTitleById)", - "description": "Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerTitleById", + "summary": "Update Custom Menu name based on the provided Custom Menu Id (updateCustomMenuName)", + "description": "\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "updateCustomMenuName", "parameters": [ { - "name": "customerId", + "name": "customMenuId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the custom menu id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/text": { - "schema": { - "type": "string" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "New name of the custom menu" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -25995,93 +26175,57 @@ ] } }, - "/api/customerInfos/all": { - "get": { + "/api/customMenu/{id}/assign/{assigneeType}": { + "put": { "tags": [ - "customer-controller" + "custom-menu-controller" ], - "summary": "Get All Customer Infos for current user (getAllCustomerInfos)", - "description": "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. \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": "getAllCustomerInfos", + "summary": "Update custom menu assignee list (updateCustomMenuAssigneeList)", + "description": "The api designed to update the list of assignees or assignee type based on the provided Custom Menu Id. To change assignee type, put new assignee type in path parameter.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the custom menu with specified id.", + "operationId": "updateCustomMenuAssigneeList", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "id", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "format": "uuid" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "assigneeType", + "in": "path", "required": true, "schema": { - "type": "integer", - "format": "int32" + "$ref": "#/components/schemas/CMAssigneeType" } }, { - "name": "includeCustomers", + "name": "force", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "Use force if you want to override default menu", "required": false, "schema": { "type": "boolean" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "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/PageDataCustomerInfo" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" } } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -26199,72 +26343,23 @@ ] } }, - "/api/customers": { + "/api/translation/custom/merged/{localeCode}": { "get": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Tenant Customers (getCustomers)", - "description": "Returns a page of customers owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomers", + "summary": "Get end-user Custom Translation configuration (getMergedCustomTranslation)", + "description": "Fetch end-user Custom Translation for specified locale. The custom translation is configured in the white labeling parameters. If custom translation translation is defined on the tenant level, it overrides the custom translation of the system level. Similar, if the custom translation is defined on the customer level, it overrides the translation configuration of the tenant level.", + "operationId": "getMergedCustomTranslation", "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": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -26273,7 +26368,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataCustomer" + "$ref": "#/components/schemas/JsonNode" } } } @@ -26394,25 +26489,22 @@ ] } }, - "/api/customers/list": { + "/api/translation/custom/{localeCode}": { "get": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get customers by Customer Ids (getCustomersByIds)", - "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomersByIds", + "summary": "Get Custom Translation configuration (getCustomTranslation)", + "description": "Fetch the Custom Translation for specified locale that corresponds to the authority of the user. The API call is designed to load the custom translation items for edition. So, the result is NOT merged with the parent level configuration. Let's assume there is a custom translation configured on a system level. And there is no custom translation items configured on a tenant level. In such a case, the API call will return empty object for the tenant administrator. \n\n Response example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCustomTranslation", "parameters": [ { - "name": "customerIds", - "in": "query", - "description": "A list of customer ids, separated by comma ','", + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -26422,10 +26514,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Customer" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -26544,96 +26633,39 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{entityGroupId}/customers": { - "get": { + }, + "post": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get customers by Entity Group Id (getCustomersByEntityGroupId)", - "description": "Returns a page of Customer objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getCustomersByEntityGroupId", + "summary": "Create Or Update Custom Translation (saveCustomTranslation)", + "description": "Creates or Updates the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveCustomTranslation", "parameters": [ { - "name": "entityGroupId", + "name": "localeCode", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "Locale code (e.g. 'en_US').", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "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/PageDataCustomer" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -26646,7 +26678,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -26748,21 +26780,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/customers": { - "get": { + }, + "delete": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Tenant Customer by Customer title (getTenantCustomer)", - "description": "Get the Customer using Customer Title. \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": "getTenantCustomer", + "summary": "Delete Custom Translation for specified locale (deleteCustomTranslation)", + "description": "Delete entire custom translation settings for end-user\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "deleteCustomTranslation", "parameters": [ { - "name": "customerTitle", - "in": "query", - "description": "A string value representing the Customer title.", + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", "required": true, "schema": { "type": "string" @@ -26771,14 +26801,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Customer" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -26894,87 +26917,39 @@ "ApiKeyForm": [] } ] - } - }, - "/api/user/customers": { - "get": { + }, + "patch": { "tags": [ - "customer-controller" + "custom-translation-controller" ], - "summary": "Get Customers (getUserCustomers)", - "description": "Returns a page of customers available for the user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserCustomers", + "summary": "Update Custom Translation for specified translation keys only (patchCustomTranslation)", + "description": "The API call is designed to update the custom translation for specified key only. \n\n Request example: \n\n```json\n{\"notification.active\":\"active\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "patchCustomTranslation", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the 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", - "title", - "email", - "country", - "city" - ] - } - }, - { - "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/PageDataCustomer" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -27091,24 +27066,46 @@ ] } }, - "/api/customer/dashboard/home/info": { - "get": { + "/api/translation/custom/{localeCode}/upload": { + "post": { "tags": [ - "dashboard-controller" + "custom-translation-controller" ], - "summary": "Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo)", - "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", - "operationId": "getCustomerHomeDashboardInfo", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" - } + "summary": "Upload Custom Translation (uploadCustomTranslation)", + "description": "Upload the Custom Translation for specified locale.\n\n Request example: \n\n```json\n{\"home\":\"MyHome\"}\n```\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "uploadCustomTranslation", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] } } + } + }, + "responses": { + "200": { + "description": "OK" }, "400": { "description": "Bad Request", @@ -27122,7 +27119,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -27224,24 +27221,36 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/translation/custom/{localeCode}/{keyPath}": { + "delete": { "tags": [ - "dashboard-controller" + "custom-translation-controller" ], - "summary": "Update Customer Home Dashboard Info (setCustomerHomeDashboardInfo)", - "description": "Update the home dashboard assignment for the current customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", - "operationId": "setCustomerHomeDashboardInfo", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" - } + "summary": "Delete specified key of Custom Translation (deleteCustomTranslationKey) ", + "description": "The API call is designed to delete specified key of the custom translation and return as a result parent translation.(e.g. if tenant translation for key is 'value1' and customer translation is 'value2' then by deletinf key onn customer level you will get 'value1' in response) \n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "deleteCustomTranslationKey", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "keyPath", + "in": "path", + "description": "A string value representing key of the custom translation (e.g. 'notification.active').", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "OK" @@ -27258,7 +27267,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -27362,96 +27371,85 @@ ] } }, - "/api/customer/{customerId}/dashboards": { - "get": { + "/api/customer": { + "post": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Customer Dashboards (getCustomerDashboards)", - "description": "Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDashboards", + "summary": "Create or update Customer (saveCustomer)", + "description": "Creates or Updates the Customer. When creating customer, platform generates Customer Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Customer entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveCustomer", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "entityGroupId", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity group.", + "required": false, "schema": { - "type": "integer", - "format": "int32" + "type": "string" } }, { - "name": "includeCustomers", + "name": "entityGroupIds", "in": "query", - "description": "Include customer or sub-customer entities", + "description": "A list of string values, separated by comma ',' representing the Entity Group Ids. For example, '784f394c-42b6-435a-983c-b7beff2784f9','a84f394c-42b6-435a-083c-b7beff2784f9'. If specified, the entity will be added to the corresponding entity groups.", "required": false, "schema": { - "type": "boolean" + "type": "array", + "items": { + "type": "string" + } } }, { - "name": "textSearch", + "name": "nameConflictPolicy", "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "sortProperty", + "name": "uniquifySeparator", "in": "query", - "description": "Property of entity to sort by", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "title" - ] + "default": "_" } }, { - "name": "sortOrder", + "name": "uniquifyStrategy", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "description": "A JSON value representing the customer.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "$ref": "#/components/schemas/Customer" } } } @@ -27468,7 +27466,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -27572,62 +27570,32 @@ ] } }, - "/api/dashboard": { - "post": { + "/api/customer/info/{customerId}": { + "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Create Or Update Dashboard (saveDashboard)", - "description": "Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDashboard", + "summary": "Get Customer info (getCustomerInfoById)", + "description": "Get the Customer info object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerInfoById", "parameters": [ { - "name": "entityGroupId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "description": "A JSON value representing the dashboard.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Dashboard" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Dashboard" + "$ref": "#/components/schemas/CustomerInfo" } } } @@ -27644,7 +27612,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -27748,19 +27716,20 @@ ] } }, - "/api/dashboard/home": { + "/api/customer/{customerId}": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Home Dashboard (getHomeDashboard)", - "description": "Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getHomeDashboard", + "summary": "Get Customer (getCustomerById)", + "description": "Get the Customer object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerById", "parameters": [ { - "name": "Accept-Encoding", - "in": "header", - "required": false, + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -27772,7 +27741,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HomeDashboard" + "$ref": "#/components/schemas/Customer" } } } @@ -27891,26 +27860,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/dashboard/home/info": { - "get": { + }, + "delete": { "tags": [ - "dashboard-controller" + "customer-controller" + ], + "summary": "Delete Customer (deleteCustomer)", + "description": "Deletes the Customer and all customer Users. All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. Referencing non-existing Customer Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteCustomer", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Home Dashboard Info (getHomeDashboardInfo)", - "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getHomeDashboardInfo", "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -28028,169 +27999,99 @@ ] } }, - "/api/dashboard/info/{dashboardId}": { + "/api/customer/{customerId}/customerInfos": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Dashboard Info (getDashboardInfoById)", - "description": "Get the information about the dashboard based on 'dashboardId' parameter. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.", - "operationId": "getDashboardInfoById", + "summary": "Get Customer sub-customers Infos (getCustomerCustomerInfos)", + "description": "Returns a page of customer info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerCustomerInfos", "parameters": [ { - "name": "dashboardId", + "name": "customerId", "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DashboardInfo" - } - } - } }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the customer title.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } }, { - "ApiKeyForm": [] + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } - ] - } - }, - "/api/dashboard/maxDatapointsLimit": { - "get": { - "tags": [ - "dashboard-controller" ], - "summary": "Get max data points limit (getMaxDatapointsLimit)", - "description": "Get the maximum number of data points that dashboard may request from the server per in a single subscription command. This value impacts the time window behavior. It impacts 'Max values' parameter in case user selects 'None' as 'Data aggregation function'. It also impacts the 'Grouping interval' in case of any other 'Data aggregation function' is selected. The actual value of the limit is configurable in the system configuration file.", - "operationId": "getMaxDatapointsLimit", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64", - "example": 5000 + "$ref": "#/components/schemas/PageDataCustomerInfo" } } } @@ -28311,23 +28212,32 @@ ] } }, - "/api/dashboard/serverTime": { + "/api/customer/{customerId}/shortInfo": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" + ], + "summary": "Get short Customer info (getShortCustomerInfoById)", + "description": "Get the short customer object that contains only the title and 'isPublic' flag. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getShortCustomerInfoById", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get server time (getServerTime)", - "description": "Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust view of the dashboards according to the difference between browser and server time.", - "operationId": "getServerTime", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64", - "example": 1636023857137 + "$ref": "#/components/schemas/JsonNode" } } } @@ -28448,49 +28358,32 @@ ] } }, - "/api/dashboard/{dashboardId}": { + "/api/customer/{customerId}/title": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get Dashboard (getDashboardById)", - "description": "Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDashboardById", + "summary": "Get Customer Title (getCustomerTitleById)", + "description": "Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.\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": "getCustomerTitleById", "parameters": [ { - "name": "dashboardId", + "name": "customerId", "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "includeResources", - "in": "query", - "description": "Export used resources and replace resource links with resource metadata", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "Accept-Encoding", - "in": "header", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/text": { "schema": { - "$ref": "#/components/schemas/Dashboard" + "type": "string" } } } @@ -28609,164 +28502,82 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/customerInfos/all": { + "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Delete the Dashboard (deleteDashboard)", - "description": "Delete the Dashboard. Only users with 'TENANT_ADMIN') authority may delete the dashboards.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDashboard", + "summary": "Get All Customer Infos for current user (getAllCustomerInfos)", + "description": "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. \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": "getAllCustomerInfos", "parameters": [ { - "name": "dashboardId", - "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK" - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } + "type": "integer", + "format": "int32" } }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" } }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the customer title.", + "required": false, + "schema": { + "type": "string" } }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ { - "HttpLoginForm": [] + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/dashboards": { - "get": { - "tags": [ - "dashboard-controller" - ], - "summary": "Get dashboards by Dashboard Ids (getDashboardsByIds)", - "description": "Returns a list of DashboardInfo 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": "getDashboardsByIds", - "parameters": [ - { - "name": "dashboardIds", + "name": "sortOrder", "in": "query", - "description": "A list of dashboard ids, separated by comma ','", - "required": true, + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -28776,10 +28587,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DashboardInfo" - } + "$ref": "#/components/schemas/PageDataCustomerInfo" } } } @@ -28900,14 +28708,14 @@ ] } }, - "/api/dashboards/all": { + "/api/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get All Dashboards for current user (getAllDashboards)", - "description": "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. \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": "getAllDashboards", + "summary": "Get Tenant Customers (getCustomers)", + "description": "Returns a page of customers owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomers", "parameters": [ { "name": "pageSize", @@ -28929,19 +28737,10 @@ "format": "int32" } }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", + "description": "The case insensitive 'substring' filter based on the customer title.", "required": false, "schema": { "type": "string" @@ -28956,7 +28755,10 @@ "type": "string", "enum": [ "createdTime", - "title" + "title", + "email", + "country", + "city" ] } }, @@ -28980,7 +28782,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "$ref": "#/components/schemas/PageDataCustomer" } } } @@ -29101,77 +28903,25 @@ ] } }, - "/api/entityGroup/{entityGroupId}/dashboards": { + "/api/customers/list": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Get dashboards by Entity Group Id (getDashboardsByEntityGroupId)", - "description": "Returns a page of Dashboard objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getDashboardsByEntityGroupId", + "summary": "Get customers by Customer Ids (getCustomersByIds)", + "description": "Returns a list of Customer objects based on the provided ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomersByIds", "parameters": [ { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "customerIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of customer ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "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" + } } } ], @@ -29181,7 +28931,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/Customer" + } } } } @@ -29302,14 +29055,14 @@ ] } }, - "/api/entityGroup/{entityGroupId}/dashboards/export": { + "/api/entityGroup/{entityGroupId}/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Export Dashboards (exportGroupDashboards)", - "description": "Export the dashboards that belong to specified group id.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "exportGroupDashboards", + "summary": "Get customers by Entity Group Id (getCustomersByEntityGroupId)", + "description": "Returns a page of Customer objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getCustomersByEntityGroupId", "parameters": [ { "name": "entityGroupId", @@ -29321,22 +29074,62 @@ } }, { - "name": "limit", + "name": "pageSize", "in": "query", - "description": "Limit of the entities to export", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { - "name": "Accept-Encoding", - "in": "header", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the 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", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -29345,10 +29138,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Dashboard" - } + "$ref": "#/components/schemas/PageDataCustomer" } } } @@ -29469,53 +29259,36 @@ ] } }, - "/api/entityGroup/{entityGroupId}/dashboards/import": { - "post": { + "/api/tenant/customers": { + "get": { "tags": [ - "dashboard-controller" + "customer-controller" ], - "summary": "Import Dashboards (importGroupDashboards)", - "description": "Import the dashboards to specified group.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "importGroupDashboards", + "summary": "Get Tenant Customer by Customer title (getTenantCustomer)", + "description": "Get the Customer using Customer Title. \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": "getTenantCustomer", "parameters": [ { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "customerTitle", + "in": "query", + "description": "A string value representing the Customer title.", "required": true, "schema": { "type": "string" } - }, - { - "name": "overwrite", - "in": "query", - "description": "Overwrite dashboards with the same name", - "required": false, - "schema": { - "type": "boolean", - "default": false - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "JSON array with the dashboard objects", - "items": { - "$ref": "#/components/schemas/Dashboard" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -29528,7 +29301,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -29632,21 +29405,81 @@ ] } }, - "/api/tenant/dashboard/home/info": { + "/api/user/customers": { "get": { "tags": [ - "dashboard-controller" + "customer-controller" + ], + "summary": "Get Customers (getUserCustomers)", + "description": "Returns a page of customers available for the user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserCustomers", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the 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", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", - "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. \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": "getTenantHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" + "$ref": "#/components/schemas/PageDataCustomer" } } } @@ -29765,27 +29598,26 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/customer/dashboard/home/info": { + "get": { "tags": [ "dashboard-controller" ], - "summary": "Update Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", - "description": "Update the home dashboard assignment for the current tenant. \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": "setTenantHomeDashboardInfo", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HomeDashboardInfo" - } - } - }, - "required": true - }, + "summary": "Get Customer Home Dashboard Info (getCustomerHomeDashboardInfo)", + "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCustomerHomeDashboardInfo", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDashboardInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -29799,7 +29631,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -29901,92 +29733,27 @@ "ApiKeyForm": [] } ] - } - }, - "/api/tenant/dashboards": { - "get": { + }, + "post": { "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards (getTenantDashboards)", - "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantDashboards", - "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": "mobile", - "in": "query", - "description": "Exclude dashboards that are hidden for mobile", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] + "summary": "Update Customer Home Dashboard Info (setCustomerHomeDashboardInfo)", + "description": "Update the home dashboard assignment for the current customer. \n\nAvailable for users with 'CUSTOMER_USER' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "setCustomerHomeDashboardInfo", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDashboardInfo" + } } }, - { - "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/PageDataDashboardInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -30000,7 +29767,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -30104,19 +29871,19 @@ ] } }, - "/api/tenant/{tenantId}/dashboards": { + "/api/customer/{customerId}/dashboards": { "get": { "tags": [ "dashboard-controller" ], - "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", - "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", - "operationId": "getTenantDashboardsByTenantId", + "summary": "Get Customer Dashboards (getCustomerDashboards)", + "description": "Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDashboards", "parameters": [ { - "name": "tenantId", + "name": "customerId", "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -30142,6 +29909,15 @@ "format": "int32" } }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "textSearch", "in": "query", @@ -30305,105 +30081,62 @@ ] } }, - "/api/user/dashboards": { - "get": { + "/api/dashboard": { + "post": { "tags": [ "dashboard-controller" ], - "summary": "Get Dashboards (getUserDashboards)", - "description": "Returns a page of Dashboard Info objects available for specified or 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. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.\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": "getUserDashboards", + "summary": "Create Or Update Dashboard (saveDashboard)", + "description": "Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error. Only users with 'TENANT_ADMIN') authority may create the dashboards.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Dashboard entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDashboard", "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": "mobile", - "in": "query", - "description": "Exclude dashboards that are hidden for mobile", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", + "name": "entityGroupId", "in": "query", - "description": "The case insensitive 'substring' filter based on the dashboard title.", "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "title" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "operation", + "name": "entityGroupIds", "in": "query", - "description": "Filter by allowed operations for the current user", + "description": "A list of entity group ids, separated by comma ','", "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { - "name": "userId", - "in": "query", - "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "Accept-Encoding", + "in": "header", "required": false, "schema": { "type": "string" } } ], + "requestBody": { + "description": "A JSON value representing the dashboard.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dashboard" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDashboardInfo" + "$ref": "#/components/schemas/Dashboard" } } } @@ -30420,7 +30153,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -30524,56 +30257,31 @@ ] } }, - "/api/report/test": { - "post": { + "/api/dashboard/home": { + "get": { "tags": [ - "dashboard-report-controller" + "dashboard-controller" ], - "summary": "Download test report (downloadTestReport)", - "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "downloadTestReport", + "summary": "Get Home Dashboard (getHomeDashboard)", + "description": "Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getHomeDashboard", "parameters": [ { - "name": "reportsServerEndpointUrl", - "in": "query", - "description": "A string value representing the report server endpoint.", + "name": "Accept-Encoding", + "in": "header", "required": false, "schema": { "type": "string" - }, - "example": "http://localhost:8383" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DashboardReportConfig" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/HomeDashboard" } } } @@ -30590,7 +30298,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -30694,55 +30402,21 @@ ] } }, - "/api/report/{dashboardId}/download": { - "post": { + "/api/dashboard/home/info": { + "get": { "tags": [ - "dashboard-report-controller" - ], - "summary": "Download dashboard report (downloadDashboardReport)", - "description": "Generate and download a report from the specified dashboard. The request payload is a JSON object with params of report. For example:\n\n```json\n{\n \"type\": \"pdf\",\n \"timezone\": \"Europe/Kiev\",\n \"timewindow\": {\n \"displayValue\": \"\",\n \"hideInterval\": false,\n \"hideLastInterval\": false,\n \"hideQuickInterval\": false,\n \"hideAggregation\": false,\n \"hideAggInterval\": false,\n \"hideTimezone\": false,\n \"selectedTab\": 0,\n \"realtime\": {\n \"realtimeType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"history\": {\n \"historyType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"fixedTimewindow\": {\n \"startTimeMs\": 1703687976592,\n \"endTimeMs\": 1703774376592\n },\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"aggregation\": {\n \"type\": \"AVG\",\n \"limit\": 25000\n }\n },\n \"state\": null\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "downloadDashboardReport", - "parameters": [ - { - "name": "dashboardId", - "in": "path", - "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "dashboard-controller" ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } - } - }, - "required": true - }, + "summary": "Get Home Dashboard Info (getHomeDashboardInfo)", + "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { - "application/pdf": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/jpeg": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "image/png": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/HomeDashboardInfo" } } } @@ -30759,7 +30433,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -30863,19 +30537,19 @@ ] } }, - "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "/api/dashboard/info/{dashboardId}": { "get": { "tags": [ - "device-connectivity-controller" + "dashboard-controller" ], - "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", - "description": "Download generated docker-compose.yml for gateway.", - "operationId": "downloadGatewayDockerCompose", + "summary": "Get Dashboard Info (getDashboardInfoById)", + "description": "Get the information about the dashboard based on 'dashboardId' parameter. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.", + "operationId": "getDashboardInfoById", "parameters": [ { - "name": "deviceId", + "name": "dashboardId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -30886,10 +30560,9 @@ "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/DashboardInfo" } } } @@ -31010,50 +30683,164 @@ ] } }, - "/api/device-connectivity/{deviceId}": { + "/api/dashboard/maxDatapointsLimit": { "get": { "tags": [ - "device-connectivity-controller" - ], - "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", - "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDevicePublishTelemetryCommands", - "parameters": [ - { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "dashboard-controller" ], + "summary": "Get max data points limit (getMaxDatapointsLimit)", + "description": "Get the maximum number of data points that dashboard may request from the server per in a single subscription command. This value impacts the time window behavior. It impacts 'Max values' parameter in case user selects 'None' as 'Data aggregation function'. It also impacts the 'Grouping interval' in case of any other 'Data aggregation function' is selected. The actual value of the limit is configurable in the system configuration file.", + "operationId": "getMaxDatapointsLimit", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "type": "integer", + "format": "int64", + "example": 5000 + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" }, "examples": { - "http": { - "description": "http", - "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" - }, - "mqtt": { - "description": "mqtt", - "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" - }, - "coap": { - "description": "coap", - "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" + "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/dashboard/serverTime": { + "get": { + "tags": [ + "dashboard-controller" + ], + "summary": "Get server time (getServerTime)", + "description": "Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust view of the dashboards according to the difference between browser and server time.", + "operationId": "getServerTime", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64", + "example": 1636023857137 + } + } + } + }, "400": { "description": "Bad Request", "content": { @@ -31170,33 +30957,49 @@ ] } }, - "/api/device-connectivity/{protocol}/certificate/download": { + "/api/dashboard/{dashboardId}": { "get": { "tags": [ - "device-connectivity-controller" + "dashboard-controller" ], - "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", - "description": "Download server certificate.", - "operationId": "downloadServerCertificate", + "summary": "Get Dashboard (getDashboardById)", + "description": "Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDashboardById", "parameters": [ { - "name": "protocol", + "name": "dashboardId", "in": "path", - "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "includeResources", + "in": "query", + "description": "Export used resources and replace resource links with resource metadata", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { "200": { "description": "OK", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/Dashboard" } } } @@ -31315,54 +31118,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/customer/device/{deviceName}/claim": { - "post": { + }, + "delete": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Claim device (claimDevice)", - "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "claimDevice", + "summary": "Delete the Dashboard (deleteDashboard)", + "description": "Delete the Dashboard. Only users with 'TENANT_ADMIN') authority may delete the dashboards.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDashboard", "parameters": [ { - "name": "deviceName", + "name": "dashboardId", "in": "path", - "description": "Unique name of the device which is going to be claimed", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - }, - { - "name": "subCustomerId", - "in": "query", - "required": false, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClaimRequest" - } - } - } - }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -31376,7 +31153,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -31478,22 +31255,27 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/dashboards": { + "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Reclaim device (reClaimDevice)", - "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", - "operationId": "reClaimDevice", + "summary": "Get dashboards by Dashboard Ids (getDashboardsByIds)", + "description": "Returns a list of DashboardInfo 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": "getDashboardsByIds", "parameters": [ { - "name": "deviceName", - "in": "path", - "description": "Unique name of the device which is going to be reclaimed", + "name": "dashboardIds", + "in": "query", + "description": "A list of dashboard ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], @@ -31503,7 +31285,10 @@ "content": { "application/json": { "schema": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/DashboardInfo" + } } } } @@ -31624,24 +31409,15 @@ ] } }, - "/api/customer/{customerId}/deviceInfos": { + "/api/dashboards/all": { "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", - "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDeviceInfos", + "summary": "Get All Dashboards for current user (getAllDashboards)", + "description": "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. \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": "getAllDashboards", "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -31671,28 +31447,10 @@ "type": "boolean" } }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", + "description": "The case insensitive 'substring' filter based on the dashboard title.", "required": false, "schema": { "type": "string" @@ -31707,10 +31465,7 @@ "type": "string", "enum": [ "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" + "title" ] } }, @@ -31734,7 +31489,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -31855,19 +31610,19 @@ ] } }, - "/api/customer/{customerId}/devices": { + "/api/entityGroup/{entityGroupId}/dashboards": { "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Get Customer Devices (getCustomerDevices)", - "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerDevices", + "summary": "Get dashboards by Entity Group Id (getDashboardsByEntityGroupId)", + "description": "Returns a page of Dashboard objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getDashboardsByEntityGroupId", "parameters": [ { - "name": "customerId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -31893,19 +31648,10 @@ "format": "int32" } }, - { - "name": "type", - "in": "query", - "description": "Device type as the name of the device profile", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", + "description": "The case insensitive 'substring' filter based on the dashboard title.", "required": false, "schema": { "type": "string" @@ -31920,10 +31666,7 @@ "type": "string", "enum": [ "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" + "title" ] } }, @@ -31947,7 +31690,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -32068,93 +31811,53 @@ ] } }, - "/api/device": { - "post": { + "/api/entityGroup/{entityGroupId}/dashboards/export": { + "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Create Or Update Device (saveDevice)", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDevice", + "summary": "Export Dashboards (exportGroupDashboards)", + "description": "Export the dashboards that belong to specified group id.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "exportGroupDashboards", "parameters": [ - { - "name": "accessToken", - "in": "query", - "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", - "required": false, - "schema": { - "type": "string" - } - }, { "name": "entityGroupId", - "in": "query", - "required": false, + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", + "name": "limit", "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, + "description": "Limit of the entities to export", + "required": true, "schema": { - "type": "string", - "default": "_" + "type": "integer", + "format": "int32" } }, { - "name": "uniquifyStrategy", - "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "name": "Accept-Encoding", + "in": "header", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "string" } } ], - "requestBody": { - "description": "A JSON value representing the device.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "type": "array", + "items": { + "$ref": "#/components/schemas/Dashboard" + } } } } @@ -32171,7 +31874,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -32275,63 +31978,32 @@ ] } }, - "/api/device-with-credentials": { + "/api/entityGroup/{entityGroupId}/dashboards/import": { "post": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Create Device (saveDevice) with credentials ", - "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "saveDeviceWithCredentials", + "summary": "Import Dashboards (importGroupDashboards)", + "description": "Import the dashboards to specified group.The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "importGroupDashboards", "parameters": [ { "name": "entityGroupId", - "in": "query", - "required": false, + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } }, { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "nameConflictPolicy", - "in": "query", - "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", - "required": false, - "schema": { - "$ref": "#/components/schemas/NameConflictPolicy", - "default": "FAIL" - } - }, - { - "name": "uniquifySeparator", - "in": "query", - "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", - "required": false, - "schema": { - "type": "string", - "default": "_" - } - }, - { - "name": "uniquifyStrategy", + "name": "overwrite", "in": "query", - "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "description": "Overwrite dashboards with the same name", "required": false, "schema": { - "$ref": "#/components/schemas/UniquifyStrategy", - "default": "RANDOM" + "type": "boolean", + "default": false } } ], @@ -32339,7 +32011,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" + "type": "array", + "description": "JSON array with the dashboard objects", + "items": { + "$ref": "#/components/schemas/Dashboard" + } } } }, @@ -32347,14 +32023,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -32472,31 +32141,21 @@ ] } }, - "/api/device/bulk_import": { - "post": { + "/api/tenant/dashboard/home/info": { + "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Import the bulk of devices (processDevicesBulkImport)", - "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "processDevicesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } - } - }, - "required": true - }, + "summary": "Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", + "description": "Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. \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": "getTenantHomeDashboardInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultDevice" + "$ref": "#/components/schemas/HomeDashboardInfo" } } } @@ -32513,7 +32172,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -32615,21 +32274,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/device/credentials": { + }, "post": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Update device credentials (updateDeviceCredentials)", - "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "updateDeviceCredentials", + "summary": "Update Tenant Home Dashboard Info (getTenantHomeDashboardInfo)", + "description": "Update the home dashboard assignment for the current tenant. \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": "setTenantHomeDashboardInfo", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "$ref": "#/components/schemas/HomeDashboardInfo" } } }, @@ -32637,14 +32294,7 @@ }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceCredentials" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -32762,23 +32412,78 @@ ] } }, - "/api/device/info/{deviceId}": { + "/api/tenant/dashboards": { "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Get Device (getDeviceInfoById)", - "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceInfoById", + "summary": "Get Tenant Dashboards (getTenantDashboards)", + "description": "Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDashboards", "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": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mobile", + "in": "query", + "description": "Exclude dashboards that are hidden for mobile", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the dashboard title.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -32787,7 +32492,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceInfo" + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -32908,24 +32613,87 @@ ] } }, - "/api/device/types": { + "/api/tenant/{tenantId}/dashboards": { "get": { "tags": [ - "device-controller" + "dashboard-controller" + ], + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboardsByTenantId)", + "description": "Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantDashboardsByTenantId", + "parameters": [ + { + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "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 dashboard title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "Get Device Types (getDeviceTypes)", - "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntitySubtype" - } + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -33036,7 +32804,6 @@ } } }, - "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -33047,20 +32814,93 @@ ] } }, - "/api/device/{deviceId}": { + "/api/user/dashboards": { "get": { "tags": [ - "device-controller" + "dashboard-controller" ], - "summary": "Get Device (getDeviceById)", - "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceById", + "summary": "Get Dashboards (getUserDashboards)", + "description": "Returns a page of Dashboard Info objects available for specified or 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. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.\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": "getUserDashboards", "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": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "mobile", + "in": "query", + "description": "Exclude dashboards that are hidden for mobile", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the dashboard title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "operation", + "in": "query", + "description": "Filter by allowed operations for the current user", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "userId", + "in": "query", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, "schema": { "type": "string" } @@ -33072,7 +32912,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/PageDataDashboardInfo" } } } @@ -33191,28 +33031,61 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/report/test": { + "post": { "tags": [ - "device-controller" + "dashboard-report-controller" ], - "summary": "Delete device (deleteDevice)", - "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", - "operationId": "deleteDevice", + "summary": "Download test report (downloadTestReport)", + "description": "Generate and download test report.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "downloadTestReport", "parameters": [ { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "reportsServerEndpointUrl", + "in": "query", + "description": "A string value representing the report server endpoint.", + "required": false, "schema": { "type": "string" - } + }, + "example": "http://localhost:8383" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DashboardReportConfig" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } }, "400": { "description": "Bad Request", @@ -33226,7 +33099,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -33330,32 +33203,55 @@ ] } }, - "/api/device/{deviceId}/credentials": { - "get": { + "/api/report/{dashboardId}/download": { + "post": { "tags": [ - "device-controller" + "dashboard-report-controller" ], - "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", - "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", - "operationId": "getDeviceCredentialsByDeviceId", + "summary": "Download dashboard report (downloadDashboardReport)", + "description": "Generate and download a report from the specified dashboard. The request payload is a JSON object with params of report. For example:\n\n```json\n{\n \"type\": \"pdf\",\n \"timezone\": \"Europe/Kiev\",\n \"timewindow\": {\n \"displayValue\": \"\",\n \"hideInterval\": false,\n \"hideLastInterval\": false,\n \"hideQuickInterval\": false,\n \"hideAggregation\": false,\n \"hideAggInterval\": false,\n \"hideTimezone\": false,\n \"selectedTab\": 0,\n \"realtime\": {\n \"realtimeType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"history\": {\n \"historyType\": 0,\n \"interval\": 1000,\n \"timewindowMs\": 60000,\n \"fixedTimewindow\": {\n \"startTimeMs\": 1703687976592,\n \"endTimeMs\": 1703774376592\n },\n \"quickInterval\": \"CURRENT_DAY\"\n },\n \"aggregation\": {\n \"type\": \"AVG\",\n \"limit\": 25000\n }\n },\n \"state\": null\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "downloadDashboardReport", "parameters": [ { - "name": "deviceId", + "name": "dashboardId", "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the dashboard id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/pdf": { "schema": { - "$ref": "#/components/schemas/DeviceCredentials" + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" } } } @@ -33372,7 +33268,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -33476,108 +33372,33 @@ ] } }, - "/api/deviceInfos/all": { + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Get All Device Infos for current user (getAllDeviceInfos)", - "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllDeviceInfos", + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", "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": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "active", - "in": "query", - "description": "A boolean value representing the device active flag.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceInfo" + "type": "string", + "format": "binary" } } } @@ -33698,25 +33519,22 @@ ] } }, - "/api/devices": { + "/api/device-connectivity/{deviceId}": { "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Get Devices By Ids (getDevicesByIds)", - "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDevicesByIds", + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", "parameters": [ { - "name": "deviceIds", - "in": "query", - "description": "A list of devices ids, separated by comma ','", + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -33726,9 +33544,20 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" + "$ref": "#/components/schemas/JsonNode" + }, + "examples": { + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" } } } @@ -33848,34 +33677,35 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/device-connectivity/{protocol}/certificate/download": { + "get": { "tags": [ - "device-controller" + "device-connectivity-controller" ], - "summary": "Find related devices (findDevicesByQuery)", - "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "findDevicesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceSearchQuery" - } + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", + "parameters": [ + { + "name": "protocol", + "in": "path", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { - "application/json": { + "application/octet-stream": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Device" - } + "type": "string", + "format": "binary" } } } @@ -33892,7 +33722,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -33996,46 +33826,49 @@ ] } }, - "/api/devices/count/{otaPackageType}/{deviceProfileId}": { - "get": { + "/api/customer/device/{deviceName}/claim": { + "post": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceProfileAndEmptyOtaPackage", + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "claimDevice", "parameters": [ { - "name": "otaPackageType", + "name": "deviceName", "in": "path", - "description": "OTA package type", + "description": "Unique name of the device which is going to be claimed", "required": true, "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] + "type": "string" } }, { - "name": "deviceProfileId", - "in": "path", - "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "subCustomerId", + "in": "query", + "required": false, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimRequest" + } + } + } + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "type": "string" } } } @@ -34052,7 +33885,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -34154,41 +33987,19 @@ "ApiKeyForm": [] } ] - } - }, - "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { - "get": { + }, + "delete": { "tags": [ "device-controller" ], - "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", - "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "countByDeviceGroupAndEmptyOtaPackage", + "summary": "Reclaim device (reClaimDevice)", + "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "reClaimDevice", "parameters": [ { - "name": "otaPackageType", - "in": "path", - "description": "OTA package type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "FIRMWARE", - "SOFTWARE" - ] - } - }, - { - "name": "otaPackageId", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "entityGroupId", + "name": "deviceName", "in": "path", + "description": "Unique name of the device which is going to be reclaimed", "required": true, "schema": { "type": "string" @@ -34201,8 +34012,7 @@ "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "type": "string" } } } @@ -34323,19 +34133,19 @@ ] } }, - "/api/entityGroup/{entityGroupId}/devices": { + "/api/customer/{customerId}/deviceInfos": { "get": { "tags": [ "device-controller" ], - "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", - "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getDevicesByEntityGroupId", + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDeviceInfos", "parameters": [ { - "name": "entityGroupId", + "name": "customerId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -34347,8 +34157,8 @@ "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "integer", + "format": "int32" } }, { @@ -34357,8 +34167,35 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "string", - "minimum": 0 + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" } }, { @@ -34406,7 +34243,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -34527,161 +34364,24 @@ ] } }, - "/api/tenant/device": { + "/api/customer/{customerId}/devices": { "get": { "tags": [ "device-controller" ], - "summary": "Get Tenant Device (getTenantDevice)", - "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDeviceByName", + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerDevices", "parameters": [ { - "name": "deviceName", - "in": "query", - "description": "A string value representing the Device name.", + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Device" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-400": { - "summary": "Bad Request", - "value": { - "status": 400, - "message": "Invalid UUID string: 123", - "errorCode": 31, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-401": { - "summary": "Unauthorized", - "value": { - "status": 401, - "message": "Authentication failed", - "errorCode": 10, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-403": { - "summary": "Forbidden", - "value": { - "status": 403, - "message": "You don't have permission to perform this operation!", - "errorCode": 20, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-404": { - "summary": "Not Found", - "value": { - "status": 404, - "message": "Requested item wasn't found!", - "errorCode": 32, - "timestamp": 1609459200000 - } - } - } - } - } - }, - "429": { - "description": "Too Many Requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } - } - } - } - } - } - }, - "security": [ - { - "HttpLoginForm": [] }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/tenant/devices": { - "get": { - "tags": [ - "device-controller" - ], - "summary": "Get Tenant Devices (getTenantDevices)", - "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getTenantDevices", - "parameters": [ { "name": "pageSize", "in": "query", @@ -34877,34 +34577,86 @@ ] } }, - "/api/tenant/{tenantId}/device/{deviceId}": { + "/api/device": { "post": { "tags": [ "device-controller" ], - "summary": "Assign device to tenant (assignDeviceToTenant)", - "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", - "operationId": "assignDeviceToTenant", + "summary": "Create Or Update Device (saveDevice)", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDevice", "parameters": [ { - "name": "tenantId", - "in": "path", - "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "accessToken", + "in": "query", + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, "schema": { "type": "string" } }, { - "name": "deviceId", - "in": "path", - "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "entityGroupId", + "in": "query", + "required": false, "schema": { "type": "string" } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "nameConflictPolicy", + "in": "query", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", + "required": false, + "schema": { + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" + } + }, + { + "name": "uniquifySeparator", + "in": "query", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", + "required": false, + "schema": { + "type": "string", + "default": "_" + } + }, + { + "name": "uniquifyStrategy", + "in": "query", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", + "required": false, + "schema": { + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" + } } ], + "requestBody": { + "description": "A JSON value representing the device.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", @@ -35032,90 +34784,83 @@ ] } }, - "/api/user/devices": { - "get": { + "/api/device-with-credentials": { + "post": { "tags": [ "device-controller" ], - "summary": "Get Devices (getUserDevices)", - "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserDevices", + "summary": "Create Device (saveDevice) with credentials ", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken\",\n \"deviceProfileId\":{\n \"id\":\"5636aba0-1022-11ee-9631-51fb57f69174\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une2\"\n }\n}\n```\n\n- Credentials type: **\"Access token\"** with **device profile default** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_AccessToken_Default\",\n \"label\":\"Label_DeviceWithCredantial_AccessToken_Default\",\n \"type\": \"default\"\n },\n \"credentials\": {\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une3\"\n }\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_X509_Certificate\",\n \"label\":\"Label_DeviceWithCredantial_X509_Certificate\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"84f5911765abba1f96bf4165604e9e90338fc6214081a8e623b6ff9669aedb27\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUI9dBuwN6pTtK6uZ03rkiCwV4wEYwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTYxN1oXDTI0MDMyODE0NTYxN1owbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlQ2VydGlmaWNhdGVAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9Zo791qKQiGNBm11r4ZGxh+w+ossZL3xc46ufq5QckQHP7zkD2XDAcmP5GvdkM1sBFN9AWaCkQfNnWmfERsOOKNTMFEwHQYDVR0OBBYEFFFc5uyCyglQoZiKhzXzMcQ3BKORMB8GA1UdIwQYMBaAFFFc5uyCyglQoZiKhzXzMcQ3BKORMA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhANbA9CuhoOifZMMmqkpuld+65CR+ItKdXeRAhLMZuccuAiB0FSQB34zMutXrZj1g8Gl5OkE7YryFHbei1z0SveHR8g== -----END CERTIFICATE-----\"\n }\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"device\": {\n \"name\":\"Name_DeviceWithCredantial_MQTT_Basic\",\n \"label\":\"Label_DeviceWithCredantial_MQTT_Basic\",\n \"deviceProfileId\":{\n \"id\":\"9d9588c0-06c9-11ee-b618-19be30fdeb60\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"5euh5nzm34bjjh1efmlt\\\",\\\"userName\\\":\\\"onasd1lgwasmjl7v2v7h\\\",\\\"password\\\":\\\"b9xtm4ny8kt9zewaga5o\\\"}\"\n }\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"device\": {\n \"name\":\"Name_LwRpk00000000\",\n \"label\":\"Label_LwRpk00000000\",\n \"deviceProfileId\":{\n \"id\":\"a660bd50-10ef-11ee-8737-b5634e73c779\",\n \"entityType\":\"DEVICE_PROFILE\"\n }\n },\n \"credentials\": {\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n }\n}\n```\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDeviceWithCredentials", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", + "name": "entityGroupId", "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, + "required": false, "schema": { - "type": "string", - "minimum": 0 + "type": "string" } }, { - "name": "type", + "name": "entityGroupIds", "in": "query", - "description": "Device type as the name of the device profile", + "description": "A list of entity group ids, separated by comma ','", "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } }, { - "name": "textSearch", + "name": "nameConflictPolicy", "in": "query", - "description": "The case insensitive 'substring' filter based on the device name.", + "description": "Optional value of name conflict policy. Possible values: FAIL or UNIQUIFY. If omitted, FAIL policy is applied. FAIL policy implies exception will be thrown if an entity with the same name already exists. UNIQUIFY policy appends a suffix to the entity name, if a name conflict occurs.", "required": false, "schema": { - "type": "string" + "$ref": "#/components/schemas/NameConflictPolicy", + "default": "FAIL" } }, { - "name": "sortProperty", + "name": "uniquifySeparator", "in": "query", - "description": "Property of entity to sort by", + "description": "Optional value of name suffix separator used by UNIQUIFY policy. By default, underscore separator is used. For example, strategy is UNIQUIFY, separator is '-'; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-7fsh4f'.", "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "name", - "deviceProfileName", - "label", - "customerTitle" - ] + "default": "_" } }, { - "name": "sortOrder", + "name": "uniquifyStrategy", "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "description": "Optional value of uniquify strategy used by UNIQUIFY policy. Possible values: RANDOM or INCREMENTAL. By default, RANDOM strategy is used, which means random alphanumeric string will be added as a suffix to entity name. INCREMENTAL implies the first possible number starting from 1 will be added as a name suffix. For example, strategy is UNIQUIFY, uniquify strategy is INCREMENTAL; if a name conflict occurs for entity name 'test-name', created entity will have name like 'test-name-1.", "required": false, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "$ref": "#/components/schemas/UniquifyStrategy", + "default": "RANDOM" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDevice" + "$ref": "#/components/schemas/Device" } } } @@ -35132,7 +34877,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -35236,18 +34981,19 @@ ] } }, - "/api/deviceGroupOtaPackage": { + "/api/device/bulk_import": { "post": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "saveDeviceGroupOtaPackage", - "operationId": "saveDeviceGroupOtaPackage", + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processDevicesBulkImport", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/BulkImportRequest" } } }, @@ -35259,7 +35005,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/BulkImportResultDevice" } } } @@ -35380,38 +35126,31 @@ ] } }, - "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { - "get": { + "/api/device/credentials": { + "post": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "getFirmwareById", - "operationId": "getFirmwareById", - "parameters": [ - { - "name": "groupId", - "in": "path", - "required": true, - "schema": { - "type": "string" + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: **\"Access token\"** with **device ID** and with **device ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: **\"X509\"** with **device profile ID** below: \n\nNote: **credentialsId** - format **Sha3Hash**, **certificateValue** - format **PEM** (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: **\"MQTT_BASIC\"** with **device profile ID** below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of **LwM2M** device and **RPK** credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } } }, - { - "name": "firmwareType", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceGroupOtaPackage" + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -35428,7 +35167,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -35532,17 +35271,19 @@ ] } }, - "/api/deviceGroupOtaPackage/{id}": { - "delete": { + "/api/device/info/{deviceId}": { + "get": { "tags": [ - "device-group-ota-package-controller" + "device-controller" ], - "summary": "deleteDeviceGroupOtaPackage", - "operationId": "deleteDeviceGroupOtaPackage", + "summary": "Get Device (getDeviceInfoById)", + "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceInfoById", "parameters": [ { - "name": "id", + "name": "deviceId", "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -35551,7 +35292,14 @@ ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceInfo" + } + } + } }, "400": { "description": "Bad Request", @@ -35669,31 +35417,24 @@ ] } }, - "/api/deviceProfile": { - "post": { + "/api/device/types": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Create Or Update Device Profile (saveDeviceProfile)", - "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveDeviceProfile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeviceProfile" - } - } - }, - "required": true - }, + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -35710,7 +35451,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -35804,6 +35545,7 @@ } } }, + "deprecated": true, "security": [ { "HttpLoginForm": [] @@ -35814,20 +35556,20 @@ ] } }, - "/api/deviceProfile/devices/keys/attributes": { + "/api/device/{deviceId}": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get attribute keys (getAttributesKeys)", - "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getAttributesKeys", + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceById", "parameters": [ { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -35839,10 +35581,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/Device" } } } @@ -35961,22 +35700,20 @@ "ApiKeyForm": [] } ] - } - }, - "/api/deviceProfile/devices/keys/timeseries": { - "get": { + }, + "delete": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", - "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileTimeseriesKeys", + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteDevice", "parameters": [ { - "name": "deviceProfileId", - "in": "query", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } @@ -35984,17 +35721,7 @@ ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -36112,23 +35839,22 @@ ] } }, - "/api/deviceProfile/names": { + "/api/device/{deviceId}/credentials": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile names (getDeviceProfileNames)", - "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileNames", + "summary": "Get Device Credentials (getDeviceCredentialsByDeviceId)", + "description": "If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ_CREDENTIALS' permission for the entity (entities).", + "operationId": "getDeviceCredentialsByDeviceId", "parameters": [ { - "name": "activeOnly", - "in": "query", - "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", - "required": false, + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], @@ -36138,10 +35864,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/DeviceCredentials" } } } @@ -36262,32 +35985,99 @@ ] } }, - "/api/deviceProfile/{deviceProfileId}": { + "/api/deviceInfos/all": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile (getDeviceProfileById)", - "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfileById", + "summary": "Get All Device Infos for current user (getAllDeviceInfos)", + "description": "Returns a page of device info objects owned by the tenant or the customer of a current user. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllDeviceInfos", "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "deviceProfileId", - "in": "path", + "in": "query", "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "required": false, "schema": { "type": "string" } }, { - "name": "inlineImages", + "name": "active", "in": "query", - "description": "Inline images as a data URL (Base64)", + "description": "A boolean value representing the device active flag.", "required": false, "schema": { "type": "boolean" } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -36296,7 +36086,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "$ref": "#/components/schemas/PageDataDeviceInfo" } } } @@ -36415,28 +36205,43 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/devices": { + "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Delete device profile (deleteDeviceProfile)", - "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteDeviceProfile", + "summary": "Get Devices By Ids (getDevicesByIds)", + "description": "Requested devices must be owned by tenant or assigned to customer which user is performing the request. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDevicesByIds", "parameters": [ { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "deviceIds", + "in": "query", + "description": "A list of devices ids, separated by comma ','", "required": true, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } }, "400": { "description": "Bad Request", @@ -36552,34 +36357,34 @@ "ApiKeyForm": [] } ] - } - }, - "/api/deviceProfile/{deviceProfileId}/default": { + }, "post": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Make Device Profile Default (setDefaultDeviceProfile)", - "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setDefaultDeviceProfile", - "parameters": [ - { - "name": "deviceProfileId", - "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" + "summary": "Find related devices (findDevicesByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findDevicesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceSearchQuery" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfile" + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } } } } @@ -36700,21 +36505,46 @@ ] } }, - "/api/deviceProfileInfo/default": { + "/api/devices/count/{otaPackageType}/{deviceProfileId}": { "get": { "tags": [ - "device-profile-controller" + "device-controller" + ], + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceProfileAndEmptyOtaPackage", + "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "deviceProfileId", + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", - "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "integer", + "format": "int64" } } } @@ -36835,19 +36665,39 @@ ] } }, - "/api/deviceProfileInfo/{deviceProfileId}": { + "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile Info (getDeviceProfileInfoById)", - "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfoById", + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceGroupAndEmptyOtaPackage", "parameters": [ { - "name": "deviceProfileId", + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "otaPackageId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", "in": "path", - "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -36860,7 +36710,8 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeviceProfileInfo" + "type": "integer", + "format": "int64" } } } @@ -36981,23 +36832,32 @@ ] } }, - "/api/deviceProfileInfos": { + "/api/entityGroup/{entityGroupId}/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", - "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDeviceProfileInfos", + "summary": "Get devices by Entity Group Id (getDevicesByEntityGroupId)", + "description": "Returns a page of Device objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getDevicesByEntityGroupId", "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "pageSize", "in": "query", "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 1 } }, { @@ -37006,14 +36866,14 @@ "description": "Sequence number of page starting from 0", "required": true, "schema": { - "type": "integer", - "format": "int32" + "type": "string", + "minimum": 0 } }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", + "description": "The case insensitive 'substring' filter based on the device name.", "required": false, "schema": { "type": "string" @@ -37029,10 +36889,9 @@ "enum": [ "createdTime", "name", - "type", - "transportType", - "description", - "isDefault" + "deviceProfileName", + "label", + "customerTitle" ] } }, @@ -37048,22 +36907,6 @@ "DESC" ] } - }, - { - "name": "transportType", - "in": "query", - "description": "Type of the transport", - "required": false, - "schema": { - "type": "string", - "enum": [ - "DEFAULT", - "MQTT", - "COAP", - "LWM2M", - "SNMP" - ] - } } ], "responses": { @@ -37072,7 +36915,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -37193,25 +37036,22 @@ ] } }, - "/api/deviceProfileInfos/list": { + "/api/tenant/device": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", - "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getDeviceProfileInfosByIds", + "summary": "Get Tenant Device (getTenantDevice)", + "description": "Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDeviceByName", "parameters": [ { - "name": "deviceProfileIds", + "name": "deviceName", "in": "query", - "description": "A list of device profile ids, separated by comma ','", + "description": "A string value representing the Device name.", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" } } ], @@ -37221,10 +37061,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/DeviceProfileInfo" - } + "$ref": "#/components/schemas/Device" } } } @@ -37345,14 +37182,14 @@ ] } }, - "/api/deviceProfiles": { + "/api/tenant/devices": { "get": { "tags": [ - "device-profile-controller" + "device-controller" ], - "summary": "Get Device Profiles (getDeviceProfiles)", - "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getDeviceProfiles", + "summary": "Get Tenant Devices (getTenantDevices)", + "description": "Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantDevices", "parameters": [ { "name": "pageSize", @@ -37374,10 +37211,19 @@ "format": "int32" } }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the device profile name.", + "description": "The case insensitive 'substring' filter based on the device name.", "required": false, "schema": { "type": "string" @@ -37393,10 +37239,9 @@ "enum": [ "createdTime", "name", - "type", - "transportType", - "description", - "isDefault" + "deviceProfileName", + "label", + "customerTitle" ] } }, @@ -37420,7 +37265,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDeviceProfile" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -37541,45 +37386,41 @@ ] } }, - "/api/domain": { + "/api/tenant/{tenantId}/device/{deviceId}": { "post": { "tags": [ - "domain-controller" + "device-controller" ], - "summary": "Save or Update Domain (saveDomain)", - "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "saveDomain", + "summary": "Assign device to tenant (assignDeviceToTenant)", + "description": "Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.\n\nAvailable for users with 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'ASSIGN_TO_TENANT' permission for the entity (entities).", + "operationId": "assignDeviceToTenant", "parameters": [ { - "name": "oauth2ClientIds", - "in": "query", - "description": "A list of oauth2 client registration ids, separated by comma ','", - "required": false, + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Domain" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Domain" + "$ref": "#/components/schemas/Device" } } } @@ -37700,22 +37541,80 @@ ] } }, - "/api/domain/info/{id}": { + "/api/user/devices": { "get": { "tags": [ - "domain-controller" + "device-controller" ], - "summary": "Get Domain info by Id (getDomainInfoById)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfoById", + "summary": "Get Devices (getUserDevices)", + "description": "Returns a page of devices that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserDevices", "parameters": [ { - "name": "id", - "in": "path", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { "type": "string", - "format": "uuid" + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Device type as the name of the device profile", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -37725,7 +37624,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainInfo" + "$ref": "#/components/schemas/PageDataDevice" } } } @@ -37846,70 +37745,30 @@ ] } }, - "/api/domain/infos": { - "get": { + "/api/deviceGroupOtaPackage": { + "post": { "tags": [ - "domain-controller" + "device-group-ota-package-controller" ], - "summary": "Get Domain infos (getDomainInfos)", - "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getDomainInfos", - "parameters": [ - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "Case-insensitive 'substring' filter based on domain's name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "summary": "saveDeviceGroupOtaPackage", + "operationId": "saveDeviceGroupOtaPackage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } } }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataDomainInfo" + "$ref": "#/components/schemas/DeviceGroupOtaPackage" } } } @@ -37926,7 +37785,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38030,28 +37889,41 @@ ] } }, - "/api/domain/{id}": { - "delete": { + "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { + "get": { "tags": [ - "domain-controller" + "device-group-ota-package-controller" ], - "summary": "Delete Domain by ID (deleteDomain)", - "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "deleteDomain", + "summary": "getFirmwareById", + "operationId": "getFirmwareById", "parameters": [ { - "name": "id", + "name": "groupId", "in": "path", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "firmwareType", + "in": "path", + "required": true, + "schema": { + "type": "string" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } + } + } }, "400": { "description": "Bad Request", @@ -38169,39 +38041,23 @@ ] } }, - "/api/domain/{id}/oauth2Clients": { - "put": { + "/api/deviceGroupOtaPackage/{id}": { + "delete": { "tags": [ - "domain-controller" + "device-group-ota-package-controller" ], - "summary": "Update oauth2 clients (updateDomainOauth2Clients)", - "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "updateDomainOauth2Clients", + "summary": "deleteDeviceGroupOtaPackage", + "operationId": "deleteDeviceGroupOtaPackage", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string", - "format": "uuid" - } - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK" @@ -38322,108 +38178,31 @@ ] } }, - "/api/customer/{customerId}/edgeInfos": { - "get": { + "/api/deviceProfile": { + "post": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", - "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getCustomerEdgeInfos", - "parameters": [ - { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "summary": "Create Or Update Device Profile (saveDeviceProfile)", + "description": "Create or update the Device Profile. When creating device profile, platform generates device profile id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error. \n\nDevice profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.\n\n# Device profile data definition\n\nDevice profile data object contains device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one. \n\n```json\n{\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"DISABLED\",\n \"provisionDeviceSecret\":null\n },\n \"transportConfiguration\":{\n \"type\":\"DEFAULT\"\n }\n}\n```\n\n```json\n{\n \"configuration\":{\n \"type\":\"DEFAULT\"\n },\n \"provisionConfiguration\":{\n \"type\":\"ALLOW_CREATE_NEW_DEVICES\",\n \"provisionDeviceSecret\":\"vaxb9hzqdbz3oqukvomg\"\n },\n \"transportConfiguration\":{\n \"type\":\"MQTT\",\n \"deviceTelemetryTopic\":\"v1/devices/me/telemetry\",\n \"deviceAttributesTopic\":\"v1/devices/me/attributes\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"PROTOBUF\",\n \"deviceTelemetryProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage telemetry;\\n\\nmessage SensorDataReading {\\n\\n optional double temperature = 1;\\n optional double humidity = 2;\\n InnerObject innerObject = 3;\\n\\n message InnerObject {\\n optional string key1 = 1;\\n optional bool key2 = 2;\\n optional double key3 = 3;\\n optional int32 key4 = 4;\\n optional string key5 = 5;\\n }\\n}\",\n \"deviceAttributesProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage attributes;\\n\\nmessage SensorConfiguration {\\n optional string firmwareVersion = 1;\\n optional string serialNumber = 2;\\n}\",\n \"deviceRpcRequestProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcRequestMsg {\\n optional string method = 1;\\n optional int32 requestId = 2;\\n optional string params = 3;\\n}\",\n \"deviceRpcResponseProtoSchema\":\"syntax =\\\"proto3\\\";\\npackage rpc;\\n\\nmessage RpcResponseMsg {\\n optional string payload = 1;\\n}\"\n }\n }\n}\n```\n\nLet's review some specific objects examples related to the device profile configuration:# Provision Configuration\n\nThere are 3 types of device provision configuration for the device profile: \n * 'DISABLED';\n * 'ALLOW_CREATE_NEW_DEVICES';\n * 'CHECK_PRE_PROVISIONED_DEVICES'.\n\nPlease refer to the [docs](https://thingsboard.io/docs/user-guide/device-provisioning/) for more details.\n\n# Transport Configuration\n\n5 transport configuration types are available:\n * 'DEFAULT';\n * 'MQTT';\n * 'LWM2M';\n * 'COAP';\n * 'SNMP'.\n\nDefault type supports basic MQTT, HTTP, CoAP and LwM2M transports. Please refer to the [docs](https://thingsboard.io/docs/user-guide/device-profiles/#transport-configuration) for more details about other types.\n\nSee another example of COAP transport configuration below:\n\n```json\n{\n \"type\":\"COAP\",\n \"clientSettings\":{\n \"edrxCycle\":null,\n \"powerMode\":\"DRX\",\n \"psmActivityTimer\":null,\n \"pagingTransmissionWindow\":null\n },\n \"coapDeviceTypeConfiguration\":{\n \"coapDeviceType\":\"DEFAULT\",\n \"transportPayloadTypeConfiguration\":{\n \"transportPayloadType\":\"JSON\"\n }\n }\n}\n```Remove 'id', 'tenantId' from the request body example (below) to create new Device Profile entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveDeviceProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } } }, - { - "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/PageDataEdgeInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -38440,7 +38219,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -38544,90 +38323,23 @@ ] } }, - "/api/customer/{customerId}/edges": { + "/api/deviceProfile/devices/keys/attributes": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Customer Edges (getCustomerEdges)", - "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getCustomerEdges", + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAttributesKeys", "parameters": [ { - "name": "customerId", - "in": "path", - "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", + "name": "deviceProfileId", "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -38636,7 +38348,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "array", + "items": { + "type": "string" + } } } } @@ -38757,53 +38472,35 @@ ] } }, - "/api/edge": { - "post": { + "/api/deviceProfile/devices/keys/timeseries": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Create Or Update Edge (saveEdge)", - "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", - "operationId": "saveEdge", + "summary": "Get time series keys (getDeviceProfileTimeseriesKeys)", + "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileTimeseriesKeys", "parameters": [ { - "name": "entityGroupId", + "name": "deviceProfileId", "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": false, "schema": { "type": "string" } - }, - { - "name": "entityGroupIds", - "in": "query", - "description": "A list of entity group ids, separated by comma ','", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Edge" - } - } - }, - "required": true - }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "type": "array", + "items": { + "type": "string" + } } } } @@ -38820,7 +38517,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -38924,31 +38621,36 @@ ] } }, - "/api/edge/bulk_import": { - "post": { + "/api/deviceProfile/names": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Import the bulk of edges (processEdgesBulkImport)", - "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "processEdgesBulkImport", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BulkImportRequest" - } + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", + "parameters": [ + { + "name": "activeOnly", + "in": "query", + "description": "Flag indicating whether to retrieve exclusively the names of device profiles that are referenced by tenant's devices.", + "required": false, + "schema": { + "type": "boolean", + "default": false } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BulkImportResultEdge" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -38965,7 +38667,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39069,23 +38771,32 @@ ] } }, - "/api/edge/info/{edgeId}": { + "/api/deviceProfile/{deviceProfileId}": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Edge Info (getEdgeInfoById)", - "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInfoById", + "summary": "Get Device Profile (getDeviceProfileById)", + "description": "Fetch the Device Profile object based on the provided Device Profile Id. The server checks that the device profile is owned by the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfileById", "parameters": [ { - "name": "edgeId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -39094,7 +38805,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInfo" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -39213,38 +38924,161 @@ "ApiKeyForm": [] } ] - } - }, - "/api/edge/instructions/install/{edgeId}/{method}": { - "get": { + }, + "delete": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", - "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeInstallInstructions", + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", "parameters": [ { - "name": "edgeId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "description": "OK" }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ { - "name": "method", + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/deviceProfile/{deviceProfileId}/default": { + "post": { + "tags": [ + "device-profile-controller" + ], + "summary": "Make Device Profile Default (setDefaultDeviceProfile)", + "description": "Marks device profile as default within a tenant scope.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setDefaultDeviceProfile", + "parameters": [ + { + "name": "deviceProfileId", "in": "path", - "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] + "type": "string" } } ], @@ -39254,7 +39088,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/DeviceProfile" } } } @@ -39271,7 +39105,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -39375,46 +39209,21 @@ ] } }, - "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { + "/api/deviceProfileInfo/default": { "get": { "tags": [ - "edge-controller" - ], - "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", - "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeUpgradeInstructions", - "parameters": [ - { - "name": "edgeVersion", - "in": "path", - "description": "Edge version", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "method", - "in": "path", - "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", - "required": true, - "schema": { - "type": "string", - "enum": [ - "docker", - "ubuntu", - "centos" - ] - } - } + "device-profile-controller" ], + "summary": "Get Default Device Profile (getDefaultDeviceProfileInfo)", + "description": "Fetch the Default Device Profile Info object. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDefaultDeviceProfileInfo", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdgeInstructions" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -39535,19 +39344,19 @@ ] } }, - "/api/edge/missingToRelatedRuleChains/{edgeId}": { + "/api/deviceProfileInfo/{deviceProfileId}": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", - "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "findMissingToRelatedRuleChains", + "summary": "Get Device Profile Info (getDeviceProfileInfoById)", + "description": "Fetch the Device Profile Info object based on the provided Device Profile Id. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfoById", "parameters": [ { - "name": "edgeId", + "name": "deviceProfileId", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -39560,7 +39369,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -39681,23 +39490,89 @@ ] } }, - "/api/edge/sync/{edgeId}": { - "post": { + "/api/deviceProfileInfos": { + "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Sync edge (syncEdge)", - "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "syncEdge", + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device profile name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "type": "string", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + } } ], "responses": { @@ -39706,7 +39581,7 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" } } } @@ -39723,7 +39598,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -39827,14 +39702,28 @@ ] } }, - "/api/edge/types": { + "/api/deviceProfileInfos/list": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" + ], + "summary": "Get Device Profile Infos By Ids (getDeviceProfileInfosByIds)", + "description": "Requested device profiles must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceProfileInfosByIds", + "parameters": [ + { + "name": "deviceProfileIds", + "in": "query", + "description": "A list of device profile ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } ], - "summary": "Get Edge Types (getEdgeTypes)", - "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeTypes", "responses": { "200": { "description": "OK", @@ -39843,7 +39732,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/EntitySubtype" + "$ref": "#/components/schemas/DeviceProfileInfo" } } } @@ -39965,23 +39854,73 @@ ] } }, - "/api/edge/{edgeId}": { + "/api/deviceProfiles": { "get": { "tags": [ - "edge-controller" + "device-profile-controller" ], - "summary": "Get Edge (getEdgeById)", - "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeById", + "summary": "Get Device Profiles (getDeviceProfiles)", + "description": "Returns a page of devices profile objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getDeviceProfiles", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device profile name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -39990,7 +39929,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/PageDataDeviceProfile" } } } @@ -40109,28 +40048,50 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/domain": { + "post": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Delete edge (deleteEdge)", - "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "deleteEdge", + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDomain", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, "schema": { - "type": "string" + "type": "array", + "items": { + "type": "string" + } } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + }, + "required": true + }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } }, "400": { "description": "Bad Request", @@ -40144,7 +40105,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -40248,22 +40209,22 @@ ] } }, - "/api/edge/{edgeId}/upgrade/available": { + "/api/domain/info/{id}": { "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", - "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", - "operationId": "isEdgeUpgradeAvailable", + "summary": "Get Domain info by Id (getDomainInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfoById", "parameters": [ { - "name": "edgeId", + "name": "id", "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], @@ -40273,7 +40234,7 @@ "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/DomainInfo" } } } @@ -40394,29 +40355,58 @@ ] } }, - "/api/edge/{edgeId}/{ruleChainId}/root": { - "post": { + "/api/domain/infos": { + "get": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", - "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "setEdgeRootRuleChain", + "summary": "Get Domain infos (getDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfos", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "ruleChainId", - "in": "path", - "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on domain's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string" } @@ -40428,7 +40418,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/PageDataDomainInfo" } } } @@ -40445,7 +40435,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -40549,102 +40539,28 @@ ] } }, - "/api/edgeInfos/all": { - "get": { + "/api/domain/{id}": { + "delete": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", - "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeInfos", + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDomain", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "includeCustomers", - "in": "query", - "description": "Include customer or sub-customer entities", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEdgeInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -40762,85 +40678,43 @@ ] } }, - "/api/edges": { - "get": { + "/api/domain/{id}/oauth2Clients": { + "put": { "tags": [ - "edge-controller" + "domain-controller" ], - "summary": "Get Tenant Edges (getEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEdges", + "summary": "Update oauth2 clients (updateDomainOauth2Clients)", + "description": "Update oauth2 clients for the specified domain. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "updateDomainOauth2Clients", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "id", + "in": "path", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, "schema": { "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -40955,34 +40829,110 @@ "ApiKeyForm": [] } ] - }, - "post": { + } + }, + "/api/customer/{customerId}/edgeInfos": { + "get": { "tags": [ "edge-controller" ], - "summary": "Find related edges (findEdgesByQuery)", - "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "findEdgesByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EdgeSearchQuery" - } + "summary": "Get Customer Edge Infos (getCustomerEdgeInfos)", + "description": "Returns a page of edge info objects owned by the specified customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getCustomerEdgeInfos", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -40999,7 +40949,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41103,21 +41053,99 @@ ] } }, - "/api/edges/enabled": { + "/api/customer/{customerId}/edges": { "get": { "tags": [ "edge-controller" ], - "summary": "Is edges support enabled (isEdgesSupportEnabled)", - "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", - "operationId": "isEdgesSupportEnabled", + "summary": "Get Customer Edges (getCustomerEdges)", + "description": "Returns a page of edges objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEdges", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "boolean" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -41238,20 +41266,28 @@ ] } }, - "/api/edges/list": { - "get": { + "/api/edge": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edges By Ids (getEdgeList)", - "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", - "operationId": "getEdgeList", + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", + "operationId": "saveEdge", "parameters": [ { - "name": "edgeIds", + "name": "entityGroupId", "in": "query", - "description": "A list of edges ids, separated by comma ','", - "required": true, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of entity group ids, separated by comma ','", + "required": false, "schema": { "type": "array", "items": { @@ -41260,16 +41296,23 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Edge" - } + "$ref": "#/components/schemas/Edge" } } } @@ -41286,7 +41329,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41390,90 +41433,31 @@ ] } }, - "/api/entityGroup/{entityGroupId}/edges": { - "get": { + "/api/edge/bulk_import": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", - "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEdgesByEntityGroupId", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "processEdgesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } } }, - { - "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/PageDataEdge" + "$ref": "#/components/schemas/BulkImportResultEdge" } } } @@ -41490,7 +41474,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -41594,26 +41578,19 @@ ] } }, - "/api/license/activateInstance": { - "post": { + "/api/edge/info/{edgeId}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Activate edge instance (activateInstance)", - "description": "Activates edge license on license portal.", - "operationId": "activateInstance", + "summary": "Get Edge Info (getEdgeInfoById)", + "description": "Get the Edge info object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInfoById", "parameters": [ { - "name": "licenseSecret", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "releaseDate", - "in": "query", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -41626,7 +41603,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/EdgeInfo" } } } @@ -41643,7 +41620,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41747,31 +41724,46 @@ ] } }, - "/api/license/checkInstance": { - "post": { + "/api/edge/instructions/install/{edgeId}/{method}": { + "get": { "tags": [ "edge-controller" ], - "summary": "Check edge license (checkInstance)", - "description": "Checks license request from edge service by forwarding request to license portal.", - "operationId": "checkInstance", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JsonNode" - } + "summary": "Get Edge Install Instructions (getEdgeInstallInstructions)", + "description": "Get an install instructions for provided edge id.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeInstallInstructions", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "name": "method", + "in": "path", + "description": "Installation method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/JsonNode" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -41788,7 +41780,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -41892,23 +41884,37 @@ ] } }, - "/api/tenant/edge": { + "/api/edge/instructions/upgrade/{edgeVersion}/{method}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edge by name (getTenantEdgeByName)", - "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdgeByName", + "summary": "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)", + "description": "Get an upgrade instructions for provided edge version.If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeUpgradeInstructions", "parameters": [ { - "name": "edgeName", - "in": "query", - "description": "Unique name of the edge", + "name": "edgeVersion", + "in": "path", + "description": "Edge version", "required": true, "schema": { "type": "string" } + }, + { + "name": "method", + "in": "path", + "description": "Upgrade method ('docker', 'ubuntu' or 'centos')", + "required": true, + "schema": { + "type": "string", + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } } ], "responses": { @@ -41917,7 +41923,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Edge" + "$ref": "#/components/schemas/EdgeInstructions" } } } @@ -42038,81 +42044,23 @@ ] } }, - "/api/tenant/edges": { + "/api/edge/missingToRelatedRuleChains/{edgeId}": { "get": { "tags": [ "edge-controller" ], - "summary": "Get Tenant Edges (getTenantEdges)", - "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getTenantEdges", + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, "schema": { "type": "string" } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -42121,7 +42069,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "string" } } } @@ -42242,81 +42190,23 @@ ] } }, - "/api/user/edges": { - "get": { + "/api/edge/sync/{edgeId}": { + "post": { "tags": [ "edge-controller" ], - "summary": "Get Edges (getUserEdges)", - "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getUserEdges", + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "type", - "in": "query", - "description": "A string value representing the edge type. For example, 'default'", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -42325,7 +42215,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdge" + "type": "string" } } } @@ -42342,7 +42232,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -42446,110 +42336,24 @@ ] } }, - "/api/edge/{edgeId}/events": { + "/api/edge/types": { "get": { "tags": [ - "edge-event-controller" - ], - "summary": "Get Edge Events (getEdgeEvents)", - "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", - "operationId": "getEdgeEvents", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the edge event type name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "createdTime", - "name", - "type", - "label", - "customerTitle" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - }, - { - "name": "startTime", - "in": "query", - "description": "Timestamp. Edge events with creation time before it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "endTime", - "in": "query", - "description": "Timestamp. Edge events with creation time after it won't be queried", - "required": false, - "schema": { - "type": "integer", - "format": "int64" - } - } + "edge-controller" ], + "summary": "Get Edge Types (getEdgeTypes)", + "description": "Returns a set of unique edge types based on edges that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeTypes", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEdgeEvent" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } } } } @@ -42670,176 +42474,19 @@ ] } }, - "/api/entities/vc/branches": { - "get": { - "tags": [ - "entities-version-control-controller" - ], - "summary": "List branches (listBranches)", - "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", - "operationId": "listBranches", - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BranchInfo" - } - } - } - } - }, - "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/entities/vc/diff/{entityType}/{internalEntityUuid}": { + "/api/edge/{edgeId}": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Compare entity data to version (compareEntityDataToVersion)", - "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "compareEntityDataToVersion", + "summary": "Get Edge (getEdgeById)", + "description": "Get the Edge object based on the provided Edge Id. If the user has the authority of 'Tenant Administrator', the server checks that the edge is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the edge is assigned to the same customer.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "internalEntityUuid", + "name": "edgeId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "versionId", - "in": "query", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -42852,7 +42499,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataDiff" + "$ref": "#/components/schemas/Edge" } } } @@ -42971,37 +42618,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entities/vc/entity": { - "post": { + }, + "delete": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Load entities version (loadEntitiesVersion)", - "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "loadEntitiesVersion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionLoadRequest" - } + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "string", - "format": "uuid" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -43015,7 +42653,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -43119,28 +42757,19 @@ ] } }, - "/api/entities/vc/entity/{entityType}/{versionId}": { + "/api/edge/{edgeId}/upgrade/available": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entities at version (listEntitiesAtVersion)", - "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntitiesAtVersion", + "summary": "Is edge upgrade enabled (isEdgeUpgradeAvailable)", + "description": "Returns 'true' if upgrade available for connected edge, 'false' - otherwise.", + "operationId": "isEdgeUpgradeAvailable", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "versionId", + "name": "edgeId", "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -43153,10 +42782,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } + "type": "boolean" } } } @@ -43277,23 +42903,31 @@ ] } }, - "/api/entities/vc/entity/{requestId}/status": { - "get": { + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get version load request status (getVersionLoadRequestStatus)", - "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionLoadRequestStatus", + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", "parameters": [ { - "name": "requestId", + "name": "edgeId", "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" + } + }, + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } } ], @@ -43303,7 +42937,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionLoadResult" + "$ref": "#/components/schemas/Edge" } } } @@ -43320,7 +42954,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -43424,200 +43058,89 @@ ] } }, - "/api/entities/vc/entity/{versionId}": { + "/api/edgeInfos/all": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all entities at version (listAllEntitiesAtVersion)", - "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listAllEntitiesAtVersion", + "summary": "Get All Edge Infos for current user (getAllEdgeInfos)", + "description": "Returns a page of edge info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeInfos", "parameters": [ { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/VersionedEntityInfo" - } - } - } - } - }, - "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 - } - } - } - } + "type": "integer", + "format": "int32" } }, - "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": "integer", + "format": "int32" } }, - "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": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } }, { - "ApiKeyForm": [] - } - ] - } - }, - "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { - "get": { - "tags": [ - "entities-version-control-controller" - ], - "summary": "Get entity data info (getEntityDataInfo)", - "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getEntityDataInfo", - "parameters": [ - { - "name": "versionId", - "in": "path", - "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", - "required": true, + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, "schema": { "type": "string" } }, { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, "schema": { - "$ref": "#/components/schemas/EntityType" + "type": "string" } }, { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id", - "required": true, + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", - "format": "uuid" + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] } }, { - "name": "internalEntityId", + "name": "sortOrder", "in": "query", - "description": "A string value representing the entity 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" + ] } } ], @@ -43627,7 +43150,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityDataInfo" + "$ref": "#/components/schemas/PageDataEdgeInfo" } } } @@ -43748,24 +43271,15 @@ ] } }, - "/api/entities/vc/version": { + "/api/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List all versions (listVersions)", - "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listVersions", + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdges", "parameters": [ - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, { "name": "pageSize", "in": "query", @@ -43789,7 +43303,7 @@ { "name": "textSearch", "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", + "description": "The case insensitive 'substring' filter based on the edge name.", "required": false, "schema": { "type": "string" @@ -43803,7 +43317,11 @@ "schema": { "type": "string", "enum": [ - "timestamp" + "createdTime", + "name", + "type", + "label", + "customerTitle" ] } }, @@ -43827,7 +43345,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -43949,16 +43467,16 @@ }, "post": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Save entities version (saveEntitiesVersion)", - "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "saveEntitiesVersion", + "summary": "Find related edges (findEdgesByQuery)", + "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEdgesByQuery", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreateRequest" + "$ref": "#/components/schemas/EdgeSearchQuery" } } }, @@ -43970,8 +43488,10 @@ "content": { "application/json": { "schema": { - "type": "string", - "format": "uuid" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -44092,95 +43612,21 @@ ] } }, - "/api/entities/vc/version/{entityType}": { + "/api/edges/enabled": { "get": { "tags": [ - "entities-version-control-controller" - ], - "summary": "List entity type versions (listEntityTypeVersions)", - "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityTypeVersions", - "parameters": [ - { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } + "edge-controller" ], + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "boolean" } } } @@ -44301,104 +43747,25 @@ ] } }, - "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { + "/api/edges/list": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "List entity versions (listEntityVersions)", - "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "listEntityVersions", + "summary": "Get Edges By Ids (getEdgeList)", + "description": "Requested edges must be owned by tenant or assigned to customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEdgeList", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "A string value representing the entity type. For example, 'DEVICE'", - "required": true, - "schema": { - "$ref": "#/components/schemas/EntityType" - } - }, - { - "name": "externalEntityUuid", - "in": "path", - "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "branch", - "in": "query", - "description": "The name of the working branch, for example 'master'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "internalEntityId", - "in": "query", - "required": false, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "page", + "name": "edgeIds", "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A list of edges ids, separated by comma ','", "required": true, "schema": { - "type": "integer", - "format": "int32" - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'substring' filter based on the entity version name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string", - "enum": [ - "timestamp" - ] - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "array", + "items": { + "type": "string" + } } } ], @@ -44408,7 +43775,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityVersion" + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } } } } @@ -44529,23 +43899,80 @@ ] } }, - "/api/entities/vc/version/{requestId}/status": { + "/api/entityGroup/{entityGroupId}/edges": { "get": { "tags": [ - "entities-version-control-controller" + "edge-controller" ], - "summary": "Get version create request status (getVersionCreateRequestStatus)", - "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", - "operationId": "getVersionCreateRequestStatus", + "summary": "Get edges by Entity Group Id (getEdgesByEntityGroupId)", + "description": "Returns a page of Edge objects that belongs to specified Entity Group Id. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEdgesByEntityGroupId", "parameters": [ { - "name": "requestId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { "type": "string", - "format": "uuid" + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -44555,7 +43982,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VersionCreationResult" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -44676,38 +44103,29 @@ ] } }, - "/api/allEntityGroups/edge/{edgeId}/{groupType}": { - "get": { + "/api/license/activateInstance": { + "post": { "tags": [ - "entity-group-controller" + "edge-controller" ], - "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getAllEdgeEntityGroups", + "summary": "Activate edge instance (activateInstance)", + "description": "Activates edge license on license portal.", + "operationId": "activateInstance", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "licenseSecret", + "in": "query", "required": true, "schema": { "type": "string" } }, { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", + "name": "releaseDate", + "in": "query", "required": true, "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "type": "string" } } ], @@ -44717,10 +44135,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/JsonNode" } } } @@ -44737,7 +44152,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -44841,57 +44256,31 @@ ] } }, - "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "/api/license/checkInstance": { "post": { "tags": [ - "entity-group-controller" + "edge-controller" ], - "summary": "Assign entity group to edge (assignEntityGroupToEdge)", - "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "assignEntityGroupToEdge", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] + "summary": "Check edge license (checkInstance)", + "description": "Checks license request from edge service by forwarding request to license portal.", + "operationId": "checkInstance", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } } }, - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "$ref": "#/components/schemas/JsonNode" } } } @@ -45010,44 +44399,21 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/tenant/edge": { + "get": { "tags": [ - "entity-group-controller" + "edge-controller" ], - "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", - "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", - "operationId": "unassignEntityGroupFromEdge", + "summary": "Get Tenant Edge by name (getTenantEdgeByName)", + "description": "Requested edge must be owned by tenant or customer that the user belongs to. Edge name is an unique property of edge. So it can be used to identify the edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdgeByName", "parameters": [ { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] - } - }, - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "edgeName", + "in": "query", + "description": "Unique name of the edge", "required": true, "schema": { "type": "string" @@ -45060,7 +44426,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroup" + "$ref": "#/components/schemas/Edge" } } } @@ -45181,31 +44547,90 @@ ] } }, - "/api/entityGroup": { - "post": { + "/api/tenant/edges": { + "get": { "tags": [ - "entity-group-controller" + "edge-controller" ], - "summary": "Create Or Update Entity Group (saveEntityGroup)", - "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "saveEntityGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityGroup" - } + "summary": "Get Tenant Edges (getTenantEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" } }, - "required": true - }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -45222,7 +44647,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -45326,53 +44751,79 @@ ] } }, - "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { + "/api/user/edges": { "get": { "tags": [ - "entity-group-controller" + "edge-controller" ], - "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", - "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupAllByOwnerAndType", + "summary": "Get Edges (getUserEdges)", + "description": "Returns a page of edges available for current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserEdges", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "minimum": 1 } }, { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "A string value representing the edge type. For example, 'default'", + "required": false, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, "schema": { "type": "string", "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" ] } } @@ -45383,7 +44834,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/PageDataEdge" } } } @@ -45504,23 +44955,101 @@ ] } }, - "/api/entityGroup/{entityGroupId}": { + "/api/edge/{edgeId}/events": { "get": { "tags": [ - "entity-group-controller" + "edge-event-controller" ], - "summary": "Get Entity Group Info (getEntityGroupById)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupById", + "summary": "Get Edge Events (getEdgeEvents)", + "description": "Returns a page of edge events for the requested edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. ", + "operationId": "getEdgeEvents", "parameters": [ { - "name": "entityGroupId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the edge event type name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Edge events with creation time before it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Edge events with creation time after it won't be queried", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -45529,7 +45058,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "$ref": "#/components/schemas/PageDataEdgeEvent" } } } @@ -45648,28 +45177,29 @@ "ApiKeyForm": [] } ] - }, - "delete": { + } + }, + "/api/entities/vc/branches": { + "get": { "tags": [ - "entity-group-controller" - ], - "summary": "Delete Entity Group (deleteEntityGroup)", - "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", - "operationId": "deleteEntityGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "entities-version-control-controller" ], + "summary": "List branches (listBranches)", + "description": "Lists branches available in the remote repository. \n\nResponse example: \n```json\n[\n {\n \"name\": \"master\",\n \"default\": true\n },\n {\n \"name\": \"dev\",\n \"default\": false\n },\n {\n \"name\": \"dev-2\",\n \"default\": false\n }\n]\n```", + "operationId": "listBranches", "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BranchInfo" + } + } + } + } }, "400": { "description": "Bad Request", @@ -45787,43 +45317,55 @@ ] } }, - "/api/entityGroup/{entityGroupId}/addEntities": { - "post": { + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Add entities to the group (addEntitiesToEntityGroup)", - "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", - "operationId": "addEntitiesToEntityGroup", + "summary": "Compare entity data to version (compareEntityDataToVersion)", + "description": "Returns an object with current entity data and the one at a specific version. Entity data structure is the same as stored in a repository. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "compareEntityDataToVersion", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "internalEntityUuid", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "versionId", + "in": "query", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataDiff" } } } }, - "required": true - }, - "responses": { - "200": { - "description": "OK" - }, "400": { "description": "Bad Request", "content": { @@ -45836,7 +45378,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -45940,34 +45482,19 @@ ] } }, - "/api/entityGroup/{entityGroupId}/deleteEntities": { + "/api/entities/vc/entity": { "post": { "tags": [ - "entity-group-controller" - ], - "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", - "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", - "operationId": "removeEntitiesFromEntityGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } + "entities-version-control-controller" ], + "summary": "Load entities version (loadEntitiesVersion)", + "description": "Loads specific version of remote entities (or single entity) by request. Supported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are multiple types of request. Each of them requires branch name (`branch`) and version id (`versionId`). Request of type `SINGLE_ENTITY` is needed to restore a concrete version of a specific entity. It contains id of a remote entity (`externalEntityId`), internal entity id (`internalEntityId`) and additional configuration (`config`):\n- `loadRelations` - to update relations list (in case `saveRelations` option was enabled during version creation);\n- `loadAttributes` - to load entity attributes (if `saveAttributes` config option was enabled);\n- `loadCredentials` - to update device credentials (if `saveCredentials` option was enabled during version creation);\n- `loadPermissions` - when loading user group, to update group permission list;\n- `loadGroupEntities` - when loading an entity group, to load its entities as well;\n- `autoGenerateIntegrationKey` - if loading integration version, to autogenerate routing key.\n\nAn example of such request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n \n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n \n \"externalEntityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b7944123-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"loadRelations\": false,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n}\n```\n\nAnother request type (`ENTITY_TYPE`) is needed to load specific version of the whole entity types. It contains a structure with entity types to load and configs for each entity type (`entityTypes`). For each specified entity type, the method will load all remote entities of this type that are present at the version. A config for each entity type contains the same options as in `SINGLE_ENTITY` request type, and additionally contains following options:\n- `removeOtherEntities` - to remove local entities that are not present on the remote - basically to overwrite local entity type with the remote one;\n- `findExistingEntityByName` - when you are loading some remote entities that are not yet present at this tenant, try to find existing entity by name and update it rather than create new.\n\nHere is an example of the request to completely restore version of the whole device entity type:\n```json\n{\n \"type\": \"ENTITY_TYPE\",\n\n \"branch\": \"dev\",\n \"versionId\": \"b3c28d722d328324c7c15b0b30047b0c40011cf7\",\n\n \"entityTypes\": {\n \"DEVICE\": {\n \"removeOtherEntities\": true,\n \"findExistingEntityByName\": false,\n \"loadRelations\": true,\n \"loadAttributes\": true,\n \"loadCredentials\": true\n }\n }\n}\n```\n\nThe response will contain generated request UUID that is to be used to check the status of operation via `getVersionLoadRequestStatus`.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "loadEntitiesVersion", "requestBody": { "content": { "application/json": { "schema": { - "type": "array", - "description": "A list of entity ids", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/VersionLoadRequest" } } }, @@ -45975,7 +45502,15 @@ }, "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "uuid" + } + } + } }, "400": { "description": "Bad Request", @@ -46093,74 +45628,32 @@ ] } }, - "/api/entityGroup/{entityGroupId}/entities": { + "/api/entities/vc/entity/{entityType}/{versionId}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Group Entities (getEntities)", - "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntities", + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string", - "minimum": 1 + "$ref": "#/components/schemas/EntityType" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -46169,7 +45662,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataShortEntityView" + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" + } } } } @@ -46290,28 +45786,36 @@ ] } }, - "/api/entityGroup/{entityGroupId}/makePrivate": { - "post": { + "/api/entities/vc/entity/{requestId}/status": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Make Entity Group Private (makeEntityGroupPrivate)", - "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPrivate", + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `groupsCreated` - created entity groups count;\n - `groupsUpdated` - updated entity groups count;\n - `groupsDeleted` - removed entity groups count.\n- `error` - if an error occurred during processing, error info:\n - `type` - error type;\n - `source` - an external id of remote entity;\n - `target` - if failed to find referenced entity by external id - this external id;\n - `message` - error message.\n\nAn example of successfully processed request status:\n```json\n{\n \"done\": true,\n \"result\": [\n {\n \"entityType\": \"DEVICE\",\n \"created\": 10,\n \"updated\": 5,\n \"deleted\": 5,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 1,\n \"groupsDeleted\": 1\n },\n {\n \"entityType\": \"ASSET\",\n \"created\": 4,\n \"updated\": 0,\n \"deleted\": 8,\n \"groupsCreated\": 1,\n \"groupsUpdated\": 0,\n \"groupsDeleted\": 2\n }\n ]\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionLoadRequestStatus", "parameters": [ { - "name": "entityGroupId", + "name": "requestId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid" } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadResult" + } + } + } }, "400": { "description": "Bad Request", @@ -46325,7 +45829,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -46429,19 +45933,19 @@ ] } }, - "/api/entityGroup/{entityGroupId}/makePublic": { - "post": { + "/api/entities/vc/entity/{versionId}": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", - "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "makeEntityGroupPublic", + "summary": "List all entities at version (listAllEntitiesAtVersion)", + "description": "Returns a list of all remote entities available in a specific version. Response type is the same as for listAllEntitiesAtVersion API method. \nReturned entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listAllEntitiesAtVersion", "parameters": [ { - "name": "entityGroupId", + "name": "versionId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" @@ -46450,156 +45954,17 @@ ], "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", + "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ThingsboardErrorResponse" - }, - "examples": { - "error-code-429": { - "summary": "Too Many Requests", - "value": { - "status": 429, - "message": "Too many requests for current tenant!", - "errorCode": 33, - "timestamp": 1609459200000 - } + "type": "array", + "items": { + "$ref": "#/components/schemas/VersionedEntityInfo" } } } } - } - }, - "security": [ - { - "HttpLoginForm": [] - }, - { - "ApiKeyForm": [] - } - ] - } - }, - "/api/entityGroup/{entityGroupId}/share": { - "post": { - "tags": [ - "entity-group-controller" - ], - "summary": "Share the Entity Group (shareEntityGroup)", - "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroup", - "parameters": [ - { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareGroupRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "OK" }, "400": { "description": "Bad Request", @@ -46613,7 +45978,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -46717,31 +46082,51 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{entityId}": { + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Group Entity (getGroupEntity)", - "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getGroupEntity", + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", "parameters": [ { - "name": "entityGroupId", + "name": "versionId", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", "required": true, "schema": { "type": "string" } }, { - "name": "entityId", + "name": "entityType", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "internalEntityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string", + "format": "uuid" } } ], @@ -46751,7 +46136,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShortEntityView" + "$ref": "#/components/schemas/EntityDataInfo" } } } @@ -46872,46 +46257,89 @@ ] } }, - "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { - "post": { + "/api/entities/vc/version": { + "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", - "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", - "operationId": "shareEntityGroupToChildOwnerUserGroup", + "summary": "List all versions (listVersions)", + "description": "Lists all available versions in a branch for all entity types. \nIf specified branch does not exist - empty page data will be returned. The response format is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listVersions", "parameters": [ { - "name": "entityGroupId", - "in": "path", - "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { "type": "string" } }, { - "name": "userGroupId", - "in": "path", - "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, "schema": { - "type": "string" + "type": "integer", + "format": "int32" } }, { - "name": "roleId", - "in": "path", - "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { "200": { - "description": "OK" + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" + } + } + } }, "400": { "description": "Bad Request", @@ -46925,7 +46353,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -47027,75 +46455,32 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { - "get": { + }, + "post": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", - "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupByOwnerAndNameAndType", - "parameters": [ - { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] + "summary": "Save entities version (saveEntitiesVersion)", + "description": "Creates a new version of entities (or a single entity) by request.\nSupported entity types: CUSTOMER, ASSET, RULE_CHAIN, DASHBOARD, DEVICE_PROFILE, DEVICE, ENTITY_VIEW, WIDGETS_BUNDLE, CONVERTER, INTEGRATION, ROLE and USER group.\n\nThere are two available types of request: `SINGLE_ENTITY` and `COMPLEX`. Each of them contains version name (`versionName`) and name of a branch (`branch`) to create version (commit) in. If specified branch does not exists in a remote repo, then new empty branch will be created. Request of the `SINGLE_ENTITY` type has id of an entity (`entityId`) and additional configuration (`config`) which has following options: \n- `saveRelations` - whether to add inbound and outbound relations of type COMMON to created entity version;\n- `saveAttributes` - to save attributes of server scope (and also shared scope for devices);\n- `saveCredentials` - when saving a version of a device, to add its credentials to the version;\n- `savePermissions` - when saving a user group - to save group permission list;\n- `saveGroupEntities` - when saving an entity group - to save its entities as well.\n\nAn example of a `SINGLE_ENTITY` version create request:\n```json\n{\n \"type\": \"SINGLE_ENTITY\",\n\n \"versionName\": \"Version 1.0\",\n \"branch\": \"dev\",\n\n \"entityId\": {\n \"entityType\": \"DEVICE\",\n \"id\": \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n },\n \"config\": {\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": false\n }\n}\n```\n\nSecond request type (`COMPLEX`), additionally to `branch` and `versionName`, contains following properties:\n- `entityTypes` - a structure with entity types to export and configuration for each entity type; this configuration has all the options available for `SINGLE_ENTITY` and additionally has these ones: \n - `allEntities` and `entityIds` - if you want to save the version of all entities of the entity type then set `allEntities` param to true, otherwise set it to false and specify `entityIds` - in case entity type is group entity, list of specific entity groups, or if not - list of entities;\n - `syncStrategy` - synchronization strategy to use for this entity type: when set to `OVERWRITE` then the list of remote entities of this type will be overwritten by newly added entities. If set to `MERGE` - existing remote entities of this entity type will not be removed, new entities will just be added on top (or existing remote entities will be updated).\n- `syncStrategy` - default synchronization strategy to use when it is not specified for an entity type.\n\nExample for this type of request:\n```json\n{\n \"type\": \"COMPLEX\",\n\n \"versionName\": \"Devices and profiles: release 2\",\n \"branch\": \"master\",\n\n \"syncStrategy\": \"OVERWRITE\",\n \"entityTypes\": {\n \"DEVICE\": {\n \"syncStrategy\": null,\n \"allEntities\": true,\n \"saveRelations\": true,\n \"saveAttributes\": true,\n \"saveCredentials\": true\n },\n \"DEVICE_PROFILE\": {\n \"syncStrategy\": \"MERGE\",\n \"allEntities\": false,\n \"entityIds\": [\n \"b79448e0-d4f4-11ec-847b-0f432358ab48\"\n ],\n \"saveRelations\": true\n }\n }\n}\n```\n\nResponse wil contain generated request UUID, that can be then used to retrieve status of operation via `getVersionCreateRequestStatus`.\n\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveEntitiesVersion", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreateRequest" + } } }, - { - "name": "groupName", - "in": "path", - "description": "Entity Group name", - "required": true, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityGroupInfo" + "type": "string", + "format": "uuid" } } } @@ -47112,7 +46497,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -47216,23 +46601,86 @@ ] } }, - "/api/entityGroupInfo/{entityGroupId}": { + "/api/entities/vc/version/{entityType}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", - "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfoById", + "summary": "List entity type versions (listEntityTypeVersions)", + "description": "Returns list of versions of an entity type in a branch. This is a collected list of versions that were created for entities of this type in a remote branch. \nIf specified branch does not exist - empty page data will be returned. The response structure is the same as for `listEntityVersions` API method.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityTypeVersions", "parameters": [ { - "name": "entityGroupId", + "name": "entityType", "in": "path", - "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "branch", + "in": "query", + "description": "The name of the working branch, for example 'master'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, "schema": { "type": "string" } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } } ], "responses": { @@ -47241,7 +46689,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -47362,25 +46810,104 @@ ] } }, - "/api/entityGroupInfos": { + "/api/entities/vc/version/{entityType}/{externalEntityUuid}": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", - "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByIds", + "summary": "List entity versions (listEntityVersions)", + "description": "Returns list of versions for a specific entity in a concrete branch. \nYou need to specify external id of an entity to list versions for. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity. \nIf specified branch does not exist - empty page data will be returned. \n\nEach version info item has timestamp, id, name and author. Version id can then be used to restore the version. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe (johndoe@gmail.com)\"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", "parameters": [ { - "name": "entityGroupIds", + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "$ref": "#/components/schemas/EntityType" + } + }, + { + "name": "externalEntityUuid", + "in": "path", + "description": "A string value representing external entity id. This is `externalId` property of an entity, or otherwise if not set - simply id of this entity.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "branch", "in": "query", - "description": "A list of group ids, separated by comma ','", + "description": "The name of the working branch, for example 'master'", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string" + } + }, + { + "name": "internalEntityId", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity version name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string", + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } } ], @@ -47390,10 +46917,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityInfo" - } + "$ref": "#/components/schemas/PageDataEntityVersion" } } } @@ -47514,91 +47038,23 @@ ] } }, - "/api/entityGroupInfos/{groupType}": { + "/api/entities/vc/version/{requestId}/status": { "get": { "tags": [ - "entity-group-controller" + "entities-version-control-controller" ], - "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get version create request status (getVersionCreateRequestStatus)", + "description": "Returns the status of previously made version create request. \n\nThis status contains following properties:\n- `done` - whether request processing is finished;\n- `version` - created version info: timestamp, version id (commit hash), commit name and commit author;\n- `added` - count of items that were created in the remote repo;\n- `modified` - modified items count;\n- `removed` - removed items count;\n- `error` - error message, if an error occurred while handling the request.\n\nAn example of successful status:\n```json\n{\n \"done\": true,\n \"added\": 10,\n \"modified\": 2,\n \"removed\": 5,\n \"version\": {\n \"timestamp\": 1655198528000,\n \"id\":\"8a834dd389ed80e0759ba8ee338b3f1fd160a114\",\n \"name\": \"My devices v2.0\",\n \"author\": \"John Doe\"\n },\n \"error\": null\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getVersionCreateRequestStatus", "parameters": [ { - "name": "groupType", + "name": "requestId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the version control request id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "format": "uuid" } } ], @@ -47608,7 +47064,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/VersionCreationResult" } } } @@ -47729,81 +47185,37 @@ ] } }, - "/api/entityGroupInfos/{groupType}/shared": { + "/api/allEntityGroups/edge/{edgeId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "summary": "Get All Edge Entity Groups by entity type (getAllEdgeEntityGroups)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllEdgeEntityGroups", "parameters": [ { - "name": "groupType", + "name": "edgeId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, "schema": { "type": "string", "enum": [ - "ASC", - "DESC" + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" ] } } @@ -47814,7 +47226,10 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } } } } @@ -47935,106 +47350,48 @@ ] } }, - "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "summary": "Assign entity group to edge (assignEntityGroupToEdge)", + "description": "Creates assignment of an existing entity group to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once entity group will be delivered to edge service, edge will request entities of this group to be send to edge. Once entities will be delivered to edge service, they are going to be available for usage on remote edge instance.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "assignEntityGroupToEdge", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, { "name": "groupType", "in": "path", - "description": "Entity Group type", + "description": "EntityGroup type", "required": true, "schema": { "type": "string", "enum": [ - "CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", - "DASHBOARD", - "EDGE" + "DASHBOARD" ] } }, { - "name": "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": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -48043,7 +47400,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -48060,7 +47417,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -48162,108 +47519,48 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "summary": "Unassign entity group from edge (unassignEntityGroupFromEdge)", + "description": "Clears assignment of the entity group to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove entity group (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove entity group and entities inside this group locally.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "unassignEntityGroupFromEdge", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", + "name": "edgeId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, { "name": "groupType", "in": "path", - "description": "Entity Group type", + "description": "EntityGroup type", "required": true, "schema": { "type": "string", "enum": [ - "CUSTOMER", "ASSET", "DEVICE", "USER", "ENTITY_VIEW", - "DASHBOARD", - "EDGE" + "DASHBOARD" ] } }, { - "name": "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": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { @@ -48272,7 +47569,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" + "$ref": "#/components/schemas/EntityGroup" } } } @@ -48393,99 +47690,31 @@ ] } }, - "/api/entityGroups/edge/{edgeId}/{groupType}": { - "get": { + "/api/entityGroup": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEdgeEntityGroups", - "parameters": [ - { - "name": "edgeId", - "in": "path", - "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "groupType", - "in": "path", - "description": "EntityGroup type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", - "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, - "schema": { - "type": "string" + "summary": "Create Or Update Entity Group (saveEntityGroup)", + "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. When 'ownerId' is not set (or null), it defaults to the current user's owner (Tenant for tenant admins, Customer for customer users). \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "saveEntityGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } } }, - { - "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/PageDataEntityGroupInfo" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -48502,7 +47731,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -48606,25 +47835,54 @@ ] } }, - "/api/entityGroups/list": { + "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", - "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByIds", + "summary": "Get special group All by owner and entity type (getEntityGroupsByOwnerAndType)", + "description": "Fetch reserved group 'All' based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupAllByOwnerAndType", "parameters": [ { - "name": "entityGroupIds", - "in": "query", - "description": "A list of group ids, separated by comma ','", + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", "required": true, "schema": { - "type": "array", - "items": { - "type": "string" - } + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } } ], @@ -48634,10 +47892,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -48758,37 +48013,19 @@ ] } }, - "/api/entityGroups/{entityType}/{entityId}": { + "/api/entityGroup/{entityGroupId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", - "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getEntityGroupsForEntity", + "summary": "Get Entity Group Info (getEntityGroupById)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupById", "parameters": [ { - "name": "entityType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "entityId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" @@ -48801,10 +48038,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupId" - } + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -48923,106 +48157,28 @@ "ApiKeyForm": [] } ] - } - }, - "/api/entityGroups/{groupType}": { - "get": { + }, + "delete": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByTypeAndPageLink", + "summary": "Delete Entity Group (deleteEntityGroup)", + "description": "Deletes the entity group but does not delete the entities in the group, since they are also present in reserved group 'All'. Referencing non-existing Entity Group Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for specified group.", + "operationId": "deleteEntityGroup", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -49140,57 +48296,43 @@ ] } }, - "/api/entityGroups/{groupType}/all": { - "get": { + "/api/entityGroup/{entityGroupId}/addEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByType", + "summary": "Add entities to the group (addEntitiesToEntityGroup)", + "description": "Add entities to the specified entity group. This operation is idempotent: entities that are already members of the group are silently ignored. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", + "operationId": "addEntitiesToEntityGroup", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "includeShared", - "in": "query", - "description": "Whether to include shared entity groups.", - "required": false, - "schema": { - "type": "boolean" + "type": "string" } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -49203,7 +48345,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -49307,96 +48449,43 @@ ] } }, - "/api/entityGroups/{groupType}/shared": { - "get": { + "/api/entityGroup/{entityGroupId}/deleteEntities": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", - "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "summary": "Remove entities from the group (removeEntitiesFromEntityGroup)", + "description": "Removes entities from the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'REMOVE_FROM_GROUP' permission for specified group.", + "operationId": "removeEntitiesFromEntityGroup", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" } } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -49409,7 +48498,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -49513,30 +48602,72 @@ ] } }, - "/api/entityGroups/{groupType}/shared/all": { + "/api/entityGroup/{entityGroupId}/entities": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", - "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllSharedEntityGroups", + "summary": "Get Group Entities (getEntities)", + "description": "Returns a page of Short Entity View objects that belongs to specified Entity Group Id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntities", "parameters": [ { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, "schema": { "type": "string", "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" + "ASC", + "DESC" ] } } @@ -49547,10 +48678,7 @@ "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } + "$ref": "#/components/schemas/PageDataShortEntityView" } } } @@ -49671,118 +48799,28 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/makePrivate": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "summary": "Make Entity Group Private (makeEntityGroupPrivate)", + "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPrivate", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -49796,7 +48834,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -49900,70 +48938,28 @@ ] } }, - "/api/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { - "get": { + "/api/entityGroup/{entityGroupId}/makePublic": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", - "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getAllEntityGroupsByOwnerAndType", + "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", + "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPublic", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", + "name": "entityGroupId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", - "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EntityGroupInfo" - } - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -49977,7 +48973,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -50081,119 +49077,39 @@ ] } }, - "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { - "get": { + "/api/entityGroup/{entityGroupId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", - "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "summary": "Share the Entity Group (shareEntityGroup)", + "description": "Share the entity group with certain user group based on the provided Share Group Request. The request is quite flexible and processing of the request involves multiple security checks using platform RBAC feature.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroup", "parameters": [ { - "name": "ownerType", - "in": "path", - "description": "Tenant or Customer", - "required": true, - "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] - } - }, - { - "name": "ownerId", - "in": "path", - "description": "A string value representing the Tenant or Customer id", - "required": true, - "schema": { - "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" - }, - { - "name": "groupType", + "name": "entityGroupId", "in": "path", - "description": "Entity Group type", - "required": true, - "schema": { - "type": "string", - "enum": [ - "CUSTOMER", - "ASSET", - "DEVICE", - "USER", - "ENTITY_VIEW", - "DASHBOARD", - "EDGE" - ] - } - }, - { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", - "required": true, - "schema": { - "type": "string", - "minimum": 1 - } - }, - { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, - "schema": { - "type": "string" - } - }, - { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityGroupInfo" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareGroupRequest" } } }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, "400": { "description": "Bad Request", "content": { @@ -50206,7 +49122,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -50310,37 +49226,32 @@ ] } }, - "/api/ownerInfo/{ownerType}/{ownerId}": { + "/api/entityGroup/{entityGroupId}/{entityId}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Info (getOwnerInfo)", - "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", - "operationId": "getOwnerInfo", + "summary": "Get Group Entity (getGroupEntity)", + "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getGroupEntity", "parameters": [ { - "name": "ownerType", + "name": "entityGroupId", "in": "path", - "description": "Tenant or Customer", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "enum": [ - "TENANT", - "CUSTOMER" - ] + "type": "string" } }, { - "name": "ownerId", + "name": "entityId", "in": "path", - "description": "A string value representing the Tenant or Customer id", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { "type": "string" - }, - "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } } ], "responses": { @@ -50349,7 +49260,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "#/components/schemas/ShortEntityView" } } } @@ -50470,77 +49381,46 @@ ] } }, - "/api/ownerInfos": { - "get": { + "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "post": { "tags": [ "entity-group-controller" ], - "summary": "Get Owner Infos (getOwnerInfos)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwnerInfos", + "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", + "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroupToChildOwnerUserGroup", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id that you would like to share. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, "schema": { - "type": "string", - "minimum": 1 + "type": "string" } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "userGroupId", + "in": "path", + "description": "A string value representing the Entity(User) Group Id that you would like to share with. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" } }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "name": "roleId", + "in": "path", + "description": "A string value representing the Role Id that describes set of permissions you would like to share (read, write, etc). For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, "schema": { "type": "string" } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } } ], "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PageDataEntityInfo" - } - } - } + "description": "OK" }, "400": { "description": "Bad Request", @@ -50554,7 +49434,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid UUID string: 123", + "message": "Invalid request body", "errorCode": 31, "timestamp": 1609459200000 } @@ -50658,64 +49538,63 @@ ] } }, - "/api/owners": { + "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { "get": { "tags": [ "entity-group-controller" ], - "summary": "Get Owners (getOwners)", - "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", - "operationId": "getOwners", + "summary": "Get Entity Group by owner, type and name (getEntityGroupByOwnerAndNameAndType)", + "description": "Fetch the Entity Group object based on the provided Entity Group Id. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupByOwnerAndNameAndType", "parameters": [ { - "name": "pageSize", - "in": "query", - "description": "Maximum amount of entities in a one page", + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", "required": true, "schema": { "type": "string", - "minimum": 1 + "enum": [ + "TENANT", + "CUSTOMER" + ] } }, { - "name": "page", - "in": "query", - "description": "Sequence number of page starting from 0", + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", "required": true, - "schema": { - "type": "string", - "minimum": 0 - } - }, - { - "name": "textSearch", - "in": "query", - "description": "The case insensitive 'startsWith' filter based on the entity group name.", - "required": false, "schema": { "type": "string" - } + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" }, { - "name": "sortProperty", - "in": "query", - "description": "Property of entity to sort by", - "required": false, + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, "schema": { - "type": "string" + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] } }, { - "name": "sortOrder", - "in": "query", - "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", - "required": false, + "name": "groupName", + "in": "path", + "description": "Entity Group name", + "required": true, "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] + "type": "string" } } ], @@ -50725,7 +49604,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataContactBasedObject" + "$ref": "#/components/schemas/EntityGroupInfo" } } } @@ -50846,32 +49725,32 @@ ] } }, - "/api/alarmsQuery/count": { - "post": { + "/api/entityGroupInfo/{entityGroupId}": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Count Alarms by Query (countAlarmsByQuery)", - "description": "Returns the number of alarms that match the query definition.", - "operationId": "countAlarmsByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmCountQuery" - } + "summary": "Get Entity Group Entity Info (getEntityGroupEntityInfoById)", + "description": "Fetch the Entity Group Entity Info object based on the provided Entity Group Id. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfoById", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/EntityInfo" } } } @@ -50888,7 +49767,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -50992,31 +49871,38 @@ ] } }, - "/api/alarmsQuery/find": { - "post": { + "/api/entityGroupInfos": { + "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" ], - "summary": "Find Alarms by Query", - "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", - "operationId": "findAlarmDataByQuery", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AlarmDataQuery" + "summary": "Get Entity Group Entity Infos by Ids (getEntityGroupEntityInfosByIds)", + "description": "Fetch the list of Entity Group Entity Info objects based on the provided entity group ids list. Entity Info is a lightweight object that contains only id and name of the entity group. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByIds", + "parameters": [ + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of group ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" } } - }, - "required": true - }, + } + ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PageDataAlarmData" + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } } } } @@ -51033,7 +49919,7 @@ "summary": "Bad Request", "value": { "status": 400, - "message": "Invalid request body", + "message": "Invalid UUID string: 123", "errorCode": 31, "timestamp": 1609459200000 } @@ -51137,20 +50023,3643 @@ ] } }, - "/api/edqs/state": { + "/api/entityGroupInfos/{groupType}": { "get": { "tags": [ - "entity-query-controller" + "entity-group-controller" + ], + "summary": "Get Entity Group Entity Infos by entity type and page link (getEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } ], - "summary": "getEdqsState", - "operationId": "getEdqsState", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EdqsState" + "$ref": "#/components/schemas/PageDataEntityInfo" + } + } + } + }, + "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/entityGroupInfos/{groupType}/shared": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Shared Entity Group Entity Infos by entity type and page link (getSharedEntityGroupEntityInfosByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Entity Info objects based on the provided Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityInfo" + } + } + } + }, + "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/entityGroupInfos/{ownerType}/{ownerId}/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Group Entity Infos by owner and entity type and page link (getEntityGroupEntityInfosByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityInfo" + } + } + } + }, + "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/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Group Entity Infos for all owners starting from specified than ending with owner of current user (getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group Entity Info objects based on the provided Owner Id and Entity Type and Page Link. Entity Info is a lightweight object that contains only id and name of the entity group. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityInfo" + } + } + } + }, + "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/entityGroups/edge/{edgeId}/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Edge Entity Groups by entity type (getEdgeEntityGroups)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and assigned to the provided Edge entity. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEdgeEntityGroups", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "groupType", + "in": "path", + "description": "EntityGroup type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityGroupInfo" + } + } + } + }, + "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/entityGroups/list": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by Ids (getEntityGroupsByIds)", + "description": "Fetch the list of Entity Group Info objects based on the provided entity group ids list. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByIds", + "parameters": [ + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of group ids, separated by comma ','", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroups/{entityType}/{entityId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by Entity Id (getEntityGroupsForEntity)", + "description": "Returns a list of groups that contain the specified Entity Id. For example, all device groups that contain specific device. The list always contain at least one element - special group 'All'.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupsForEntity", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupId" + } + } + } + } + }, + "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/entityGroups/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by entity type and page link (getEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityGroupInfo" + } + } + } + }, + "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/entityGroups/{groupType}/all": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by entity type (getAllEntityGroupsByType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByType", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "includeShared", + "in": "query", + "description": "Whether to include shared entity groups.", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroups/{groupType}/shared": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Shared Entity Groups by entity type and page link (getSharedEntityGroupsByTypeAndPageLink)", + "description": "Returns a page of Shared Entity Group Info objects based on the provided Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityGroupInfo" + } + } + } + }, + "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/entityGroups/{groupType}/shared/all": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Shared Entity Groups by entity type (getAllSharedEntityGroups)", + "description": "Fetch the list of Shared Entity Group Info objects based on the provided Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllSharedEntityGroups", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by owner and entity type and page link (getEntityGroupsByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityGroupInfo" + } + } + } + }, + "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/entityGroups/{ownerType}/{ownerId}/{groupType}/all": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by owner and entity type (getAllEntityGroupsByOwnerAndType)", + "description": "Fetch the list of Entity Group Info objects based on the provided Owner Id and Entity Type. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.Entity Group Info extends Entity Group object and adds 'ownerIds' - a list of owner ids.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getAllEntityGroupsByOwnerAndType", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid UUID string: 123", + "errorCode": 31, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-401": { + "summary": "Unauthorized", + "value": { + "status": 401, + "message": "Authentication failed", + "errorCode": 10, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-403": { + "summary": "Forbidden", + "value": { + "status": 403, + "message": "You don't have permission to perform this operation!", + "errorCode": 20, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-404": { + "summary": "Not Found", + "value": { + "status": 404, + "message": "Requested item wasn't found!", + "errorCode": 32, + "timestamp": 1609459200000 + } + } + } + } + } + }, + "429": { + "description": "Too Many Requests", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-429": { + "summary": "Too Many Requests", + "value": { + "status": 429, + "message": "Too many requests for current tenant!", + "errorCode": 33, + "timestamp": 1609459200000 + } + } + } + } + } + } + }, + "security": [ + { + "HttpLoginForm": [] + }, + { + "ApiKeyForm": [] + } + ] + } + }, + "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups for all owners starting from specified than ending with owner of current user (getEntityGroupsHierarchyByOwnerAndTypeAndPageLink)", + "description": "Returns a page of Entity Group objects based on the provided Owner Id and Entity Type and Page Link. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityGroupInfo" + } + } + } + }, + "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/ownerInfo/{ownerType}/{ownerId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Owner Info (getOwnerInfo)", + "description": "Fetch the owner info (tenant or customer) presented as Entity Info object based on the provided owner Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getOwnerInfo", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the Tenant or Customer id", + "required": true, + "schema": { + "type": "string" + }, + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityInfo" + } + } + } + }, + "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/ownerInfos": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Owner Infos (getOwnerInfos)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwnerInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityInfo" + } + } + } + }, + "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/owners": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Owners (getOwners)", + "description": "Provides a rage view of Customers that the current user has READ access to. If the current user is Tenant administrator, the result set also contains the tenant. The call is designed for the UI auto-complete component to show tenant and all possible Customers that the user may select to change the owner of the particular entity or entity group.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getOwners", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "string", + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "string", + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the entity group name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataContactBasedObject" + } + } + } + }, + "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/alarmsQuery/count": { + "post": { + "tags": [ + "entity-query-controller" + ], + "summary": "Count Alarms by Query (countAlarmsByQuery)", + "description": "Returns the number of alarms that match the query definition.", + "operationId": "countAlarmsByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmCountQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "status": 400, + "message": "Invalid 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/alarmsQuery/find": { + "post": { + "tags": [ + "entity-query-controller" + ], + "summary": "Find Alarms by Query", + "description": "This method description defines how Alarm Data Query extends the Entity Data Query. See method 'Find Entity Data by Query' first to get the info about 'Entity Data Query'.\n\n The platform will first search the entities that match the entity and key filters. Then, the platform will use 'Alarm Page Link' to filter the alarms related to those entities. Finally, platform fetch the properties of alarm that are defined in the **'alarmFields'** and combine them with the other entity, attribute and latest time series fields to return the result. \n\n See example of the alarm query below. The query will search first 100 active alarms with type 'Temperature Alarm' or 'Fire Alarm' for any device with current temperature > 0. The query will return combination of the entity fields: name of the device, device model and latest temperature reading and alarms fields: createdTime, type, severity and status: \n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 100,\n \"textSearch\": null,\n \"searchPropagatedAlarms\": false,\n \"statusList\": [\n \"ACTIVE\"\n ],\n \"severityList\": [\n \"CRITICAL\",\n \"MAJOR\"\n ],\n \"typeList\": [\n \"Temperature Alarm\",\n \"Fire Alarm\"\n ],\n \"sortOrder\": {\n \"key\": {\n \"key\": \"createdTime\",\n \"type\": \"ALARM_FIELD\"\n },\n \"direction\": \"DESC\"\n },\n \"timeWindow\": 86400000\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"alarmFields\": [\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"createdTime\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"type\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"severity\"\n },\n {\n \"type\": \"ALARM_FIELD\",\n \"key\": \"status\"\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ]\n}\n```", + "operationId": "findAlarmDataByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmDataQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAlarmData" + } + } + } + }, + "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/edqs/state": { + "get": { + "tags": [ + "entity-query-controller" + ], + "summary": "getEdqsState", + "operationId": "getEdqsState", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdqsState" } } } @@ -115569,21 +118078,31 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ADMIN_SETTINGS", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AffectedTenantAdministratorsFilter": { "allOf": [ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "AFFECTED_TENANT_ADMINISTRATORS" + } }, "AffectedUserFilter": { "allOf": [ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "AFFECTED_USER" + } }, "AggFunction": { "type": "string", @@ -115609,7 +118128,11 @@ } } } - ] + ], + "example": { + "type": "function", + "function": null + } }, "AggInput": { "discriminator": { @@ -115619,6 +118142,10 @@ "function": "#/components/schemas/AggFunctionInput" } }, + "example": { + "type": "key", + "key": null + }, "properties": { "type": { "type": "string" @@ -115642,6 +118169,11 @@ "CUSTOM": "#/components/schemas/CustomInterval" } }, + "example": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, "properties": { "type": { "type": "string" @@ -115664,7 +118196,11 @@ } } } - ] + ], + "example": { + "type": "key", + "key": null + } }, "AggMetric": { "type": "object", @@ -115790,6 +118326,22 @@ "OLLAMA": "#/components/schemas/OllamaChatModelConfig" } }, + "example": { + "provider": "OPENAI", + "providerConfig": { + "baseUrl": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "properties": { "provider": { "type": "string" @@ -115804,7 +118356,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "AI_MODEL" + } }, "AiModelId": { "type": "object", @@ -115815,7 +118385,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "AI_MODEL", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AiModelType": { "type": "string", @@ -116025,6 +118599,13 @@ } } ], + "example": { + "triggerType": "ALARM_ASSIGNMENT", + "alarmTypes": null, + "alarmSeverities": null, + "alarmStatuses": null, + "notifyOn": null + }, "required": [ "notifyOn" ] @@ -116048,6 +118629,10 @@ } } ], + "example": { + "triggerType": "ALARM_ASSIGNMENT", + "targets": null + }, "required": [ "targets" ] @@ -116098,6 +118683,42 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "ALARM", + "arguments": null, + "createRules": null, + "clearRule": { + "condition": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + }, + "alarmDetails": null, + "dashboardId": { + "entityType": "DASHBOARD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "propagate": null, + "propagateToOwner": null, + "propagateToOwnerHierarchy": null, + "propagateToTenant": null, + "propagateRelationTypes": null + }, "required": [ "arguments", "createRules" @@ -116251,7 +118872,15 @@ } } } - ] + ], + "example": { + "triggerType": "ALARM_COMMENT", + "alarmTypes": null, + "alarmSeverities": null, + "alarmStatuses": null, + "onlyUserComments": null, + "notifyOnCommentUpdate": null + } }, "AlarmCommentRecipientsConfig": { "allOf": [ @@ -116272,6 +118901,10 @@ } } ], + "example": { + "triggerType": "ALARM_COMMENT", + "targets": null + }, "required": [ "targets" ] @@ -116293,6 +118926,18 @@ "REPEATING": "#/components/schemas/RepeatingAlarmCondition" } }, + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + }, "properties": { "expression": { "$ref": "#/components/schemas/AlarmConditionExpression" @@ -116317,6 +118962,11 @@ "TBEL": "#/components/schemas/TbelAlarmConditionExpression" } }, + "example": { + "type": "SIMPLE", + "filters": null, + "operation": {} + }, "properties": { "type": { "type": "string" @@ -116772,7 +119422,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ALARM", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AlarmInfo": { "type": "object", @@ -116965,6 +119619,15 @@ } } ], + "example": { + "triggerType": "ALARM", + "alarmTypes": null, + "alarmSeverities": null, + "notifyOn": null, + "clearRule": { + "alarmStatuses": null + } + }, "required": [ "notifyOn" ] @@ -117003,6 +119666,14 @@ } } ], + "example": { + "type": "BOOLEAN", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "operation", "value" @@ -117034,7 +119705,12 @@ } } } - ] + ], + "example": { + "type": "COMPLEX", + "operation": {}, + "predicates": null + } }, "AlarmRuleComplexOperation": { "type": "string", @@ -117174,6 +119850,15 @@ "COMPLEX": "#/components/schemas/AlarmRuleComplexFilterPredicate" } }, + "example": { + "type": "STRING", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + }, + "ignoreCase": null + }, "properties": { "type": { "type": "string" @@ -117200,6 +119885,14 @@ } } ], + "example": { + "type": "NUMERIC", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "operation", "value" @@ -117236,6 +119929,15 @@ } } ], + "example": { + "type": "STRING", + "operation": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + }, + "ignoreCase": null + }, "required": [ "operation", "value" @@ -117263,6 +119965,9 @@ "CUSTOM": "#/components/schemas/CustomTimeSchedule" } }, + "example": { + "type": "ANY_TIME" + }, "properties": { "type": { "type": "string" @@ -117346,7 +120051,77 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "ALARM_TABLE", + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "showTableHeading": null, + "tableHeading": { + "text": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, + "tableSortOrder": { + "column": null, + "direction": {} + }, + "alarmSource": { + "type": {}, + "deviceId": null, + "entityAliasId": null, + "filterId": null, + "dataKeys": null, + "latestDataKeys": null, + "alarmFilterConfig": { + "typeList": null, + "statusList": null, + "severityList": null, + "assigneeId": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "searchPropagatedAlarms": null + } + }, + "timewindow": { + "history": { + "historyType": null, + "interval": {}, + "timewindowMs": null, + "fixedTimewindow": {}, + "quickInterval": {} + }, + "aggregation": { + "type": {}, + "limit": null + }, + "timezone": null + } + } }, "AliasEntityId": { "type": "object", @@ -117384,14 +120159,21 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "ALL_USERS" + } }, "AllowCreateNewDevicesDeviceProfileProvisionConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "ALLOW_CREATE_NEW_DEVICES" + } }, "AllowedPermissionsInfo": { "type": "object", @@ -117492,6 +120274,21 @@ } } ], + "example": { + "provider": "AMAZON_BEDROCK", + "providerConfig": { + "region": null, + "accessKeyId": null, + "secretAccessKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -117563,6 +120360,20 @@ } } ], + "example": { + "provider": "ANTHROPIC", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -117584,7 +120395,10 @@ { "$ref": "#/components/schemas/AlarmSchedule" } - ] + ], + "example": { + "type": "ANY_TIME" + } }, "ApiFeature": { "type": "string", @@ -117597,7 +120411,8 @@ "EMAIL", "SMS", "ALARM", - "REPORT" + "REPORT", + "AI" ] }, "ApiKey": { @@ -117664,7 +120479,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "API_KEY", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ApiKeyInfo": { "type": "object", @@ -117741,7 +120560,12 @@ } } } - ] + ], + "example": { + "triggerType": "API_USAGE_LIMIT", + "apiFeatures": null, + "notifyOn": null + } }, "ApiUsageLimitRecipientsConfig": { "allOf": [ @@ -117762,6 +120586,10 @@ } } ], + "example": { + "triggerType": "API_USAGE_LIMIT", + "targets": null + }, "required": [ "targets" ] @@ -117779,7 +120607,14 @@ } } } - ] + ], + "example": { + "type": "apiUsageState", + "customerId": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "ApiUsageStateId": { "type": "object", @@ -117790,7 +120625,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "API_USAGE_STATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ApiUsageStateValue": { "type": "string", @@ -117903,7 +120742,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ASSET" + } }, "AssetId": { "type": "object", @@ -117914,7 +120771,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ASSET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AssetInfo": { "type": "object", @@ -118057,7 +120918,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ASSET_PROFILE" + } }, "AssetProfileId": { "type": "object", @@ -118068,7 +120947,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ASSET_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "AssetProfileInfo": { "type": "object", @@ -118153,7 +121036,26 @@ } } } - ] + ], + "example": { + "type": "assetSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "assetTypes": null + } }, "AssetTypeFilter": { "allOf": [ @@ -118179,7 +121081,13 @@ } } } - ] + ], + "example": { + "type": "assetType", + "assetTypes": null, + "assetNameFilter": null, + "assetType": null + } }, "AttributeData": { "type": "object", @@ -118306,7 +121214,15 @@ } } } - ] + ], + "example": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + } }, "AttributesOutput": { "allOf": [ @@ -118321,7 +121237,21 @@ } } } - ] + ], + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + }, + "type": "ATTRIBUTES" + } }, "AttributesOutputStrategy": { "discriminator": { @@ -118331,6 +121261,14 @@ "RULE_CHAIN": "#/components/schemas/AttributesRuleChainOutputStrategy" } }, + "example": { + "type": "IMMEDIATE", + "sendAttributesUpdatedNotification": null, + "updateAttributesOnlyOnValueChange": null, + "saveAttribute": null, + "sendWsUpdate": null, + "processCfs": null + }, "properties": { "type": { "type": "string" @@ -118345,7 +121283,10 @@ { "$ref": "#/components/schemas/AttributesOutputStrategy" } - ] + ], + "example": { + "type": "RULE_CHAIN" + } }, "AuditLog": { "type": "object", @@ -118534,6 +121475,12 @@ "type": "object", "description": "Contains unique time series and attribute key names discovered from entities matching a query,\noptionally including a sample value for each key.", "properties": { + "totalEntities": { + "type": "integer", + "format": "int32", + "description": "Total number of entities that matched the query filter.", + "example": 5 + }, "entityTypes": { "type": "array", "description": "Set of entity types found among the matched entities.", @@ -118564,7 +121511,8 @@ } }, "required": [ - "entityTypes" + "entityTypes", + "totalEntities" ] }, "AwsSnsSmsProviderConfiguration": { @@ -118589,7 +121537,13 @@ } } } - ] + ], + "example": { + "type": "AWS_SNS", + "accessKeyId": null, + "secretAccessKey": null, + "region": null + } }, "AxisPosition": { "type": "string", @@ -118651,6 +121605,23 @@ } } ], + "example": { + "provider": "AZURE_OPENAI", + "providerConfig": { + "endpoint": null, + "serviceVersion": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -118697,6 +121668,12 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "BACKUP_CODE", + "codes": null, + "codesLeft": null + }, "required": [ "codes" ] @@ -118716,7 +121693,11 @@ } } } - ] + ], + "example": { + "providerType": "BACKUP_CODE", + "codesQuantity": null + } }, "BadgePosition": { "type": "string", @@ -118820,6 +121801,11 @@ } } ], + "example": { + "type": "BASIC", + "username": null, + "password": null + }, "required": [ "password", "username" @@ -118834,7 +121820,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "BLOB_ENTITY", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "BlobEntityInfo": { "type": "object", @@ -118979,7 +121969,21 @@ } } } - ] + ], + "example": { + "type": "BOOLEAN", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + } + } }, "BooleanOperation": { "type": "string", @@ -119268,6 +122272,19 @@ "ENTITY_AGGREGATION": "#/components/schemas/EntityAggregationCalculatedFieldConfiguration" } }, + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SIMPLE", + "arguments": null, + "expression": null, + "useLatestTs": null + }, "properties": { "output": { "$ref": "#/components/schemas/Output" @@ -119351,7 +122368,31 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_CALCULATED_FIELD", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "entityId": "57b6bafe-d600-423c-9267-fe31e5218986", + "entityType": "DEVICE", + "msgId": "dcf44612-2ce4-4e5d-b462-ebb9c5628228", + "msgType": "POST_TELEMETRY_REQUEST", + "arguments": { + "x": { + "ts": 1739432016629, + "value": 20 + }, + "y": { + "ts": 1739429717656, + "value": 12 + } + }, + "result": { + "x + y": 32 + } + } }, "CalculatedFieldId": { "type": "object", @@ -119362,7 +122403,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CALCULATED_FIELD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CalculatedFieldInfo": { "type": "object", @@ -119447,6 +122492,15 @@ "v3": "#/components/schemas/V3CaptchaParams" } }, + "example": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, "properties": { "version": { "type": "string" @@ -119484,6 +122538,10 @@ "CURRENT_OWNER": "#/components/schemas/CurrentOwnerDynamicSourceConfiguration" } }, + "example": { + "type": "RELATION_PATH_QUERY", + "levels": null + }, "properties": { "type": { "type": "string" @@ -119518,6 +122576,18 @@ } } ], + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "CF_REPROCESSING", + "calculatedFieldId": { + "entityType": "CALCULATED_FIELD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "calculatedFieldName": null, + "startTs": null, + "endTs": null + }, "required": [ "calculatedFieldId" ] @@ -119527,7 +122597,19 @@ { "$ref": "#/components/schemas/JobResult" } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "CF_REPROCESSING" + } }, "CfReprocessingTaskFailure": { "type": "object", @@ -119650,12 +122732,23 @@ "none" ] }, + "ChatType": { + "type": "string", + "enum": [ + "GENERIC", + "SOLUTION_BUILDER" + ] + }, "CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "CHECK_PRE_PROVISIONED_DEVICES" + } }, "ChecksumAlgorithm": { "type": "string", @@ -119710,7 +122803,12 @@ } } } - ] + ], + "example": { + "spec": "CLIENT_ATTRIBUTES_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + } }, "CoapDeviceProfileTransportConfiguration": { "allOf": [ @@ -119728,7 +122826,22 @@ } } } - ] + ], + "example": { + "type": "COAP", + "coapDeviceTypeConfiguration": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + }, + "clientSettings": { + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } + } }, "CoapDeviceTransportConfiguration": { "allOf": [ @@ -119755,7 +122868,14 @@ } } } - ] + ], + "example": { + "type": "COAP", + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } }, "CoapDeviceTypeConfiguration": { "description": "CoAP device type configuration", @@ -119766,6 +122886,12 @@ "EFENTO": "#/components/schemas/EfentoCoapDeviceTypeConfiguration" } }, + "example": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + }, "properties": { "coapDeviceType": { "type": "string" @@ -119804,6 +122930,34 @@ }, "ColumnSettings": { "type": "object", + "example": { + "columnWidth": null, + "header": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "cell": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "type": "COLUMN" + }, "properties": { "columnWidth": { "type": "string" @@ -119864,7 +123018,12 @@ } } } - ] + ], + "example": { + "type": "COMPLEX", + "operation": {}, + "predicates": null + } }, "ComplexOperation": { "type": "string", @@ -119892,7 +123051,14 @@ } } } - ] + ], + "example": { + "versionName": null, + "branch": null, + "type": "COMPLEX", + "syncStrategy": {}, + "entityTypes": null + } }, "ComponentClusteringMode": { "type": "string", @@ -120146,7 +123312,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "CONVERTER" + } }, "ConverterId": { "type": "object", @@ -120157,7 +123341,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CONVERTER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ConverterType": { "type": "string", @@ -120189,14 +123377,25 @@ { "$ref": "#/components/schemas/ReportTemplateConfig" } - ] + ], + "example": { + "namePattern": null, + "timeDataPattern": null, + "format": "CSV", + "entityAliases": null, + "filters": null, + "components": null + } }, "CurrentOwnerDynamicSourceConfiguration": { "allOf": [ { "$ref": "#/components/schemas/CfArgumentDynamicSourceConfiguration" } - ] + ], + "example": { + "type": "CURRENT_OWNER" + } }, "CustomInterval": { "allOf": [ @@ -120222,6 +123421,12 @@ } } ], + "example": { + "type": "CUSTOM", + "tz": null, + "offsetSec": null, + "durationSec": null + }, "required": [ "durationSec", "tz" @@ -120440,6 +123645,19 @@ } } ], + "example": { + "type": "CUSTOM", + "visible": null, + "name": "My Custom Menu", + "icon": "My Custom Menu", + "menuItemType": "LINK", + "linkType": "URL", + "dashboardId": "https://mycompany.com", + "hideDashboardToolbar": null, + "url": "https://myexternalurl.com", + "setAccessToken": null, + "pages": null + }, "required": [ "menuItemType", "name" @@ -120470,7 +123688,14 @@ } } } - ] + ], + "example": { + "type": "CUSTOM", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "path": "/alarmDetails/868c7083-032d-4f52-b8b4-7859aebb6a4e" + } }, "CustomTimeSchedule": { "allOf": [ @@ -120491,7 +123716,12 @@ } } } - ] + ], + "example": { + "type": "CUSTOM", + "timezone": null, + "items": null + } }, "CustomTimeScheduleItem": { "type": "object", @@ -120622,7 +123852,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "CUSTOMER" + } }, "CustomerId": { "type": "object", @@ -120633,7 +123881,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "CustomerInfo": { "type": "object", @@ -120767,6 +124019,10 @@ } } ], + "example": { + "type": "CUSTOMER_USERS", + "customerId": null + }, "required": [ "customerId" ] @@ -120899,6 +124155,42 @@ } } ], + "example": { + "subType": {}, + "type": "DASHBOARD", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "config": { + "baseUrl": "https:thingsboard.cloud", + "dashboardId": "784f394c-42b6-435a-983c-b7beff2784f9", + "state": null, + "timezone": "Europe/Kiev", + "useDashboardTimewindow": true, + "timewindow": {}, + "namePattern": "report-%d{yyyy-MM-dd_HH:mm:ss}", + "type": "pdf", + "useCurrentUserCredentials": true, + "userId": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, "required": [ "config" ] @@ -120908,7 +124200,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DASHBOARD" + } }, "DashboardId": { "type": "object", @@ -120919,7 +124229,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DASHBOARD", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DashboardInfo": { "type": "object", @@ -121036,7 +124350,14 @@ } } } - ] + ], + "example": { + "type": "DASHBOARD", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "dashboardId": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DashboardReportConfig": { "type": "object", @@ -121161,6 +124482,34 @@ "DEFAULT": "#/components/schemas/DefaultDataKeySettings" } }, + "example": { + "columnWidth": null, + "header": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "cell": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "type": "COLUMN" + }, "properties": { "type": { "$ref": "#/components/schemas/DataKeySettingsType", @@ -121249,6 +124598,11 @@ } } ], + "example": { + "type": "DAY", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -121293,7 +124647,18 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_CONVERTER", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "type": null, + "in": null, + "out": null, + "metadata": null + } }, "DebugIntegrationEventFilter": { "allOf": [ @@ -121332,7 +124697,17 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_INTEGRATION", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "type": null, + "message": null, + "statusIntegration": null + } }, "DebugSettings": { "type": "object", @@ -121367,7 +124742,13 @@ } } } - ] + ], + "example": { + "coapDeviceType": "DEFAULT", + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + } + } }, "DefaultDashboardParams": { "type": "object", @@ -121388,7 +124769,10 @@ { "$ref": "#/components/schemas/DataKeySettings" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceConfiguration": { "allOf": [ @@ -121396,7 +124780,10 @@ "$ref": "#/components/schemas/DeviceConfiguration" } ], - "description": "Default device configuration" + "description": "Default device configuration", + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceProfileConfiguration": { "allOf": [ @@ -121404,21 +124791,30 @@ "$ref": "#/components/schemas/DeviceProfileConfiguration" } ], - "description": "Default device profile configuration" + "description": "Default device profile configuration", + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceProfileTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultDeviceTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceTransportConfiguration" } - ] + ], + "example": { + "type": "DEFAULT" + } }, "DefaultMenuItem": { "allOf": [ @@ -121457,7 +124853,15 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "visible": null, + "id": "home", + "name": "My Custom Menu", + "icon": "My Custom Menu", + "pages": null + } }, "DefaultMobilePage": { "allOf": [ @@ -121484,7 +124888,14 @@ } } } - ] + ], + "example": { + "type": "DEFAULT", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "id": "HOME" + } }, "DefaultPageId": { "type": "string", @@ -121717,6 +125128,11 @@ "format": "int64", "example": 10000 }, + "maxAiCredits": { + "type": "integer", + "format": "int64", + "example": 10000 + }, "tenantServerRestLimitsConfiguration": { "type": "string" }, @@ -121882,10 +125298,105 @@ "type": "integer", "format": "int64", "example": 60 + }, + "aiChatRequestsPerTenantRateLimit": { + "type": "string" } } } - ] + ], + "example": { + "type": "DEFAULT", + "maxDevices": null, + "maxAssets": null, + "maxCustomers": null, + "maxUsers": null, + "maxDashboards": null, + "maxRuleChains": null, + "maxEdges": null, + "maxResourcesInBytes": null, + "maxOtaPackagesInBytes": null, + "maxResourceSize": null, + "maxReportSizeInBytes": null, + "maxIntegrations": null, + "maxConverters": null, + "maxSchedulerEvents": null, + "transportTenantMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60", + "transportDeviceMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayDeviceMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "integrationMsgsPerTenantRateLimit": "20:1,600:60", + "integrationMsgsPerDeviceRateLimit": "20:1,600:60", + "integrationMsgsPerAssetRateLimit": null, + "tenantEntityExportRateLimit": "20:1,600:60", + "tenantEntityImportRateLimit": "20:1,600:60", + "tenantNotificationRequestsRateLimit": "20:1,600:60", + "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60", + "maxTransportMessages": 10000000, + "maxTransportDataPoints": 10000000, + "maxREExecutions": 4000000, + "maxJSExecutions": 5000000, + "maxTbelExecutions": 5000000, + "maxDPStorageDays": 0, + "maxRuleNodeExecutionsPerMessage": 50, + "maxDebugModeDurationMinutes": 15, + "maxEmails": 0, + "smsEnabled": true, + "maxSms": 0, + "maxCreatedAlarms": 1000, + "maxGeneratedReports": 10000, + "maxAiCredits": 10000, + "tenantServerRestLimitsConfiguration": null, + "customerServerRestLimitsConfiguration": null, + "maxWsSessionsPerTenant": null, + "maxWsSessionsPerCustomer": null, + "maxWsSessionsPerRegularUser": null, + "maxWsSessionsPerPublicUser": null, + "wsMsgQueueLimitPerSession": null, + "maxWsSubscriptionsPerTenant": null, + "maxWsSubscriptionsPerCustomer": null, + "maxWsSubscriptionsPerRegularUser": null, + "maxWsSubscriptionsPerPublicUser": null, + "wsUpdatesPerSessionRateLimit": null, + "cassandraReadQueryTenantCoreRateLimits": null, + "cassandraWriteQueryTenantCoreRateLimits": null, + "cassandraReadQueryTenantRuleEngineRateLimits": null, + "cassandraWriteQueryTenantRuleEngineRateLimits": null, + "edgeEventRateLimits": null, + "edgeEventRateLimitsPerEdge": null, + "edgeUplinkMessagesRateLimits": null, + "edgeUplinkMessagesRateLimitsPerEdge": null, + "defaultStorageTtlDays": null, + "alarmsTtlDays": null, + "rpcTtlDays": null, + "queueStatsTtlDays": null, + "ruleEngineExceptionsTtlDays": null, + "blobEntityTtlDays": null, + "reportTtlDays": null, + "warnThreshold": null, + "maxCalculatedFieldsPerEntity": 100, + "maxArgumentsPerCF": 10, + "minAllowedScheduledUpdateIntervalInSecForCF": 10, + "maxRelationLevelPerCfArgument": 2, + "maxRelatedEntitiesToReturnPerCfArgument": 1000, + "maxDataPointsPerRollingArg": 1000, + "maxStateSizeInKBytes": 512, + "maxSingleValueArgumentSizeInKBytes": 32, + "minAllowedDeduplicationIntervalInSecForCF": 10, + "minAllowedAggregationIntervalInSecForCF": 60, + "intermediateAggregationIntervalInSecForCF": 300, + "cfReevaluationCheckInterval": 60, + "alarmsReevaluationInterval": 60, + "aiChatRequestsPerTenantRateLimit": null + } }, "DeliveryMethodNotificationTemplate": { "type": "object", @@ -121901,6 +125412,13 @@ "MOBILE_APP": "#/components/schemas/MobileAppDeliveryMethodNotificationTemplate" } }, + "example": { + "enabled": null, + "body": null, + "method": "WEB", + "subject": "New Message Received", + "additionalConfig": {} + }, "properties": { "enabled": { "type": "boolean" @@ -122028,6 +125546,12 @@ } } ], + "example": { + "triggerType": "DEVICE_ACTIVITY", + "devices": null, + "deviceProfiles": null, + "notifyOn": null + }, "required": [ "notifyOn" ] @@ -122051,6 +125575,10 @@ } } ], + "example": { + "triggerType": "DEVICE_ACTIVITY", + "targets": null + }, "required": [ "targets" ] @@ -122064,6 +125592,9 @@ "DEFAULT": "#/components/schemas/DefaultDeviceConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "$ref": "#/components/schemas/DeviceProfileType", @@ -122181,7 +125712,37 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "credentials": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "createdTime": 1609459200000, + "deviceId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "credentialsType": {}, + "credentialsId": "Access token or other value that depends on the credentials type", + "credentialsValue": "Null in case of ACCESS_TOKEN. See model definition.", + "version": null + }, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE" + } }, "DeviceGroupOtaPackage": { "type": "object", @@ -122214,7 +125775,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DeviceInfo": { "type": "object", @@ -122404,6 +125969,9 @@ "DEFAULT": "#/components/schemas/DefaultDeviceProfileConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -122435,7 +126003,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE_PROFILE" + } }, "DeviceProfileId": { "type": "object", @@ -122446,7 +126032,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DEVICE_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DeviceProfileInfo": { "type": "object", @@ -122493,6 +126083,10 @@ "X509_CERTIFICATE_CHAIN": "#/components/schemas/X509CertificateChainProvisionConfiguration" } }, + "example": { + "provisionDeviceSecret": "secret123", + "type": "DISABLED" + }, "properties": { "provisionDeviceSecret": { "type": "string", @@ -122528,6 +126122,9 @@ "SNMP": "#/components/schemas/SnmpDeviceProfileTransportConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -122602,7 +126199,26 @@ } } } - ] + ], + "example": { + "type": "deviceSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "deviceTypes": null + } }, "DeviceTransportConfiguration": { "description": "Configuration for device transport", @@ -122616,6 +126232,9 @@ "SNMP": "#/components/schemas/SnmpDeviceTransportConfiguration" } }, + "example": { + "type": "DEFAULT" + }, "properties": { "type": { "type": "string" @@ -122659,7 +126278,13 @@ } } } - ] + ], + "example": { + "type": "deviceType", + "deviceTypes": null, + "deviceNameFilter": null, + "deviceType": null + } }, "Direction": { "type": "string", @@ -122673,7 +126298,11 @@ { "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "DISABLED" + } }, "DividerComponent": { "allOf": [ @@ -122718,7 +126347,31 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "DIVIDER", + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "length": {}, + "borderType": {}, + "widthPx": null, + "color": null + } }, "Domain": { "type": "object", @@ -122774,7 +126427,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "DomainInfo": { "type": "object", @@ -122882,14 +126539,40 @@ } } ], - "description": "Dummy job configuration" + "description": "Dummy job configuration", + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "DUMMY", + "taskProcessingTimeMs": null, + "successfulTasksCount": null, + "failedTasksCount": null, + "permanentlyFailedTasksCount": null, + "errors": null, + "retries": null, + "taskProcessingTimeoutMs": null, + "generalError": null, + "submittedTasksBeforeGeneralError": null + } }, "DummyJobResult": { "allOf": [ { "$ref": "#/components/schemas/JobResult" } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "DUMMY" + } }, "DummyTaskFailure": { "type": "object", @@ -122938,6 +126621,23 @@ } } ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "DURATION", + "unit": {}, + "value": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "unit", "value" @@ -123110,7 +126810,11 @@ } } } - ] + ], + "example": { + "triggerType": "EDGE_COMMUNICATION_FAILURE", + "edges": null + } }, "EdgeCommunicationFailureRecipientsConfig": { "allOf": [ @@ -123131,6 +126835,10 @@ } } ], + "example": { + "triggerType": "EDGE_COMMUNICATION_FAILURE", + "targets": null + }, "required": [ "targets" ] @@ -123160,7 +126868,12 @@ } } } - ] + ], + "example": { + "triggerType": "EDGE_CONNECTION", + "edges": null, + "notifyOn": null + } }, "EdgeConnectionRecipientsConfig": { "allOf": [ @@ -123181,6 +126894,10 @@ } } ], + "example": { + "triggerType": "EDGE_CONNECTION", + "targets": null + }, "required": [ "targets" ] @@ -123341,7 +127058,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "EDGE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EdgeInfo": { "type": "object", @@ -123510,7 +127231,26 @@ } } } - ] + ], + "example": { + "type": "edgeSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "edgeTypes": null + } }, "EdgeTypeFilter": { "allOf": [ @@ -123536,7 +127276,13 @@ } } } - ] + ], + "example": { + "type": "edgeType", + "edgeTypes": null, + "edgeNameFilter": null, + "edgeType": null + } }, "EdqsApiMode": { "type": "string", @@ -123587,7 +127333,10 @@ { "$ref": "#/components/schemas/CoapDeviceTypeConfiguration" } - ] + ], + "example": { + "coapDeviceType": "EFENTO" + } }, "EmailDeliveryMethodNotificationTemplate": { "allOf": [ @@ -123604,6 +127353,12 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "EMAIL", + "subject": null + }, "required": [ "subject" ] @@ -123623,6 +127378,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "EMAIL", + "email": null + }, "required": [ "email" ] @@ -123642,7 +127402,11 @@ } } } - ] + ], + "example": { + "providerType": "EMAIL", + "verificationCodeLifetime": null + } }, "EnterpriseCaptchaParams": { "allOf": [ @@ -123678,7 +127442,16 @@ } } } - ] + ], + "example": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + } }, "EntitiesByGroupNameFilter": { "allOf": [ @@ -123705,7 +127478,18 @@ } } } - ] + ], + "example": { + "type": "entitiesByGroupName", + "groupType": {}, + "ownerId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityGroupNameFilter": null, + "groupStateEntity": null, + "stateEntityParamName": null + } }, "EntitiesLimitNotificationRuleTriggerConfig": { "allOf": [ @@ -123729,7 +127513,12 @@ } } } - ] + ], + "example": { + "triggerType": "ENTITIES_LIMIT", + "entityTypes": null, + "threshold": null + } }, "EntitiesLimitRecipientsConfig": { "allOf": [ @@ -123750,6 +127539,10 @@ } } ], + "example": { + "triggerType": "ENTITIES_LIMIT", + "targets": null + }, "required": [ "targets" ] @@ -123796,7 +127589,14 @@ } } } - ] + ], + "example": { + "triggerType": "ENTITY_ACTION", + "entityTypes": null, + "created": null, + "updated": null, + "deleted": null + } }, "EntityActionRecipientsConfig": { "allOf": [ @@ -123817,6 +127617,10 @@ } } ], + "example": { + "triggerType": "ENTITY_ACTION", + "targets": null + }, "required": [ "targets" ] @@ -123855,6 +127659,27 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "ENTITY_AGGREGATION", + "arguments": null, + "metrics": null, + "interval": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, + "watermark": { + "duration": null + }, + "produceIntermediateResult": null + }, "required": [ "arguments", "interval", @@ -124073,6 +127898,36 @@ "REPORT_TEMPLATE": "#/components/schemas/ReportTemplateExportData" } }, + "example": { + "credentials": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "createdTime": 1609459200000, + "deviceId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "credentialsType": {}, + "credentialsId": "Access token or other value that depends on the credentials type", + "credentialsValue": "Null in case of ACCESS_TOKEN. See model definition.", + "version": null + }, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "DEVICE" + }, "properties": { "entity": { "$ref": "#/components/schemas/ExportableEntity" @@ -124158,6 +128013,14 @@ "schedulerEvent": "#/components/schemas/SchedulerEventFilter" } }, + "example": { + "type": "singleEntity", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, "properties": { "type": { "type": "string" @@ -124263,7 +128126,28 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "permissions": null, + "groupOtaPackages": null, + "groupEntities": null, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ENTITY_GROUP" + } }, "EntityGroupFilter": { "allOf": [ @@ -124290,7 +128174,15 @@ } } } - ] + ], + "example": { + "type": "entityGroup", + "groupType": {}, + "entityGroup": null, + "groupStateEntity": null, + "defaultStateGroupType": {}, + "defaultStateEntityGroup": null + } }, "EntityGroupId": { "type": "object", @@ -124301,7 +128193,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EntityGroupInfo": { "type": "object", @@ -124399,7 +128295,12 @@ } } } - ] + ], + "example": { + "type": "entityGroupList", + "groupType": {}, + "entityGroupList": null + } }, "EntityGroupNameFilter": { "allOf": [ @@ -124417,7 +128318,12 @@ } } } - ] + ], + "example": { + "type": "entityGroupName", + "groupType": {}, + "entityGroupNameFilter": null + } }, "EntityId": { "type": "object", @@ -124472,6 +128378,10 @@ "WIDGET_TYPE": "#/components/schemas/WidgetTypeId" } }, + "example": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, "properties": { "entityType": { "$ref": "#/components/schemas/EntityType", @@ -124553,7 +128463,12 @@ } } } - ] + ], + "example": { + "type": "entityList", + "entityType": {}, + "entityList": null + } }, "EntityLoadError": { "type": "object", @@ -124588,7 +128503,12 @@ } } } - ] + ], + "example": { + "type": "entityName", + "entityType": {}, + "entityNameFilter": null + } }, "EntityRelation": { "type": "object", @@ -124768,7 +128688,46 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "ENTITY_TABLE", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "showTableHeading": null, + "tableHeading": { + "text": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, + "tableSortOrder": { + "column": null, + "direction": {} + } + } }, "EntityType": { "type": "string", @@ -124834,7 +128793,11 @@ } } } - ] + ], + "example": { + "type": "entityType", + "entityType": {} + } }, "EntityTypeLoadResult": { "type": "object", @@ -124955,7 +128918,13 @@ } } } - ] + ], + "example": { + "versionId": null, + "type": "ENTITY_TYPE", + "entityTypes": null, + "rollbackOnError": null + } }, "EntityVersion": { "type": "object", @@ -125056,7 +129025,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ENTITY_VIEW" + } }, "EntityViewId": { "type": "object", @@ -125067,7 +129054,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ENTITY_VIEW", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "EntityViewInfo": { "type": "object", @@ -125216,7 +129207,26 @@ } } } - ] + ], + "example": { + "type": "entityViewSearchQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "relationType": null, + "direction": {}, + "maxLevel": null, + "fetchLastLevelOnly": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityViewTypes": null + } }, "EntityViewTypeFilter": { "allOf": [ @@ -125242,7 +129252,13 @@ } } } - ] + ], + "example": { + "type": "entityViewType", + "entityViewTypes": null, + "entityViewNameFilter": null, + "entityViewType": null + } }, "ErrorComponent": { "allOf": [ @@ -125392,7 +129408,13 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "ERROR", + "errorMessage": null, + "exception": null + } }, "ErrorEventFilter": { "allOf": [ @@ -125419,7 +129441,14 @@ } } } - ] + ], + "example": { + "eventType": "ERROR", + "notEmpty": null, + "server": "ip-172-31-24-152", + "method": "onClusterEventMsg", + "errorStr": "not present in the DB" + } }, "EscalatedNotificationRuleRecipientsConfig": { "allOf": [ @@ -125444,6 +129473,10 @@ } ], "description": "Escalated notification rule recipients configuration", + "example": { + "triggerType": "ALARM", + "escalationTable": null + }, "required": [ "escalationTable" ] @@ -125465,6 +129498,15 @@ "RAW_DATA": "#/components/schemas/RawDataEventFilter" } }, + "example": { + "eventType": "STATS", + "notEmpty": null, + "server": "ip-172-31-24-152", + "minMessagesProcessed": 25, + "maxMessagesProcessed": 250, + "minErrorsOccurred": 30, + "maxErrorsOccurred": 300 + }, "properties": { "eventType": { "$ref": "#/components/schemas/EventType", @@ -125578,7 +129620,11 @@ } } } - ] + ], + "example": { + "status": "FAILURE", + "errorDetails": null + } }, "Favicon": { "type": "object", @@ -125745,6 +129791,23 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "GEOFENCING", + "entityCoordinates": { + "latitudeKeyName": null, + "longitudeKeyName": null + }, + "zoneGroups": null, + "scheduledUpdateEnabled": null, + "scheduledUpdateInterval": null + }, "required": [ "entityCoordinates", "output", @@ -125810,6 +129873,21 @@ } } ], + "example": { + "provider": "GITHUB_MODELS", + "providerConfig": { + "personalAccessToken": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -125881,6 +129959,22 @@ } } ], + "example": { + "provider": "GOOGLE_AI_GEMINI", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -125952,6 +130046,25 @@ } } ], + "example": { + "provider": "GOOGLE_VERTEX_AI_GEMINI", + "providerConfig": { + "fileName": null, + "projectId": null, + "location": null, + "serviceAccountKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -126043,7 +130156,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "GROUP_PERMISSION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "GroupPermissionInfo": { "type": "object", @@ -126233,7 +130350,39 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "HEADING", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "value": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + } }, "History": { "type": "object", @@ -126411,7 +130560,18 @@ } } } - ] + ], + "example": { + "type": "HOME", + "visible": null, + "id": "home", + "name": "My Custom Menu", + "icon": "My Custom Menu", + "pages": null, + "homeType": {}, + "dashboardId": null, + "hideDashboardToolbar": null + } }, "HomeMenuItemType": { "type": "string", @@ -126439,6 +130599,11 @@ } } ], + "example": { + "type": "HOUR", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -126503,7 +130668,33 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "IMAGE", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "sourceType": {}, + "imageUrl": null + } }, "ImageSourceType": { "type": "string", @@ -126651,7 +130842,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "INTEGRATION" + } }, "IntegrationId": { "type": "object", @@ -126662,7 +130871,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "INTEGRATION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "IntegrationInfo": { "type": "object", @@ -126769,7 +130982,14 @@ } } } - ] + ], + "example": { + "triggerType": "INTEGRATION_LIFECYCLE_EVENT", + "integrationTypes": null, + "integrations": null, + "notifyOn": null, + "onlyOnError": null + } }, "IntegrationLifecycleEventRecipientsConfig": { "allOf": [ @@ -126790,6 +131010,10 @@ } } ], + "example": { + "triggerType": "INTEGRATION_LIFECYCLE_EVENT", + "targets": null + }, "required": [ "targets" ] @@ -126909,6 +131133,20 @@ "REPORT": "#/components/schemas/ReportJobConfiguration" } }, + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "DUMMY", + "taskProcessingTimeMs": null, + "successfulTasksCount": null, + "failedTasksCount": null, + "permanentlyFailedTasksCount": null, + "errors": null, + "retries": null, + "taskProcessingTimeoutMs": null, + "generalError": null, + "submittedTasksBeforeGeneralError": null + }, "properties": { "tasksKey": { "type": "string", @@ -126938,7 +131176,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "JOB", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "JobResult": { "type": "object", @@ -126951,6 +131193,18 @@ "REPORT": "#/components/schemas/ReportJobResult" } }, + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "DUMMY" + }, "properties": { "successfulCount": { "type": "integer", @@ -127033,7 +131287,10 @@ { "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" } - ] + ], + "example": { + "transportPayloadType": "JSON" + } }, "JwtPair": { "type": "object", @@ -127107,6 +131364,21 @@ "COMPLEX": "#/components/schemas/ComplexFilterPredicate" } }, + "example": { + "type": "STRING", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + }, + "ignoreCase": null + }, "properties": { "type": { "type": "string" @@ -127231,7 +131503,66 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "LATEST_CHART", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "height": null, + "latestChartSettings": { + "showTitle": null, + "title": null, + "titleFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "titleColor": null, + "titleAlignment": {}, + "units": null, + "decimals": null, + "autoScale": null, + "sortSeries": null, + "showTotal": null, + "showLegend": null, + "legendPosition": {}, + "legendLabelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendLabelColor": null, + "legendValueFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendValueColor": null, + "legendShowTotal": null + } + } }, "LegendConfig": { "type": "object", @@ -127339,7 +131670,15 @@ } } } - ] + ], + "example": { + "eventType": "LC_EVENT", + "notEmpty": null, + "server": "ip-172-31-24-152", + "event": "STARTED", + "status": "Success", + "errorStr": "not present in the DB" + } }, "LimitedApi": { "type": "string", @@ -127378,7 +131717,8 @@ "EMAILS", "WS_SUBSCRIPTIONS", "CALCULATED_FIELD_DEBUG_EVENTS", - "TRENDZ_PUBLIC_SYNC" + "TRENDZ_PUBLIC_SYNC", + "AI_CHAT_REQUESTS" ] }, "LineSeriesSettings": { @@ -127845,7 +132185,34 @@ } } } - ] + ], + "example": { + "type": "LWM2M", + "observeAttr": { + "keyName": null, + "observe": null, + "attribute": null, + "telemetry": null, + "attributeLwm2m": null, + "initAttrTelAsObsStrategy": null, + "observeStrategy": {} + }, + "bootstrapServerUpdateEnable": null, + "bootstrap": null, + "clientLwM2mSettings": { + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null, + "useObject19ForOtaInfo": null, + "fwUpdateStrategy": null, + "swUpdateStrategy": null, + "clientOnlyObserveAfterConnect": null, + "fwUpdateResource": null, + "swUpdateResource": null, + "defaultObjectIDVer": null + } + } }, "Lwm2mDeviceTransportConfiguration": { "allOf": [ @@ -127872,7 +132239,14 @@ } } } - ] + ], + "example": { + "type": "LWM2M", + "powerMode": {}, + "psmActivityTimer": null, + "edrxCycle": null, + "pagingTransmissionWindow": null + } }, "MapperType": { "type": "string", @@ -127913,6 +132287,17 @@ "CUSTOM": "#/components/schemas/CustomMenuItem" } }, + "example": { + "type": "HOME", + "visible": null, + "id": "home", + "name": "My Custom Menu", + "icon": "My Custom Menu", + "pages": null, + "homeType": {}, + "dashboardId": null, + "hideDashboardToolbar": null + }, "properties": { "type": { "$ref": "#/components/schemas/MenuItemType", @@ -128035,7 +132420,23 @@ } } } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "MICROSOFT_TEAMS", + "subject": null, + "themeColor": null, + "button": { + "enabled": null, + "text": null, + "linkType": {}, + "link": null, + "dashboardId": null, + "dashboardState": null, + "setEntityIdInState": null + } + } }, "MicrosoftTeamsNotificationTargetConfig": { "allOf": [ @@ -128072,6 +132473,18 @@ } } ], + "example": { + "description": null, + "type": "MICROSOFT_TEAMS", + "webhookUrl": null, + "channelName": null, + "useOldApi": null, + "email": null, + "firstName": null, + "id": null, + "lastName": null, + "title": null + }, "required": [ "channelName", "webhookUrl" @@ -128128,6 +132541,21 @@ } } ], + "example": { + "provider": "MISTRAL_AI", + "providerConfig": { + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -128273,7 +132701,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "MOBILE_APP_BUNDLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "MobileAppBundleInfo": { "type": "object", @@ -128372,6 +132804,13 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "MOBILE_APP", + "subject": "New Message Received", + "additionalConfig": {} + }, "required": [ "subject" ] @@ -128385,7 +132824,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "MOBILE_APP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "MobileAppNotificationDeliveryMethodConfig": { "allOf": [ @@ -128406,7 +132849,13 @@ } } } - ] + ], + "example": { + "method": "MOBILE_APP", + "firebaseServiceAccountCredentialsFileName": null, + "firebaseServiceAccountCredentials": null, + "useSystemSettings": null + } }, "MobileAppStatus": { "type": "string", @@ -128461,6 +132910,13 @@ "CUSTOM": "#/components/schemas/CustomMobilePage" } }, + "example": { + "type": "DEFAULT", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "id": "HOME" + }, "properties": { "type": { "$ref": "#/components/schemas/MobilePageType" @@ -128518,6 +132974,50 @@ } } ], + "example": { + "type": "MOBILE", + "enabled": null, + "title": null, + "captcha": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, + "permissions": null, + "notificationRecipient": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "signUpFields": null, + "customerTitlePrefix": null, + "showPrivacyPolicy": null, + "showTermsOfUse": null, + "defaultDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "fullscreen": null + }, + "homeDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "hideToolbar": null + }, + "customerGroupId": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customMenuId": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "privacyPolicy": null, + "redirect": { + "scheme": null, + "host": null + }, + "termsOfUse": null + }, "required": [ "redirect" ] @@ -128564,6 +133064,11 @@ } } ], + "example": { + "type": "MONTH", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -128603,14 +133108,29 @@ } } } - ] + ], + "example": { + "type": "MQTT", + "deviceTelemetryTopic": null, + "deviceAttributesTopic": null, + "deviceAttributesSubscribeTopic": null, + "transportPayloadTypeConfiguration": { + "transportPayloadType": null + }, + "sparkplug": null, + "sparkplugAttributesMetricNames": null, + "sendAckOnValidationException": null + } }, "MqttDeviceTransportConfiguration": { "allOf": [ { "$ref": "#/components/schemas/DeviceTransportConfiguration" } - ] + ], + "example": { + "type": "MQTT" + } }, "NameConflictPolicy": { "type": "string", @@ -128624,7 +133144,10 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ] + ], + "example": { + "triggerType": "NEW_PLATFORM_VERSION" + } }, "NewPlatformVersionRecipientsConfig": { "allOf": [ @@ -128645,6 +133168,10 @@ } } ], + "example": { + "triggerType": "NEW_PLATFORM_VERSION", + "targets": null + }, "required": [ "targets" ] @@ -128666,6 +133193,14 @@ } } ], + "example": { + "type": "NO_DATA", + "unit": {}, + "duration": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "duration", "unit" @@ -128790,7 +133325,10 @@ { "$ref": "#/components/schemas/OllamaAuth" } - ] + ], + "example": { + "type": "NONE" + } }, "Notification": { "type": "object", @@ -128853,6 +133391,10 @@ "MOBILE_APP": "#/components/schemas/MobileAppNotificationDeliveryMethodConfig" } }, + "example": { + "method": "SLACK", + "botToken": null + }, "properties": { "method": { "type": "string" @@ -128871,7 +133413,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationInfo": { "type": "object", @@ -128988,7 +133534,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_REQUEST", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationRequestInfo": { "type": "object", @@ -129181,7 +133731,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_RULE" + } }, "NotificationRuleId": { "type": "object", @@ -129192,7 +133760,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_RULE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationRuleInfo": { "type": "object", @@ -129272,6 +133844,10 @@ "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/IntegrationLifecycleEventRecipientsConfig" } }, + "example": { + "triggerType": "ENTITY_ACTION", + "targets": null + }, "properties": { "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" @@ -129301,6 +133877,15 @@ "INTEGRATION_LIFECYCLE_EVENT": "#/components/schemas/IntegrationLifecycleEventNotificationRuleTriggerConfig" } }, + "example": { + "triggerType": "ALARM", + "alarmTypes": null, + "alarmSeverities": null, + "notifyOn": null, + "clearRule": { + "alarmStatuses": null + } + }, "properties": { "triggerType": { "$ref": "#/components/schemas/NotificationRuleTriggerType" @@ -129390,6 +133975,13 @@ "MICROSOFT_TEAMS": "#/components/schemas/MicrosoftTeamsNotificationTargetConfig" } }, + "example": { + "description": null, + "type": "PLATFORM_USERS", + "usersFilter": { + "type": null + } + }, "properties": { "description": { "type": "string" @@ -129407,7 +133999,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_TARGET" + } }, "NotificationTargetId": { "type": "object", @@ -129418,7 +134028,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationTemplate": { "type": "object", @@ -129485,7 +134099,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "NOTIFICATION_TEMPLATE" + } }, "NotificationTemplateId": { "type": "object", @@ -129496,7 +134128,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "NOTIFICATION_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "NotificationType": { "type": "string", @@ -129542,7 +134178,21 @@ } } } - ] + ], + "example": { + "type": "NUMERIC", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + } + } }, "NumericOperation": { "type": "string", @@ -129736,7 +134386,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "OAUTH2_CLIENT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "OAuth2ClientInfo": { "type": "object", @@ -130044,6 +134698,9 @@ "TOKEN": "#/components/schemas/Token" } }, + "example": { + "type": "NONE" + }, "properties": { "type": { "type": "string" @@ -130104,6 +134761,24 @@ } } ], + "example": { + "provider": "OLLAMA", + "providerConfig": { + "baseUrl": null, + "auth": { + "type": null + } + }, + "modelId": null, + "temperature": null, + "topP": null, + "topK": null, + "contextLength": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -130175,6 +134850,22 @@ } } ], + "example": { + "provider": "OPENAI", + "providerConfig": { + "baseUrl": null, + "apiKey": null + }, + "modelId": null, + "temperature": null, + "topP": null, + "frequencyPenalty": null, + "presencePenalty": null, + "maxOutputTokens": null, + "timeoutSeconds": null, + "maxRetries": null, + "modelType": {} + }, "required": [ "modelId", "providerConfig" @@ -130222,7 +134913,10 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "ORIGINATOR_ENTITY_OWNER_USERS" + } }, "OtaPackage": { "type": "object", @@ -130330,7 +135024,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "OTA_PACKAGE" + } }, "OtaPackageId": { "type": "object", @@ -130341,7 +135053,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "OTA_PACKAGE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "OtaPackageInfo": { "type": "object", @@ -130500,6 +135216,15 @@ "ATTRIBUTES": "#/components/schemas/AttributesOutput" } }, + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": null + }, + "type": "TIME_SERIES" + }, "properties": { "decimalsByDefault": { "type": "integer", @@ -130618,7 +135343,11 @@ { "$ref": "#/components/schemas/ReportComponent" } - ] + ], + "example": { + "subType": {}, + "type": "PAGE_BREAK" + } }, "PageDataAiModel": { "type": "object", @@ -132868,7 +137597,34 @@ } } } - ] + ], + "example": { + "namePattern": null, + "timeDataPattern": null, + "format": "PDF", + "entityAliases": null, + "filters": null, + "components": null, + "footer": { + "enabled": null, + "components": null, + "firstPage": null + }, + "header": { + "enabled": null, + "components": null, + "firstPage": null + }, + "pageBackground": null, + "pageMargins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "pageOrientation": {}, + "pageSize": {} + } }, "PieChartLabelPosition": { "type": "string", @@ -132944,6 +137700,13 @@ } } ], + "example": { + "description": null, + "type": "PLATFORM_USERS", + "usersFilter": { + "type": null + } + }, "required": [ "usersFilter" ] @@ -133047,6 +137810,23 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "PROPAGATION", + "arguments": null, + "expression": null, + "relation": { + "direction": {}, + "relationType": null + }, + "applyExpressionToResolvedArguments": null + }, "required": [ "arguments", "relation" @@ -133080,7 +137860,16 @@ } } } - ] + ], + "example": { + "transportPayloadType": "PROTOBUF", + "deviceTelemetryProtoSchema": null, + "deviceAttributesProtoSchema": null, + "deviceRpcRequestProtoSchema": null, + "deviceRpcResponseProtoSchema": null, + "enableCompatibilityWithJsonPayloadFormat": null, + "useJsonPayloadFormatForDefaultDownlinkTopics": null + } }, "QRCodeConfig": { "type": "object", @@ -133195,6 +137984,11 @@ } } ], + "example": { + "type": "QUARTER", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -133257,7 +138051,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "QUEUE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "QueueStats": { "type": "object", @@ -133292,7 +138090,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "QUEUE_STATS", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "QuickTimeInterval": { "type": "string", @@ -133430,7 +138232,11 @@ } } } - ] + ], + "example": { + "triggerType": "RATE_LIMITS", + "apis": null + } }, "RateLimitsRecipientsConfig": { "allOf": [ @@ -133451,6 +138257,10 @@ } } ], + "example": { + "triggerType": "RATE_LIMITS", + "targets": null + }, "required": [ "targets" ] @@ -133483,7 +138293,15 @@ } } } - ] + ], + "example": { + "eventType": "RAW_DATA", + "notEmpty": null, + "server": "ip-172-31-24-152", + "uuid": "STARTED", + "messageType": null, + "message": null + } }, "ReadTsKvQueryResult": { "type": "object", @@ -133560,6 +138378,26 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "RELATED_ENTITIES_AGGREGATION", + "relation": { + "direction": {}, + "relationType": null + }, + "arguments": null, + "deduplicationIntervalInSec": null, + "metrics": null, + "useLatestTs": null, + "scheduledUpdateInterval": null, + "scheduledUpdateEnabled": null + }, "required": [ "arguments", "metrics", @@ -133620,7 +138458,11 @@ } } } - ] + ], + "example": { + "type": "RELATION_PATH_QUERY", + "levels": null + } }, "RelationTypeGroup": { "type": "string", @@ -133685,7 +138527,29 @@ } } } - ] + ], + "example": { + "type": "relationsQuery", + "rootEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "multiRoot": null, + "multiRootEntitiesType": {}, + "multiRootEntityIds": null, + "direction": {}, + "filters": null, + "maxLevel": null, + "fetchLastLevelOnly": null, + "negate": null, + "rootStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "RelationsSearchParameters": { "type": "object", @@ -133733,6 +138597,22 @@ } } ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "REPEATING", + "count": { + "staticValue": null, + "dynamicValueArgument": null + } + }, "required": [ "count" ] @@ -133884,6 +138764,38 @@ "SPLIT_VIEW": "#/components/schemas/SplitViewComponent" } }, + "example": { + "subType": {}, + "type": "HEADING", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "value": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, "properties": { "subType": { "$ref": "#/components/schemas/ReportComponentSubType" @@ -133965,7 +138877,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "REPORT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ReportInfo": { "type": "object", @@ -134072,7 +138988,72 @@ } } } - ] + ], + "example": { + "tasksKey": null, + "toReprocess": null, + "type": "REPORT", + "reportTemplateId": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "userId": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "timezone": null, + "targets": null, + "notificationTemplateId": { + "entityType": "NOTIFICATION_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "notificationRequests": null, + "originator": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "ruleNode": { + "id": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "createdTime": 1609459200000, + "additionalInfo": { + "layoutX": 320, + "layoutY": 160, + "description": "Filter temperature data" + }, + "ruleChainId": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "type": "com.mycompany.iot.rule.engine.ProcessingNode", + "name": "Process sensor reading", + "debugSettings": { + "failuresEnabled": false, + "allEnabled": false, + "allEnabledUntil": null + }, + "singletonMode": false, + "queueName": "Main", + "configurationVersion": 0, + "configuration": {}, + "externalId": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "debugMode": null + }, + "outputTbMsgProto": null, + "queueName": null, + "schedulerEventInfo": { + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null + } + } }, "ReportJobResult": { "allOf": [ @@ -134087,7 +139068,48 @@ } } } - ] + ], + "example": { + "successfulCount": null, + "failedCount": null, + "discardedCount": null, + "totalCount": null, + "results": null, + "generalError": null, + "startTs": null, + "finishTs": null, + "cancellationTs": null, + "jobType": "REPORT", + "report": { + "id": { + "entityType": "REPORT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "createdTime": 1746028547220, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customerId": { + "entityType": "CUSTOMER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "templateId": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "format": {}, + "name": null, + "userId": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "ownerId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } + } }, "ReportLatestChartSettings": { "type": "object", @@ -134358,6 +139380,33 @@ "CSV": "#/components/schemas/CsvReportTemplateConfig" } }, + "example": { + "namePattern": null, + "timeDataPattern": null, + "format": "PDF", + "entityAliases": null, + "filters": null, + "components": null, + "footer": { + "enabled": null, + "components": null, + "firstPage": null + }, + "header": { + "enabled": null, + "components": null, + "firstPage": null + }, + "pageBackground": null, + "pageMargins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "pageOrientation": {}, + "pageSize": {} + }, "properties": { "namePattern": { "type": "string" @@ -134397,7 +139446,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "REPORT_TEMPLATE" + } }, "ReportTemplateId": { "type": "object", @@ -134408,7 +139475,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "ReportTemplateInfo": { "type": "object", @@ -134723,6 +139794,7 @@ "REPORT_TEMPLATE", "REPORT", "AI_MODEL", + "AI", "API_KEY" ] }, @@ -134784,6 +139856,10 @@ } } ], + "example": { + "triggerType": "RESOURCES_SHORTAGE", + "targets": null + }, "required": [ "targets" ] @@ -134834,7 +139910,13 @@ } } } - ] + ], + "example": { + "triggerType": "RESOURCES_SHORTAGE", + "cpuThreshold": null, + "ramThreshold": null, + "storageThreshold": null + } }, "RichTextComponent": { "allOf": [ @@ -134875,7 +139957,29 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "RICH_TEXT", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "value": null + } }, "Role": { "type": "object", @@ -134948,7 +140052,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "ROLE" + } }, "RoleId": { "type": "object", @@ -134959,7 +140081,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "ROLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RoleType": { "type": "string", @@ -135029,7 +140155,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RPC", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RpcStatus": { "type": "string", @@ -135187,7 +140317,15 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_RULE_CHAIN", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "message": null + } }, "RuleChainExportData": { "allOf": [ @@ -135202,7 +140340,36 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "metaData": { + "ruleChainId": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "version": null, + "firstNodeIndex": null, + "nodes": null, + "connections": null, + "ruleChainConnections": null + }, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "RULE_CHAIN" + } }, "RuleChainId": { "type": "object", @@ -135213,7 +140380,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RULE_CHAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "RuleChainImportResult": { "type": "object", @@ -135370,7 +140541,16 @@ } } } - ] + ], + "example": { + "triggerType": "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "ruleChains": null, + "ruleChainEvents": null, + "onlyRuleChainLifecycleFailures": null, + "trackRuleNodeEvents": null, + "ruleNodeEvents": null, + "onlyRuleNodeLifecycleFailures": null + } }, "RuleEngineComponentLifecycleEventRecipientsConfig": { "allOf": [ @@ -135391,6 +140571,10 @@ } } ], + "example": { + "triggerType": "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "targets": null + }, "required": [ "targets" ] @@ -135540,7 +140724,22 @@ } } } - ] + ], + "example": { + "eventType": "DEBUG_RULE_NODE", + "notEmpty": null, + "server": "ip-172-31-24-152", + "isError": "false", + "errorStr": "not present in the DB", + "msgDirectionType": "IN", + "entityId": "de9d54a0-2b7a-11ec-a3cc-23386423d98f", + "entityType": "DEVICE", + "msgId": "de9d54a0-2b7a-11ec-a3cc-23386423d98f", + "msgType": "POST_TELEMETRY_REQUEST", + "relationType": "Success", + "dataSearch": "humidity", + "metadataSearch": "deviceName" + } }, "RuleNodeId": { "type": "object", @@ -135551,7 +140750,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "RULE_NODE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SaveDeviceWithCredentialsRequest": { "type": "object", @@ -135825,7 +141028,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "SCHEDULER_EVENT" + } }, "SchedulerEventFilter": { "allOf": [ @@ -135849,7 +141070,22 @@ } } } - ] + ], + "example": { + "type": "schedulerEvent", + "originator": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "eventType": null, + "originatorStateEntity": null, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "SchedulerEventId": { "type": "object", @@ -135860,7 +141096,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SCHEDULER_EVENT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SchedulerEventInfo": { "type": "object", @@ -136026,6 +141266,18 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SCRIPT", + "arguments": null, + "expression": null + }, "required": [ "arguments" ] @@ -136094,7 +141346,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "SECRET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "SecretInfo": { "type": "object", @@ -136195,6 +141451,50 @@ "MOBILE": "#/components/schemas/MobileSelfRegistrationParams" } }, + "example": { + "type": "WEB", + "enabled": null, + "title": null, + "captcha": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, + "permissions": null, + "notificationRecipient": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "signUpFields": null, + "customerTitlePrefix": null, + "showPrivacyPolicy": null, + "showTermsOfUse": null, + "defaultDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "fullscreen": null + }, + "homeDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "hideToolbar": null + }, + "customerGroupId": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customMenuId": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "domainId": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "privacyPolicy": null, + "termsOfUse": null + }, "properties": { "type": { "$ref": "#/components/schemas/SelfRegistrationType" @@ -136256,6 +141556,7 @@ "MOBILE" ] }, + "ServerSentEventString": {}, "ShareGroupRequest": { "type": "object", "description": "The Share Group Request JSON", @@ -136304,7 +141605,11 @@ } } } - ] + ], + "example": { + "spec": "SHARED_ATTRIBUTES_SETTING", + "mappings": null + } }, "ShortCustomerInfo": { "type": "object", @@ -136444,7 +141749,19 @@ { "$ref": "#/components/schemas/AlarmCondition" } - ] + ], + "example": { + "expression": { + "type": null + }, + "schedule": { + "staticValue": { + "type": null + }, + "dynamicValueArgument": null + }, + "type": "SIMPLE" + } }, "SimpleAlarmConditionExpression": { "allOf": [ @@ -136467,6 +141784,11 @@ } } ], + "example": { + "type": "SIMPLE", + "filters": null, + "operation": {} + }, "required": [ "filters" ] @@ -136495,6 +141817,19 @@ } } ], + "example": { + "output": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": {}, + "type": null + }, + "type": "SIMPLE", + "arguments": null, + "expression": null, + "useLatestTs": null + }, "required": [ "arguments" ] @@ -136524,7 +141859,15 @@ } } } - ] + ], + "example": { + "type": "singleEntity", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "SingleEntityVersionCreateRequest": { "allOf": [ @@ -136542,7 +141885,24 @@ } } } - ] + ], + "example": { + "versionName": null, + "branch": null, + "type": "SINGLE_ENTITY", + "entityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "saveRelations": null, + "saveAttributes": null, + "saveCredentials": null, + "saveCalculatedFields": null, + "savePermissions": null, + "saveGroupEntities": null + } + } }, "SingleEntityVersionLoadRequest": { "allOf": [ @@ -136563,7 +141923,28 @@ } } } - ] + ], + "example": { + "versionId": null, + "type": "SINGLE_ENTITY", + "internalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "externalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "loadRelations": null, + "loadAttributes": null, + "loadCredentials": null, + "loadCalculatedFields": null, + "loadPermissions": null, + "loadGroupEntities": null, + "autoGenerateIntegrationKey": null + } + } }, "SlackConversation": { "type": "object", @@ -136608,7 +141989,12 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "SLACK" + } }, "SlackNotificationDeliveryMethodConfig": { "allOf": [ @@ -136625,6 +142011,10 @@ } } ], + "example": { + "method": "SLACK", + "botToken": null + }, "required": [ "botToken" ] @@ -136646,6 +142036,19 @@ } } ], + "example": { + "description": null, + "type": "SLACK", + "conversationType": {}, + "conversation": { + "type": {}, + "id": null, + "name": null, + "wholeName": null, + "email": null, + "title": null + } + }, "required": [ "conversation" ] @@ -136740,6 +142143,24 @@ } } ], + "example": { + "type": "SMPP", + "protocolVersion": "3.3, 3.4", + "host": null, + "port": null, + "systemId": null, + "password": null, + "systemType": null, + "bindType": {}, + "serviceType": null, + "sourceAddress": null, + "sourceTon": null, + "sourceNpi": null, + "destinationTon": null, + "destinationNpi": null, + "addressRange": null, + "codingScheme": null + }, "required": [ "host", "password", @@ -136753,7 +142174,12 @@ { "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" } - ] + ], + "example": { + "enabled": null, + "body": null, + "method": "SMS" + } }, "SmsProviderConfiguration": { "description": "Base configuration for SMS providers", @@ -136765,6 +142191,12 @@ "SMPP": "#/components/schemas/SmppSmsProviderConfiguration" } }, + "example": { + "type": "AWS_SNS", + "accessKeyId": null, + "secretAccessKey": null, + "region": null + }, "properties": { "type": { "type": "string" @@ -136790,6 +142222,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "SMS", + "phoneNumber": null + }, "required": [ "phoneNumber" ] @@ -136815,6 +142252,11 @@ } } ], + "example": { + "providerType": "SMS", + "verificationCodeLifetime": null, + "smsVerificationMessageTemplate": null + }, "required": [ "smsVerificationMessageTemplate" ] @@ -136832,6 +142274,11 @@ "TO_SERVER_RPC_REQUEST": "#/components/schemas/ToServerRpcRequestSnmpCommunicationConfig" } }, + "example": { + "spec": "TELEMETRY_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + }, "properties": { "spec": { "$ref": "#/components/schemas/SnmpCommunicationSpec", @@ -136876,7 +142323,13 @@ } } } - ] + ], + "example": { + "type": "SNMP", + "timeoutMs": null, + "retries": null, + "communicationConfigs": null + } }, "SnmpDeviceTransportConfiguration": { "allOf": [ @@ -136925,7 +142378,22 @@ } } } - ] + ], + "example": { + "type": "SNMP", + "host": null, + "port": null, + "protocolVersion": {}, + "community": null, + "username": null, + "securityName": null, + "contextName": null, + "authenticationProtocol": {}, + "authenticationPassphrase": null, + "privacyProtocol": {}, + "privacyPassphrase": null, + "engineId": null + } }, "SnmpMapping": { "type": "object", @@ -137066,6 +142534,13 @@ } } }, + "SolutionStep": { + "type": "string", + "enum": [ + "INITIAL_CONFIGURATION", + "DASHBOARDS_CONFIGURATION" + ] + }, "SolutionTemplateLevel": { "type": "string", "enum": [ @@ -137146,7 +142621,14 @@ } } } - ] + ], + "example": { + "type": "SPECIFIC_TIME", + "timezone": null, + "daysOfWeek": null, + "startsOn": null, + "endsOn": null + } }, "SplitViewComponent": { "allOf": [ @@ -137198,7 +142680,33 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "SPLIT_VIEW", + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "leftView": {}, + "rightView": {}, + "splitPosition": null, + "splitGap": null, + "leftVerticalAlignment": {}, + "rightVerticalAlignment": {} + } }, "StarredDashboardInfo": { "type": "object", @@ -137233,7 +142741,15 @@ } } } - ] + ], + "example": { + "type": "stateEntity", + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "StateEntityOwnerFilter": { "allOf": [ @@ -137251,7 +142767,20 @@ } } } - ] + ], + "example": { + "type": "stateEntityOwner", + "singleEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "defaultStateEntity": { + "aliasEntityType": {}, + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + } }, "StatisticsEventFilter": { "allOf": [ @@ -137292,7 +142821,16 @@ } } } - ] + ], + "example": { + "eventType": "STATS", + "notEmpty": null, + "server": "ip-172-31-24-152", + "minMessagesProcessed": 25, + "maxMessagesProcessed": 250, + "minErrorsOccurred": 30, + "maxErrorsOccurred": 300 + } }, "StoreInfo": { "type": "object", @@ -137328,7 +142866,22 @@ } } } - ] + ], + "example": { + "type": "STRING", + "operation": {}, + "value": { + "defaultValue": null, + "userValue": null, + "dynamicValue": { + "resolvedValue": null, + "sourceType": {}, + "sourceAttribute": null, + "inherit": null + } + }, + "ignoreCase": null + } }, "StringOperation": { "type": "string", @@ -137365,7 +142918,17 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "SUB_REPORT", + "dataSources": null, + "templateId": { + "entityType": "REPORT_TEMPLATE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "avoidPageBreakInside": null + } }, "SubmitStrategy": { "type": "object", @@ -137403,7 +142966,11 @@ } } } - ] + ], + "example": { + "status": "SUCCESS", + "generatedContent": null + } }, "SyncStrategy": { "type": "string", @@ -137417,7 +142984,10 @@ { "$ref": "#/components/schemas/UsersFilter" } - ] + ], + "example": { + "type": "SYSTEM_ADMINISTRATORS" + } }, "SystemInfo": { "type": "object", @@ -137502,7 +143072,10 @@ { "$ref": "#/components/schemas/NotificationRuleTriggerConfig" } - ] + ], + "example": { + "triggerType": "TASK_PROCESSING_FAILURE" + } }, "TaskProcessingFailureRecipientsConfig": { "allOf": [ @@ -137523,6 +143096,10 @@ } } ], + "example": { + "triggerType": "TASK_PROCESSING_FAILURE", + "targets": null + }, "required": [ "targets" ] @@ -137589,6 +143166,10 @@ "FAILURE": "#/components/schemas/Failure" } }, + "example": { + "status": "SUCCESS", + "generatedContent": null + }, "properties": { "status": { "type": "string", @@ -137607,6 +143188,10 @@ "TEXT": "#/components/schemas/TbTextContent" } }, + "example": { + "contentType": "TEXT", + "text": "What is the weather like in Kyiv today?" + }, "properties": { "contentType": { "type": "string" @@ -137757,7 +143342,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "TB_RESOURCE" + } }, "TbResourceId": { "type": "object", @@ -137768,7 +143371,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TB_RESOURCE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TbResourceInfo": { "type": "object", @@ -137887,6 +143494,10 @@ } ], "description": "Text-based content part of a user's prompt", + "example": { + "contentType": "TEXT", + "text": "What is the weather like in Kyiv today?" + }, "required": [ "text" ] @@ -137921,6 +143532,10 @@ } } ], + "example": { + "type": "TBEL", + "expression": null + }, "required": [ "expression" ] @@ -138027,7 +143642,12 @@ } } } - ] + ], + "example": { + "spec": "TELEMETRY_QUERYING", + "mappings": null, + "queryingFrequencyMs": null + } }, "Tenant": { "type": "object", @@ -138147,7 +143767,12 @@ } } } - ] + ], + "example": { + "type": "TENANT_ADMINISTRATORS", + "tenantsIds": null, + "tenantProfilesIds": null + } }, "TenantId": { "type": "object", @@ -138158,7 +143783,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TenantInfo": { "type": "object", @@ -138311,6 +143940,98 @@ "DEFAULT": "#/components/schemas/DefaultTenantProfileConfiguration" } }, + "example": { + "type": "DEFAULT", + "maxDevices": null, + "maxAssets": null, + "maxCustomers": null, + "maxUsers": null, + "maxDashboards": null, + "maxRuleChains": null, + "maxEdges": null, + "maxResourcesInBytes": null, + "maxOtaPackagesInBytes": null, + "maxResourceSize": null, + "maxReportSizeInBytes": null, + "maxIntegrations": null, + "maxConverters": null, + "maxSchedulerEvents": null, + "transportTenantMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryMsgRateLimit": "1000:1,20000:60", + "transportTenantTelemetryDataPointsRateLimit": "1000:1,20000:60", + "transportDeviceMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayTelemetryDataPointsRateLimit": "20:1,600:60", + "transportGatewayDeviceMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryMsgRateLimit": "20:1,600:60", + "transportGatewayDeviceTelemetryDataPointsRateLimit": "20:1,600:60", + "integrationMsgsPerTenantRateLimit": "20:1,600:60", + "integrationMsgsPerDeviceRateLimit": "20:1,600:60", + "integrationMsgsPerAssetRateLimit": null, + "tenantEntityExportRateLimit": "20:1,600:60", + "tenantEntityImportRateLimit": "20:1,600:60", + "tenantNotificationRequestsRateLimit": "20:1,600:60", + "tenantNotificationRequestsPerRuleRateLimit": "20:1,600:60", + "maxTransportMessages": 10000000, + "maxTransportDataPoints": 10000000, + "maxREExecutions": 4000000, + "maxJSExecutions": 5000000, + "maxTbelExecutions": 5000000, + "maxDPStorageDays": 0, + "maxRuleNodeExecutionsPerMessage": 50, + "maxDebugModeDurationMinutes": 15, + "maxEmails": 0, + "smsEnabled": true, + "maxSms": 0, + "maxCreatedAlarms": 1000, + "maxGeneratedReports": 10000, + "maxAiCredits": 10000, + "tenantServerRestLimitsConfiguration": null, + "customerServerRestLimitsConfiguration": null, + "maxWsSessionsPerTenant": null, + "maxWsSessionsPerCustomer": null, + "maxWsSessionsPerRegularUser": null, + "maxWsSessionsPerPublicUser": null, + "wsMsgQueueLimitPerSession": null, + "maxWsSubscriptionsPerTenant": null, + "maxWsSubscriptionsPerCustomer": null, + "maxWsSubscriptionsPerRegularUser": null, + "maxWsSubscriptionsPerPublicUser": null, + "wsUpdatesPerSessionRateLimit": null, + "cassandraReadQueryTenantCoreRateLimits": null, + "cassandraWriteQueryTenantCoreRateLimits": null, + "cassandraReadQueryTenantRuleEngineRateLimits": null, + "cassandraWriteQueryTenantRuleEngineRateLimits": null, + "edgeEventRateLimits": null, + "edgeEventRateLimitsPerEdge": null, + "edgeUplinkMessagesRateLimits": null, + "edgeUplinkMessagesRateLimitsPerEdge": null, + "defaultStorageTtlDays": null, + "alarmsTtlDays": null, + "rpcTtlDays": null, + "queueStatsTtlDays": null, + "ruleEngineExceptionsTtlDays": null, + "blobEntityTtlDays": null, + "reportTtlDays": null, + "warnThreshold": null, + "maxCalculatedFieldsPerEntity": 100, + "maxArgumentsPerCF": 10, + "minAllowedScheduledUpdateIntervalInSecForCF": 10, + "maxRelationLevelPerCfArgument": 2, + "maxRelatedEntitiesToReturnPerCfArgument": 1000, + "maxDataPointsPerRollingArg": 1000, + "maxStateSizeInKBytes": 512, + "maxSingleValueArgumentSizeInKBytes": 32, + "minAllowedDeduplicationIntervalInSecForCF": 10, + "minAllowedAggregationIntervalInSecForCF": 60, + "intermediateAggregationIntervalInSecForCF": 300, + "cfReevaluationCheckInterval": 60, + "alarmsReevaluationInterval": 60, + "aiChatRequestsPerTenantRateLimit": null + }, "properties": { "type": { "type": "string" @@ -138345,7 +144066,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "TENANT_PROFILE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "TenantProfileQueueConfiguration": { "type": "object", @@ -138719,7 +144444,68 @@ } } } - ] + ], + "example": { + "type": "TIME_SERIES_CHART", + "yAxisId": null, + "showInLegend": null, + "seriesType": {}, + "lineSettings": { + "showLine": null, + "step": null, + "stepType": {}, + "smooth": null, + "lineType": {}, + "lineWidth": null, + "showPoints": null, + "showPointLabel": null, + "pointLabelPosition": {}, + "pointLabelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "pointLabelColor": null, + "enablePointLabelBackground": null, + "pointLabelBackground": null, + "pointShape": {}, + "pointSize": null, + "fillAreaSettings": { + "type": {}, + "opacity": null, + "gradient": {} + } + }, + "barSettings": { + "showBorder": null, + "borderWidth": null, + "borderRadius": null, + "barWidth": null, + "showLabel": null, + "labelPosition": {}, + "labelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "labelColor": null, + "enableLabelBackground": null, + "labelBackground": null, + "backgroundSettings": { + "type": {}, + "opacity": null, + "gradient": {} + } + }, + "comparisonSettings": { + "showValuesForComparison": null, + "comparisonValuesLabel": null, + "color": null + }, + "yaxisId": null + } }, "TimeSeriesChartNoAggregationBarWidthSettings": { "type": "object", @@ -139020,7 +144806,15 @@ } } } - ] + ], + "example": { + "type": "IMMEDIATE", + "ttl": null, + "saveTimeSeries": null, + "saveLatest": null, + "sendWsUpdate": null, + "processCfs": null + } }, "TimeSeriesOutput": { "allOf": [ @@ -139035,7 +144829,16 @@ } } } - ] + ], + "example": { + "decimalsByDefault": null, + "name": null, + "scope": {}, + "strategy": { + "type": null + }, + "type": "TIME_SERIES" + } }, "TimeSeriesOutputStrategy": { "discriminator": { @@ -139045,6 +144848,14 @@ "RULE_CHAIN": "#/components/schemas/TimeSeriesRuleChainOutputStrategy" } }, + "example": { + "type": "IMMEDIATE", + "ttl": null, + "saveTimeSeries": null, + "saveLatest": null, + "sendWsUpdate": null, + "processCfs": null + }, "properties": { "type": { "type": "string" @@ -139059,7 +144870,10 @@ { "$ref": "#/components/schemas/TimeSeriesOutputStrategy" } - ] + ], + "example": { + "type": "RULE_CHAIN" + } }, "TimeUnit": { "type": "string", @@ -139143,7 +144957,163 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "TIME_SERIES_CHART", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "widthType": {}, + "customWidth": null, + "alignment": {}, + "height": null, + "timewindow": { + "history": { + "historyType": null, + "interval": {}, + "timewindowMs": null, + "fixedTimewindow": {}, + "quickInterval": {} + }, + "aggregation": { + "type": {}, + "limit": null + }, + "timezone": null + }, + "timeSeriesChartSettings": { + "showTitle": null, + "title": null, + "titleFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "titleColor": null, + "titleAlignment": {}, + "thresholds": null, + "stack": null, + "grid": { + "show": null, + "backgroundColor": null, + "borderWidth": null, + "borderColor": null + }, + "yAxes": null, + "xAxis": { + "show": null, + "label": null, + "labelFont": {}, + "labelColor": null, + "position": {}, + "showTickLabels": null, + "tickLabelFont": {}, + "tickLabelColor": null, + "showTicks": null, + "ticksColor": null, + "showLine": null, + "lineColor": null, + "showSplitLines": null, + "splitLinesColor": null, + "ticksFormat": null + }, + "barWidthSettings": { + "barGap": null, + "intervalGap": null + }, + "noAggregationBarWidthSettings": { + "strategy": {}, + "groupWidth": {}, + "barWidth": {} + }, + "states": null, + "comparisonEnabled": null, + "timeForComparison": {}, + "comparisonCustomIntervalValue": null, + "comparisonXAxis": { + "show": null, + "label": null, + "labelFont": {}, + "labelColor": null, + "position": {}, + "showTickLabels": null, + "tickLabelFont": {}, + "tickLabelColor": null, + "showTicks": null, + "ticksColor": null, + "showLine": null, + "lineColor": null, + "showSplitLines": null, + "splitLinesColor": null, + "ticksFormat": null + }, + "showLegend": null, + "legendColumnTitleFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendColumnTitleColor": null, + "legendLabelFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendLabelColor": null, + "legendValueFont": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "legendValueColor": null, + "legendConfig": { + "position": {}, + "sortDataKeys": null, + "showMin": null, + "showMax": null, + "showAvg": null, + "showTotal": null, + "showLatest": null + }, + "xaxis": { + "show": null, + "label": null, + "labelFont": {}, + "labelColor": null, + "position": {}, + "showTickLabels": null, + "tickLabelFont": {}, + "tickLabelColor": null, + "showTicks": null, + "ticksColor": null, + "showLine": null, + "lineColor": null, + "showSplitLines": null, + "splitLinesColor": null, + "ticksFormat": null + }, + "yaxes": null + } + } }, "TimeseriesTableComponent": { "allOf": [ @@ -139205,7 +145175,91 @@ } } } - ] + ], + "example": { + "subType": {}, + "type": "TIME_SERIES_TABLE", + "dataSources": null, + "margins": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "paddings": { + "left": null, + "right": null, + "top": null, + "bottom": null + }, + "background": null, + "borderWidth": null, + "borderRadius": null, + "borderColor": null, + "showTableHeading": null, + "tableHeading": { + "text": null, + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "textAlignment": {}, + "verticalAlignment": {}, + "height": null + }, + "tableSortOrder": { + "column": null, + "direction": {} + }, + "timewindow": { + "history": { + "historyType": null, + "interval": {}, + "timewindowMs": null, + "fixedTimewindow": {}, + "quickInterval": {} + }, + "aggregation": { + "type": {}, + "limit": null + }, + "timezone": null + }, + "showTimestamp": null, + "timestampLabel": null, + "timestampPattern": null, + "timestampColumnSettings": { + "columnWidth": null, + "header": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "cell": { + "font": { + "size": null, + "weight": {}, + "style": {}, + "family": null + }, + "color": null, + "backgroundColor": null, + "textAlignment": {}, + "verticalAlignment": {} + }, + "type": "COLUMN" + } + } }, "ToCoreEdqsRequest": { "type": "object", @@ -139234,7 +145288,11 @@ } } } - ] + ], + "example": { + "spec": "TO_DEVICE_RPC_REQUEST", + "mappings": null + } }, "ToServerRpcRequestSnmpCommunicationConfig": { "allOf": [ @@ -139252,7 +145310,11 @@ } } } - ] + ], + "example": { + "spec": "TO_SERVER_RPC_REQUEST", + "mappings": null + } }, "Token": { "allOf": [ @@ -139268,6 +145330,10 @@ } } ], + "example": { + "type": "TOKEN", + "token": null + }, "required": [ "token" ] @@ -139288,6 +145354,11 @@ } } ], + "example": { + "useByDefault": null, + "providerType": "TOTP", + "authUrl": null + }, "required": [ "authUrl" ] @@ -139307,6 +145378,10 @@ } } ], + "example": { + "providerType": "TOTP", + "issuerName": null + }, "required": [ "issuerName" ] @@ -139346,6 +145421,9 @@ "PROTOBUF": "#/components/schemas/ProtoTransportPayloadConfiguration" } }, + "example": { + "transportPayloadType": "JSON" + }, "properties": { "transportPayloadType": { "type": "string" @@ -139602,7 +145680,13 @@ } } } - ] + ], + "example": { + "type": "TWILIO", + "accountSid": null, + "accountToken": null, + "numberFrom": null + } }, "TwoFaAccountConfig": { "type": "object", @@ -139616,6 +145700,11 @@ "BACKUP_CODE": "#/components/schemas/BackupCodeTwoFaAccountConfig" } }, + "example": { + "useByDefault": null, + "providerType": "TOTP", + "authUrl": null + }, "properties": { "useByDefault": { "type": "boolean" @@ -139647,6 +145736,10 @@ "BACKUP_CODE": "#/components/schemas/BackupCodeTwoFaProviderConfig" } }, + "example": { + "providerType": "TOTP", + "issuerName": null + }, "properties": { "providerType": { "type": "string" @@ -139828,6 +145921,14 @@ "maxReports": { "type": "integer", "format": "int64" + }, + "aiCredits": { + "type": "integer", + "format": "int64" + }, + "maxAiCredits": { + "type": "integer", + "format": "int64" } } }, @@ -139990,6 +146091,10 @@ } } ], + "example": { + "type": "USER_GROUP_LIST", + "groupsIds": null + }, "required": [ "groupsIds" ] @@ -140003,7 +146108,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "USER", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "UserInfo": { "type": "object", @@ -140119,6 +146228,10 @@ } } ], + "example": { + "type": "USER_LIST", + "usersIds": null + }, "required": [ "usersIds" ] @@ -140229,6 +146342,10 @@ } } ], + "example": { + "type": "USER_ROLE", + "rolesIds": null + }, "required": [ "rolesIds" ] @@ -140249,6 +146366,10 @@ "USER_ROLE": "#/components/schemas/UserRoleFilter" } }, + "example": { + "type": "USER_LIST", + "usersIds": null + }, "properties": { "type": { "type": "string" @@ -140280,7 +146401,13 @@ } } } - ] + ], + "example": { + "version": "v2", + "siteKey": null, + "logActionName": null, + "secretKey": null + } }, "V3CaptchaParams": { "allOf": [ @@ -140304,7 +146431,13 @@ } } } - ] + ], + "example": { + "version": "v3", + "siteKey": null, + "logActionName": null, + "secretKey": null + } }, "ValueSourceType": { "type": "string", @@ -140359,6 +146492,23 @@ "COMPLEX": "#/components/schemas/ComplexVersionCreateRequest" } }, + "example": { + "versionName": null, + "branch": null, + "type": "SINGLE_ENTITY", + "entityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "saveRelations": null, + "saveAttributes": null, + "saveCredentials": null, + "saveCalculatedFields": null, + "savePermissions": null, + "saveGroupEntities": null + } + }, "properties": { "versionName": { "type": "string" @@ -140444,6 +146594,27 @@ "ENTITY_TYPE": "#/components/schemas/EntityTypeVersionLoadRequest" } }, + "example": { + "versionId": null, + "type": "SINGLE_ENTITY", + "internalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "externalEntityId": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "config": { + "loadRelations": null, + "loadAttributes": null, + "loadCredentials": null, + "loadCalculatedFields": null, + "loadPermissions": null, + "loadGroupEntities": null, + "autoGenerateIntegrationKey": null + } + }, "properties": { "versionId": { "type": "string" @@ -140531,6 +146702,13 @@ } } ], + "example": { + "enabled": null, + "body": null, + "method": "WEB", + "subject": "New Message Received", + "additionalConfig": {} + }, "required": [ "subject" ] @@ -140558,6 +146736,50 @@ } } ], + "example": { + "type": "WEB", + "enabled": null, + "title": null, + "captcha": { + "version": "enterprise", + "projectId": null, + "serviceAccountCredentials": null, + "serviceAccountCredentialsFileName": null, + "androidKey": null, + "iosKey": null, + "logActionName": null + }, + "permissions": null, + "notificationRecipient": { + "entityType": "NOTIFICATION_TARGET", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "signUpFields": null, + "customerTitlePrefix": null, + "showPrivacyPolicy": null, + "showTermsOfUse": null, + "defaultDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "fullscreen": null + }, + "homeDashboard": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9", + "hideToolbar": null + }, + "customerGroupId": { + "entityType": "ENTITY_GROUP", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "customMenuId": { + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "domainId": { + "entityType": "DOMAIN", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "privacyPolicy": null, + "termsOfUse": null + }, "required": [ "domainId" ] @@ -140587,7 +146809,14 @@ } } } - ] + ], + "example": { + "type": "WEB_VIEW", + "visible": null, + "label": "Air quality", + "icon": "home_icon", + "url": "/url" + } }, "WeekInterval": { "allOf": [ @@ -140608,6 +146837,11 @@ } } ], + "example": { + "type": "WEEK", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -140631,6 +146865,11 @@ } } ], + "example": { + "type": "WEEK_SUN_SAT", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] @@ -140876,7 +147115,25 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "WIDGET_TYPE" + } }, "WidgetTypeId": { "type": "object", @@ -140887,7 +147144,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "WIDGET_TYPE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "WidgetTypeInfo": { "type": "object", @@ -141049,7 +147310,27 @@ { "$ref": "#/components/schemas/EntityExportData" } - ] + ], + "example": { + "widgets": null, + "fqns": null, + "entity": { + "createdTime": null, + "id": { + "entityType": "DEVICE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "name": null, + "tenantId": { + "entityType": "TENANT", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "relations": null, + "attributes": null, + "calculatedFields": null, + "entityType": "WIDGETS_BUNDLE" + } }, "WidgetsBundleId": { "type": "object", @@ -141060,7 +147341,11 @@ { "type": "object" } - ] + ], + "example": { + "entityType": "WIDGETS_BUNDLE", + "id": "784f394c-42b6-435a-983c-b7beff2784f9" + } }, "X509CertificateChainProvisionConfiguration": { "allOf": [ @@ -141078,7 +147363,13 @@ } } } - ] + ], + "example": { + "provisionDeviceSecret": "secret123", + "type": "X509_CERTIFICATE_CHAIN", + "certificateRegExPattern": null, + "allowCreateNewDevicesByX509Certificate": null + } }, "X509LwM2MBootstrapServerCredential": { "allOf": [ @@ -141189,6 +147480,11 @@ } } ], + "example": { + "type": "YEAR", + "tz": null, + "offsetSec": null + }, "required": [ "tz" ] diff --git a/pe/tb_pe_client/__init__.py b/pe/tb_pe_client/__init__.py index 7736aa7b..dd4375d4 100644 --- a/pe/tb_pe_client/__init__.py +++ b/pe/tb_pe_client/__init__.py @@ -37,7 +37,10 @@ if TYPE_CHECKING: from tb_pe_client.api.admin_controller_api import AdminControllerApi + from tb_pe_client.api.ai_chat_controller_api import AiChatControllerApi from tb_pe_client.api.ai_model_controller_api import AiModelControllerApi + from tb_pe_client.api.ai_solution_controller_api import AiSolutionControllerApi + from tb_pe_client.api.ai_tool_controller_api import AiToolControllerApi from tb_pe_client.api.alarm_comment_controller_api import AlarmCommentControllerApi from tb_pe_client.api.alarm_controller_api import AlarmControllerApi from tb_pe_client.api.alarm_rule_controller_api import AlarmRuleControllerApi @@ -284,6 +287,7 @@ from tb_pe_client.models.chart_label_position import ChartLabelPosition from tb_pe_client.models.chart_line_type import ChartLineType from tb_pe_client.models.chart_shape import ChartShape + from tb_pe_client.models.chat_type import ChatType from tb_pe_client.models.check_pre_provisioned_devices_device_profile_provision_configuration import CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration from tb_pe_client.models.checksum_algorithm import ChecksumAlgorithm from tb_pe_client.models.claim_request import ClaimRequest @@ -902,6 +906,7 @@ from tb_pe_client.models.solution_export_response import SolutionExportResponse from tb_pe_client.models.solution_import_result import SolutionImportResult from tb_pe_client.models.solution_install_response import SolutionInstallResponse + from tb_pe_client.models.solution_step import SolutionStep from tb_pe_client.models.solution_template_level import SolutionTemplateLevel from tb_pe_client.models.solution_validation_result import SolutionValidationResult from tb_pe_client.models.specific_time_schedule import SpecificTimeSchedule @@ -1064,7 +1069,10 @@ _LAZY_CLASSES = { "AdminControllerApi": "tb_pe_client.api.admin_controller_api", + "AiChatControllerApi": "tb_pe_client.api.ai_chat_controller_api", "AiModelControllerApi": "tb_pe_client.api.ai_model_controller_api", + "AiSolutionControllerApi": "tb_pe_client.api.ai_solution_controller_api", + "AiToolControllerApi": "tb_pe_client.api.ai_tool_controller_api", "AlarmCommentControllerApi": "tb_pe_client.api.alarm_comment_controller_api", "AlarmControllerApi": "tb_pe_client.api.alarm_controller_api", "AlarmRuleControllerApi": "tb_pe_client.api.alarm_rule_controller_api", @@ -1311,6 +1319,7 @@ "ChartLabelPosition": "tb_pe_client.models.chart_label_position", "ChartLineType": "tb_pe_client.models.chart_line_type", "ChartShape": "tb_pe_client.models.chart_shape", + "ChatType": "tb_pe_client.models.chat_type", "CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration": "tb_pe_client.models.check_pre_provisioned_devices_device_profile_provision_configuration", "ChecksumAlgorithm": "tb_pe_client.models.checksum_algorithm", "ClaimRequest": "tb_pe_client.models.claim_request", @@ -1929,6 +1938,7 @@ "SolutionExportResponse": "tb_pe_client.models.solution_export_response", "SolutionImportResult": "tb_pe_client.models.solution_import_result", "SolutionInstallResponse": "tb_pe_client.models.solution_install_response", + "SolutionStep": "tb_pe_client.models.solution_step", "SolutionTemplateLevel": "tb_pe_client.models.solution_template_level", "SolutionValidationResult": "tb_pe_client.models.solution_validation_result", "SpecificTimeSchedule": "tb_pe_client.models.specific_time_schedule", diff --git a/pe/tb_pe_client/_auth.py b/pe/tb_pe_client/_auth.py index 4ada8e58..1c793d11 100644 --- a/pe/tb_pe_client/_auth.py +++ b/pe/tb_pe_client/_auth.py @@ -20,11 +20,13 @@ This file lives in common/ and is copied verbatim into each edition package directory by generate-client.sh. Use only relative imports and stdlib; no edition-specific imports. """ + import base64 import json import logging import threading import time + import urllib3 logger = logging.getLogger(__name__) @@ -37,12 +39,14 @@ # _TokenInfo # --------------------------------------------------------------------------- + class _TokenInfo: """Immutable value object holding JWT token state. All timestamps are in milliseconds since epoch. clock_diff = iat_ms_from_server - local_now_ms at login time (may be negative). """ + __slots__ = ("token", "refresh_token", "token_exp_ts", "refresh_exp_ts", "clock_diff") def __init__( @@ -55,9 +59,9 @@ def __init__( ): self.token = token self.refresh_token = refresh_token - self.token_exp_ts = token_exp_ts # -1 means unknown / invalid + self.token_exp_ts = token_exp_ts # -1 means unknown / invalid self.refresh_exp_ts = refresh_exp_ts # -1 means unknown / invalid - self.clock_diff = clock_diff # server_clock - local_clock offset in ms + self.clock_diff = clock_diff # server_clock - local_clock offset in ms # Sentinel used before first login @@ -68,6 +72,7 @@ def __init__( # JWT helpers # --------------------------------------------------------------------------- + def _parse_jwt_claim_ms(jwt: str, claim: str) -> int: """Decode JWT payload (base64url) and return the named claim value * 1000 (ms). @@ -90,6 +95,7 @@ def _parse_jwt_claim_ms(jwt: str, claim: str) -> int: # _AuthManager # --------------------------------------------------------------------------- + class _AuthManager: """Manages JWT token state and implements the refresh_api_key_hook. @@ -229,9 +235,7 @@ def _raw_post(self, path: str, body: bytes) -> dict: headers={"Content-Type": "application/json"}, ) if response.status != 200: - raise RuntimeError( - f"Auth request to {path} returned HTTP {response.status}" - ) + raise RuntimeError(f"Auth request to {path} returned HTTP {response.status}") return json.loads(response.data) def _build_token_info(self, token: str, refresh_token: str) -> "_TokenInfo": diff --git a/pe/tb_pe_client/_controller_map.py b/pe/tb_pe_client/_controller_map.py index 5325bfe9..37c6f932 100644 --- a/pe/tb_pe_client/_controller_map.py +++ b/pe/tb_pe_client/_controller_map.py @@ -76,6 +76,9 @@ "change_password": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), "change_password_with_http_info": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), "change_password_without_preload_content": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), + "chat": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "chat_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "chat_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "check_activate_token": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), "check_activate_token_with_http_info": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), "check_activate_token_without_preload_content": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), @@ -106,6 +109,9 @@ "clear_events": ("tb_pe_client.api.event_controller_api", "EventControllerApi"), "clear_events_with_http_info": ("tb_pe_client.api.event_controller_api", "EventControllerApi"), "clear_events_without_preload_content": ("tb_pe_client.api.event_controller_api", "EventControllerApi"), + "clear_step": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "clear_step_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "clear_step_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "compare_entity_data_to_version": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), "compare_entity_data_to_version_with_http_info": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), "compare_entity_data_to_version_without_preload_content": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), @@ -124,6 +130,9 @@ "count_entities_by_query": ("tb_pe_client.api.entity_query_controller_api", "EntityQueryControllerApi"), "count_entities_by_query_with_http_info": ("tb_pe_client.api.entity_query_controller_api", "EntityQueryControllerApi"), "count_entities_by_query_without_preload_content": ("tb_pe_client.api.entity_query_controller_api", "EntityQueryControllerApi"), + "create_chat": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "create_chat_with_http_info": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "create_chat_without_preload_content": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "create_custom_menu": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), "create_custom_menu_with_http_info": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), "create_custom_menu_without_preload_content": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), @@ -133,6 +142,9 @@ "create_report": ("tb_pe_client.api.report_controller_api", "ReportControllerApi"), "create_report_with_http_info": ("tb_pe_client.api.report_controller_api", "ReportControllerApi"), "create_report_without_preload_content": ("tb_pe_client.api.report_controller_api", "ReportControllerApi"), + "create_solution": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "create_solution_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "create_solution_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "delete_ai_model_by_id": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), "delete_ai_model_by_id_with_http_info": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), "delete_ai_model_by_id_without_preload_content": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), @@ -163,6 +175,9 @@ "delete_calculated_field": ("tb_pe_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "delete_calculated_field_with_http_info": ("tb_pe_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "delete_calculated_field_without_preload_content": ("tb_pe_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), + "delete_chat": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "delete_chat_with_http_info": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "delete_chat_without_preload_content": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "delete_client_registration_template": ("tb_pe_client.api.o_auth2_config_template_controller_api", "OAuth2ConfigTemplateControllerApi"), "delete_client_registration_template_with_http_info": ("tb_pe_client.api.o_auth2_config_template_controller_api", "OAuth2ConfigTemplateControllerApi"), "delete_client_registration_template_without_preload_content": ("tb_pe_client.api.o_auth2_config_template_controller_api", "OAuth2ConfigTemplateControllerApi"), @@ -298,6 +313,9 @@ "delete_secret": ("tb_pe_client.api.secret_controller_api", "SecretControllerApi"), "delete_secret_with_http_info": ("tb_pe_client.api.secret_controller_api", "SecretControllerApi"), "delete_secret_without_preload_content": ("tb_pe_client.api.secret_controller_api", "SecretControllerApi"), + "delete_solution": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "delete_solution_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "delete_solution_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "delete_tenant": ("tb_pe_client.api.tenant_controller_api", "TenantControllerApi"), "delete_tenant_profile": ("tb_pe_client.api.tenant_profile_controller_api", "TenantProfileControllerApi"), "delete_tenant_profile_with_http_info": ("tb_pe_client.api.tenant_profile_controller_api", "TenantProfileControllerApi"), @@ -688,6 +706,9 @@ "get_calculated_fields_by_entity_id_without_preload_content": ("tb_pe_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "get_calculated_fields_with_http_info": ("tb_pe_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), "get_calculated_fields_without_preload_content": ("tb_pe_client.api.calculated_field_controller_api", "CalculatedFieldControllerApi"), + "get_chat_messages": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "get_chat_messages_with_http_info": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "get_chat_messages_without_preload_content": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "get_component_descriptor_by_clazz": ("tb_pe_client.api.component_descriptor_controller_api", "ComponentDescriptorControllerApi"), "get_component_descriptor_by_clazz_with_http_info": ("tb_pe_client.api.component_descriptor_controller_api", "ComponentDescriptorControllerApi"), "get_component_descriptor_by_clazz_without_preload_content": ("tb_pe_client.api.component_descriptor_controller_api", "ComponentDescriptorControllerApi"), @@ -1342,6 +1363,7 @@ "get_sign_up_self_registration_params": ("tb_pe_client.api.self_registration_controller_api", "SelfRegistrationControllerApi"), "get_sign_up_self_registration_params_with_http_info": ("tb_pe_client.api.self_registration_controller_api", "SelfRegistrationControllerApi"), "get_sign_up_self_registration_params_without_preload_content": ("tb_pe_client.api.self_registration_controller_api", "SelfRegistrationControllerApi"), + "get_solution": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "get_solution_template_details": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "get_solution_template_details_with_http_info": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "get_solution_template_details_without_preload_content": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), @@ -1351,6 +1373,11 @@ "get_solution_template_instructions": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "get_solution_template_instructions_with_http_info": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "get_solution_template_instructions_without_preload_content": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), + "get_solution_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "get_solution_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "get_solutions": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "get_solutions_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "get_solutions_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "get_system_info": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), "get_system_info_with_http_info": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), "get_system_info_without_preload_content": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), @@ -1636,9 +1663,12 @@ "import_solution": ("tb_pe_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), "import_solution_with_http_info": ("tb_pe_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), "import_solution_without_preload_content": ("tb_pe_client.api.solution_export_import_controller_api", "SolutionExportImportControllerApi"), + "install_solution": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "install_solution_template": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "install_solution_template_with_http_info": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "install_solution_template_without_preload_content": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), + "install_solution_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "install_solution_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "is_customer_white_labeling_allowed": ("tb_pe_client.api.white_labeling_controller_api", "WhiteLabelingControllerApi"), "is_customer_white_labeling_allowed_with_http_info": ("tb_pe_client.api.white_labeling_controller_api", "WhiteLabelingControllerApi"), "is_customer_white_labeling_allowed_without_preload_content": ("tb_pe_client.api.white_labeling_controller_api", "WhiteLabelingControllerApi"), @@ -1663,6 +1693,9 @@ "list_branches": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), "list_branches_with_http_info": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), "list_branches_without_preload_content": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), + "list_chats": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "list_chats_with_http_info": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "list_chats_without_preload_content": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "list_entities_at_version": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), "list_entities_at_version_with_http_info": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), "list_entities_at_version_without_preload_content": ("tb_pe_client.api.entities_version_control_controller_api", "EntitiesVersionControlControllerApi"), @@ -1780,6 +1813,9 @@ "reset_password": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), "reset_password_with_http_info": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), "reset_password_without_preload_content": ("tb_pe_client.api.auth_controller_api", "AuthControllerApi"), + "resolve_tool_approval": ("tb_pe_client.api.ai_tool_controller_api", "AiToolControllerApi"), + "resolve_tool_approval_with_http_info": ("tb_pe_client.api.ai_tool_controller_api", "AiToolControllerApi"), + "resolve_tool_approval_without_preload_content": ("tb_pe_client.api.ai_tool_controller_api", "AiToolControllerApi"), "save_admin_settings": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), "save_admin_settings_with_http_info": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), "save_admin_settings_without_preload_content": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), @@ -1990,6 +2026,9 @@ "send_addon_access_error": ("tb_pe_client.api.notification_controller_api", "NotificationControllerApi"), "send_addon_access_error_with_http_info": ("tb_pe_client.api.notification_controller_api", "NotificationControllerApi"), "send_addon_access_error_without_preload_content": ("tb_pe_client.api.notification_controller_api", "NotificationControllerApi"), + "send_chat_message": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "send_chat_message_with_http_info": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "send_chat_message_without_preload_content": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "send_chat_request": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), "send_chat_request_with_http_info": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), "send_chat_request_without_preload_content": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), @@ -2044,6 +2083,9 @@ "sign_up": ("tb_pe_client.api.sign_up_controller_api", "SignUpControllerApi"), "sign_up_with_http_info": ("tb_pe_client.api.sign_up_controller_api", "SignUpControllerApi"), "sign_up_without_preload_content": ("tb_pe_client.api.sign_up_controller_api", "SignUpControllerApi"), + "start_new": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "start_new_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "start_new_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "submit_two_fa_account_config": ("tb_pe_client.api.two_factor_auth_config_controller_api", "TwoFactorAuthConfigControllerApi"), "submit_two_fa_account_config_with_http_info": ("tb_pe_client.api.two_factor_auth_config_controller_api", "TwoFactorAuthConfigControllerApi"), "submit_two_fa_account_config_without_preload_content": ("tb_pe_client.api.two_factor_auth_config_controller_api", "TwoFactorAuthConfigControllerApi"), @@ -2086,9 +2128,12 @@ "unassign_scheduler_event_from_edge": ("tb_pe_client.api.scheduler_event_controller_api", "SchedulerEventControllerApi"), "unassign_scheduler_event_from_edge_with_http_info": ("tb_pe_client.api.scheduler_event_controller_api", "SchedulerEventControllerApi"), "unassign_scheduler_event_from_edge_without_preload_content": ("tb_pe_client.api.scheduler_event_controller_api", "SchedulerEventControllerApi"), + "uninstall_solution": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "uninstall_solution_template": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "uninstall_solution_template_with_http_info": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), "uninstall_solution_template_without_preload_content": ("tb_pe_client.api.solution_controller_api", "SolutionControllerApi"), + "uninstall_solution_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "uninstall_solution_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "unset_auto_assign_to_edge_rule_chain": ("tb_pe_client.api.rule_chain_controller_api", "RuleChainControllerApi"), "unset_auto_assign_to_edge_rule_chain_with_http_info": ("tb_pe_client.api.rule_chain_controller_api", "RuleChainControllerApi"), "unset_auto_assign_to_edge_rule_chain_without_preload_content": ("tb_pe_client.api.rule_chain_controller_api", "RuleChainControllerApi"), @@ -2098,6 +2143,9 @@ "update_api_key_description": ("tb_pe_client.api.api_key_controller_api", "ApiKeyControllerApi"), "update_api_key_description_with_http_info": ("tb_pe_client.api.api_key_controller_api", "ApiKeyControllerApi"), "update_api_key_description_without_preload_content": ("tb_pe_client.api.api_key_controller_api", "ApiKeyControllerApi"), + "update_chat": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "update_chat_with_http_info": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), + "update_chat_without_preload_content": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "update_custom_menu_assignee_list": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), "update_custom_menu_assignee_list_with_http_info": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), "update_custom_menu_assignee_list_without_preload_content": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), @@ -2107,6 +2155,9 @@ "update_custom_menu_name": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), "update_custom_menu_name_with_http_info": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), "update_custom_menu_name_without_preload_content": ("tb_pe_client.api.custom_menu_controller_api", "CustomMenuControllerApi"), + "update_data": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "update_data_with_http_info": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "update_data_without_preload_content": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), "update_device_credentials": ("tb_pe_client.api.device_controller_api", "DeviceControllerApi"), "update_device_credentials_with_http_info": ("tb_pe_client.api.device_controller_api", "DeviceControllerApi"), "update_device_credentials_without_preload_content": ("tb_pe_client.api.device_controller_api", "DeviceControllerApi"), @@ -2168,7 +2219,10 @@ _CONTROLLER_ATTR_MAP = { "admin_controller": ("tb_pe_client.api.admin_controller_api", "AdminControllerApi"), + "ai_chat_controller": ("tb_pe_client.api.ai_chat_controller_api", "AiChatControllerApi"), "ai_model_controller": ("tb_pe_client.api.ai_model_controller_api", "AiModelControllerApi"), + "ai_solution_controller": ("tb_pe_client.api.ai_solution_controller_api", "AiSolutionControllerApi"), + "ai_tool_controller": ("tb_pe_client.api.ai_tool_controller_api", "AiToolControllerApi"), "alarm_comment_controller": ("tb_pe_client.api.alarm_comment_controller_api", "AlarmCommentControllerApi"), "alarm_controller": ("tb_pe_client.api.alarm_controller_api", "AlarmControllerApi"), "alarm_rule_controller": ("tb_pe_client.api.alarm_rule_controller_api", "AlarmRuleControllerApi"), diff --git a/pe/tb_pe_client/_retry.py b/pe/tb_pe_client/_retry.py index f7c1727b..f64729df 100644 --- a/pe/tb_pe_client/_retry.py +++ b/pe/tb_pe_client/_retry.py @@ -24,6 +24,7 @@ - After exhausting retries, returns the last 429 response (no exception raised) - Drains response body before each retry to avoid connection pool exhaustion """ + import logging import random import time @@ -36,7 +37,9 @@ class _RetryingRESTClient(RESTClientObject): """RESTClientObject subclass that transparently retries HTTP 429 responses.""" - def __init__(self, configuration, max_retries: int, initial_delay_ms: int, max_delay_ms: int) -> None: + def __init__( + self, configuration, max_retries: int, initial_delay_ms: int, max_delay_ms: int + ) -> None: """ Initialise the retrying REST client. @@ -54,7 +57,9 @@ def __init__(self, configuration, max_retries: int, initial_delay_ms: int, max_d # Public API # ------------------------------------------------------------------ - def request(self, method, url, headers=None, body=None, post_params=None, _request_timeout=None): + def request( + self, method, url, headers=None, body=None, post_params=None, _request_timeout=None + ): """Make an HTTP request, retrying up to max_retries times on 429. All arguments are forwarded verbatim to RESTClientObject.request(). @@ -64,7 +69,8 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque returned — callers are responsible for inspecting the status code. """ response = super().request( - method, url, + method, + url, headers=headers, body=body, post_params=post_params, @@ -89,7 +95,8 @@ def request(self, method, url, headers=None, body=None, post_params=None, _reque time.sleep(delay_s) response = super().request( - method, url, + method, + url, headers=headers, body=body, post_params=post_params, diff --git a/pe/tb_pe_client/api/__init__.py b/pe/tb_pe_client/api/__init__.py index 737db0ae..a94986e5 100644 --- a/pe/tb_pe_client/api/__init__.py +++ b/pe/tb_pe_client/api/__init__.py @@ -18,7 +18,10 @@ __all__ = [ "AdminControllerApi", + "AiChatControllerApi", "AiModelControllerApi", + "AiSolutionControllerApi", + "AiToolControllerApi", "AlarmCommentControllerApi", "AlarmControllerApi", "AlarmRuleControllerApi", @@ -103,7 +106,10 @@ if TYPE_CHECKING: from tb_pe_client.api.admin_controller_api import AdminControllerApi + from tb_pe_client.api.ai_chat_controller_api import AiChatControllerApi from tb_pe_client.api.ai_model_controller_api import AiModelControllerApi + from tb_pe_client.api.ai_solution_controller_api import AiSolutionControllerApi + from tb_pe_client.api.ai_tool_controller_api import AiToolControllerApi from tb_pe_client.api.alarm_comment_controller_api import AlarmCommentControllerApi from tb_pe_client.api.alarm_controller_api import AlarmControllerApi from tb_pe_client.api.alarm_rule_controller_api import AlarmRuleControllerApi @@ -187,7 +193,10 @@ _API_CLASSES = { "AdminControllerApi": "tb_pe_client.api.admin_controller_api", + "AiChatControllerApi": "tb_pe_client.api.ai_chat_controller_api", "AiModelControllerApi": "tb_pe_client.api.ai_model_controller_api", + "AiSolutionControllerApi": "tb_pe_client.api.ai_solution_controller_api", + "AiToolControllerApi": "tb_pe_client.api.ai_tool_controller_api", "AlarmCommentControllerApi": "tb_pe_client.api.alarm_comment_controller_api", "AlarmControllerApi": "tb_pe_client.api.alarm_controller_api", "AlarmRuleControllerApi": "tb_pe_client.api.alarm_rule_controller_api", diff --git a/pe/tb_pe_client/api/admin_controller_api.py b/pe/tb_pe_client/api/admin_controller_api.py index f55ce55a..4eecb83c 100644 --- a/pe/tb_pe_client/api/admin_controller_api.py +++ b/pe/tb_pe_client/api/admin_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/ai_chat_controller_api.py b/pe/tb_pe_client/api/ai_chat_controller_api.py new file mode 100644 index 00000000..6a96528d --- /dev/null +++ b/pe/tb_pe_client/api/ai_chat_controller_api.py @@ -0,0 +1,1783 @@ +# +# 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. +# +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. + + The version of the OpenAPI document: 4.3.1.2PE + Contact: info@thingsboard.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictStr +from typing import Any, List, Optional +from uuid import UUID +from tb_pe_client.models.chat_type import ChatType + +from tb_pe_client.api_client import ApiClient, RequestSerialized +from tb_pe_client.api_response import ApiResponse +from tb_pe_client.rest import RESTResponseType + + +class AiChatControllerApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_chat( + self, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """createChat + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_chat_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_chat_with_http_info( + self, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """createChat + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_chat_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_chat_without_preload_content( + self, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """createChat + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_chat_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_chat_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/chats', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_chat( + self, + chat_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """deleteChat + + + :param chat_id: (required) + :type chat_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_chat_serialize( + chat_id=chat_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_chat_with_http_info( + self, + chat_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """deleteChat + + + :param chat_id: (required) + :type chat_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_chat_serialize( + chat_id=chat_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_chat_without_preload_content( + self, + chat_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """deleteChat + + + :param chat_id: (required) + :type chat_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_chat_serialize( + chat_id=chat_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_chat_serialize( + self, + chat_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chat_id is not None: + _path_params['chatId'] = chat_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/ai/chats/{chatId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_chat_messages( + self, + chat_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """getChatMessages + + + :param chat_id: (required) + :type chat_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_chat_messages_serialize( + chat_id=chat_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_chat_messages_with_http_info( + self, + chat_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """getChatMessages + + + :param chat_id: (required) + :type chat_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_chat_messages_serialize( + chat_id=chat_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_chat_messages_without_preload_content( + self, + chat_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """getChatMessages + + + :param chat_id: (required) + :type chat_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_chat_messages_serialize( + chat_id=chat_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_chat_messages_serialize( + self, + chat_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chat_id is not None: + _path_params['chatId'] = chat_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/ai/chats/{chatId}/messages', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def list_chats( + self, + chat_type: ChatType, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """listChats + + + :param chat_type: (required) + :type chat_type: ChatType + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_chats_serialize( + chat_type=chat_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def list_chats_with_http_info( + self, + chat_type: ChatType, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """listChats + + + :param chat_type: (required) + :type chat_type: ChatType + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_chats_serialize( + chat_type=chat_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def list_chats_without_preload_content( + self, + chat_type: ChatType, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """listChats + + + :param chat_type: (required) + :type chat_type: ChatType + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_chats_serialize( + chat_type=chat_type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_chats_serialize( + self, + chat_type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chat_type is not None: + _path_params['chatType'] = chat_type.value + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/ai/chats/{chatType}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def send_chat_message( + self, + chat_id: UUID, + x_authorization: StrictStr, + body: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> List[object]: + """sendChatMessage + + + :param chat_id: (required) + :type chat_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param body: (required) + :type body: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_chat_message_serialize( + chat_id=chat_id, + x_authorization=x_authorization, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[object]", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def send_chat_message_with_http_info( + self, + chat_id: UUID, + x_authorization: StrictStr, + body: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[List[object]]: + """sendChatMessage + + + :param chat_id: (required) + :type chat_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param body: (required) + :type body: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_chat_message_serialize( + chat_id=chat_id, + x_authorization=x_authorization, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[object]", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def send_chat_message_without_preload_content( + self, + chat_id: UUID, + x_authorization: StrictStr, + body: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """sendChatMessage + + + :param chat_id: (required) + :type chat_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param body: (required) + :type body: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._send_chat_message_serialize( + chat_id=chat_id, + x_authorization=x_authorization, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "List[object]", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _send_chat_message_serialize( + self, + chat_id, + x_authorization, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chat_id is not None: + _path_params['chatId'] = chat_id + # process the query parameters + # process the header parameters + if x_authorization is not None: + _header_params['X-Authorization'] = x_authorization + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/event-stream', + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'text/plain' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/chats/{chatId}/messages', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_chat( + self, + chat_id: UUID, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """updateChat + + + :param chat_id: (required) + :type chat_id: UUID + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_chat_serialize( + chat_id=chat_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_chat_with_http_info( + self, + chat_id: UUID, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """updateChat + + + :param chat_id: (required) + :type chat_id: UUID + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_chat_serialize( + chat_id=chat_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_chat_without_preload_content( + self, + chat_id: UUID, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """updateChat + + + :param chat_id: (required) + :type chat_id: UUID + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_chat_serialize( + chat_id=chat_id, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_chat_serialize( + self, + chat_id, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if chat_id is not None: + _path_params['chatId'] = chat_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/api/ai/chats/{chatId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pe/tb_pe_client/api/ai_model_controller_api.py b/pe/tb_pe_client/api/ai_model_controller_api.py index 18c9db09..60c8bc46 100644 --- a/pe/tb_pe_client/api/ai_model_controller_api.py +++ b/pe/tb_pe_client/api/ai_model_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/ai_solution_controller_api.py b/pe/tb_pe_client/api/ai_solution_controller_api.py new file mode 100644 index 00000000..2ff8d234 --- /dev/null +++ b/pe/tb_pe_client/api/ai_solution_controller_api.py @@ -0,0 +1,2895 @@ +# +# 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. +# +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. + + The version of the OpenAPI document: 4.3.1.2PE + Contact: info@thingsboard.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictStr +from typing import Any, Optional +from uuid import UUID +from tb_pe_client.models.solution_step import SolutionStep + +from tb_pe_client.api_client import ApiClient, RequestSerialized +from tb_pe_client.api_response import ApiResponse +from tb_pe_client.rest import RESTResponseType + + +class AiSolutionControllerApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def chat( + self, + solution_id: UUID, + step: SolutionStep, + body: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """chat + + + :param solution_id: (required) + :type solution_id: UUID + :param step: (required) + :type step: SolutionStep + :param body: (required) + :type body: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._chat_serialize( + solution_id=solution_id, + step=step, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def chat_with_http_info( + self, + solution_id: UUID, + step: SolutionStep, + body: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """chat + + + :param solution_id: (required) + :type solution_id: UUID + :param step: (required) + :type step: SolutionStep + :param body: (required) + :type body: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._chat_serialize( + solution_id=solution_id, + step=step, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def chat_without_preload_content( + self, + solution_id: UUID, + step: SolutionStep, + body: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """chat + + + :param solution_id: (required) + :type solution_id: UUID + :param step: (required) + :type step: SolutionStep + :param body: (required) + :type body: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._chat_serialize( + solution_id=solution_id, + step=step, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _chat_serialize( + self, + solution_id, + step, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + if step is not None: + _path_params['step'] = step.value + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/solution/{solutionId}/{step}/chat', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def clear_step( + self, + solution_id: UUID, + step: SolutionStep, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """clearStep + + + :param solution_id: (required) + :type solution_id: UUID + :param step: (required) + :type step: SolutionStep + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._clear_step_serialize( + solution_id=solution_id, + step=step, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def clear_step_with_http_info( + self, + solution_id: UUID, + step: SolutionStep, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """clearStep + + + :param solution_id: (required) + :type solution_id: UUID + :param step: (required) + :type step: SolutionStep + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._clear_step_serialize( + solution_id=solution_id, + step=step, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def clear_step_without_preload_content( + self, + solution_id: UUID, + step: SolutionStep, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """clearStep + + + :param solution_id: (required) + :type solution_id: UUID + :param step: (required) + :type step: SolutionStep + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._clear_step_serialize( + solution_id=solution_id, + step=step, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _clear_step_serialize( + self, + solution_id, + step, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + if step is not None: + _path_params['step'] = step.value + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/ai/solution/{solutionId}/{step}/clear', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def create_solution( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """createSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_solution_with_http_info( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """createSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_solution_without_preload_content( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """createSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_solution_serialize( + self, + solution_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/solution/{solutionId}/create', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_solution( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """deleteSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_solution_with_http_info( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """deleteSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_solution_without_preload_content( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """deleteSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': None, + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_solution_serialize( + self, + solution_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/ai/solution/{solutionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_solution( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """getSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_solution_with_http_info( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """getSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_solution_without_preload_content( + self, + solution_id: UUID, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """getSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_solution_serialize( + solution_id=solution_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_solution_serialize( + self, + solution_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/ai/solution/{solutionId}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_solutions( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """getSolutions + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_solutions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_solutions_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """getSolutions + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_solutions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_solutions_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """getSolutions + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_solutions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_solutions_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/api/ai/solution/infos', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def install_solution( + self, + solution_id: UUID, + x_authorization: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """installSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._install_solution_serialize( + solution_id=solution_id, + x_authorization=x_authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def install_solution_with_http_info( + self, + solution_id: UUID, + x_authorization: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """installSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._install_solution_serialize( + solution_id=solution_id, + x_authorization=x_authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def install_solution_without_preload_content( + self, + solution_id: UUID, + x_authorization: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """installSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._install_solution_serialize( + solution_id=solution_id, + x_authorization=x_authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _install_solution_serialize( + self, + solution_id, + x_authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + # process the query parameters + # process the header parameters + if x_authorization is not None: + _header_params['X-Authorization'] = x_authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/solution/{solutionId}/install', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def start_new( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """startNew + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_new_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def start_new_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """startNew + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_new_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def start_new_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """startNew + + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._start_new_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _start_new_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/solution/start', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def uninstall_solution( + self, + solution_id: UUID, + x_authorization: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """uninstallSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._uninstall_solution_serialize( + solution_id=solution_id, + x_authorization=x_authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def uninstall_solution_with_http_info( + self, + solution_id: UUID, + x_authorization: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """uninstallSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._uninstall_solution_serialize( + solution_id=solution_id, + x_authorization=x_authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def uninstall_solution_without_preload_content( + self, + solution_id: UUID, + x_authorization: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """uninstallSolution + + + :param solution_id: (required) + :type solution_id: UUID + :param x_authorization: (required) + :type x_authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._uninstall_solution_serialize( + solution_id=solution_id, + x_authorization=x_authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _uninstall_solution_serialize( + self, + solution_id, + x_authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + # process the query parameters + # process the header parameters + if x_authorization is not None: + _header_params['X-Authorization'] = x_authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/api/ai/solution/{solutionId}/uninstall', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def update_data( + self, + solution_id: UUID, + data_key: StrictStr, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """updateData + + + :param solution_id: (required) + :type solution_id: UUID + :param data_key: (required) + :type data_key: str + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_data_serialize( + solution_id=solution_id, + data_key=data_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def update_data_with_http_info( + self, + solution_id: UUID, + data_key: StrictStr, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """updateData + + + :param solution_id: (required) + :type solution_id: UUID + :param data_key: (required) + :type data_key: str + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_data_serialize( + solution_id=solution_id, + data_key=data_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def update_data_without_preload_content( + self, + solution_id: UUID, + data_key: StrictStr, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """updateData + + + :param solution_id: (required) + :type solution_id: UUID + :param data_key: (required) + :type data_key: str + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_data_serialize( + solution_id=solution_id, + data_key=data_key, + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _update_data_serialize( + self, + solution_id, + data_key, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if solution_id is not None: + _path_params['solutionId'] = solution_id + if data_key is not None: + _path_params['dataKey'] = data_key + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/api/ai/solution/{solutionId}/{dataKey}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pe/tb_pe_client/api/ai_tool_controller_api.py b/pe/tb_pe_client/api/ai_tool_controller_api.py new file mode 100644 index 00000000..bd76c2ce --- /dev/null +++ b/pe/tb_pe_client/api/ai_tool_controller_api.py @@ -0,0 +1,338 @@ +# +# 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. +# +""" + ThingsBoard REST API + + ThingsBoard Professional Edition IoT platform REST API documentation. + + The version of the OpenAPI document: 4.3.1.2PE + Contact: info@thingsboard.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Optional + +from tb_pe_client.api_client import ApiClient, RequestSerialized +from tb_pe_client.api_response import ApiResponse +from tb_pe_client.rest import RESTResponseType + + +class AiToolControllerApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def resolve_tool_approval( + self, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """resolveToolApproval + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resolve_tool_approval_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def resolve_tool_approval_with_http_info( + self, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """resolveToolApproval + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resolve_tool_approval_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def resolve_tool_approval_without_preload_content( + self, + body: Optional[Any], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """resolveToolApproval + + + :param body: (required) + :type body: object + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._resolve_tool_approval_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ThingsboardErrorResponse", + '401': "ThingsboardErrorResponse", + '403': "ThingsboardErrorResponse", + '404': "ThingsboardErrorResponse", + '429': "ThingsboardErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _resolve_tool_approval_serialize( + self, + body, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if body is not None: + _body_params = body + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'ApiKeyForm', + 'HttpLoginForm' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/api/ai/tools/resolve-approval', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/pe/tb_pe_client/api/alarm_comment_controller_api.py b/pe/tb_pe_client/api/alarm_comment_controller_api.py index 75715be0..61078caa 100644 --- a/pe/tb_pe_client/api/alarm_comment_controller_api.py +++ b/pe/tb_pe_client/api/alarm_comment_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/alarm_controller_api.py b/pe/tb_pe_client/api/alarm_controller_api.py index 35b50e92..14eabcd5 100644 --- a/pe/tb_pe_client/api/alarm_controller_api.py +++ b/pe/tb_pe_client/api/alarm_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/alarm_rule_controller_api.py b/pe/tb_pe_client/api/alarm_rule_controller_api.py index eab4b8b2..5b609816 100644 --- a/pe/tb_pe_client/api/alarm_rule_controller_api.py +++ b/pe/tb_pe_client/api/alarm_rule_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/api_key_controller_api.py b/pe/tb_pe_client/api/api_key_controller_api.py index edec52fa..13b3dda8 100644 --- a/pe/tb_pe_client/api/api_key_controller_api.py +++ b/pe/tb_pe_client/api/api_key_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/asset_controller_api.py b/pe/tb_pe_client/api/asset_controller_api.py index f23306c1..697acc9d 100644 --- a/pe/tb_pe_client/api/asset_controller_api.py +++ b/pe/tb_pe_client/api/asset_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/asset_profile_controller_api.py b/pe/tb_pe_client/api/asset_profile_controller_api.py index 69802955..fc1b6030 100644 --- a/pe/tb_pe_client/api/asset_profile_controller_api.py +++ b/pe/tb_pe_client/api/asset_profile_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/audit_log_controller_api.py b/pe/tb_pe_client/api/audit_log_controller_api.py index 4e1c1f5b..52821b35 100644 --- a/pe/tb_pe_client/api/audit_log_controller_api.py +++ b/pe/tb_pe_client/api/audit_log_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/auth_controller_api.py b/pe/tb_pe_client/api/auth_controller_api.py index dfc372b8..83f116e5 100644 --- a/pe/tb_pe_client/api/auth_controller_api.py +++ b/pe/tb_pe_client/api/auth_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/blob_entity_controller_api.py b/pe/tb_pe_client/api/blob_entity_controller_api.py index acfc4904..331f48d9 100644 --- a/pe/tb_pe_client/api/blob_entity_controller_api.py +++ b/pe/tb_pe_client/api/blob_entity_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/calculated_field_controller_api.py b/pe/tb_pe_client/api/calculated_field_controller_api.py index 6ae3ed94..ab0eea7d 100644 --- a/pe/tb_pe_client/api/calculated_field_controller_api.py +++ b/pe/tb_pe_client/api/calculated_field_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/component_descriptor_controller_api.py b/pe/tb_pe_client/api/component_descriptor_controller_api.py index ff46cf24..032898f0 100644 --- a/pe/tb_pe_client/api/component_descriptor_controller_api.py +++ b/pe/tb_pe_client/api/component_descriptor_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/converter_controller_api.py b/pe/tb_pe_client/api/converter_controller_api.py index c78bdd8b..95a9df4f 100644 --- a/pe/tb_pe_client/api/converter_controller_api.py +++ b/pe/tb_pe_client/api/converter_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/converter_library_controller_api.py b/pe/tb_pe_client/api/converter_library_controller_api.py index bafae9a8..c85f3869 100644 --- a/pe/tb_pe_client/api/converter_library_controller_api.py +++ b/pe/tb_pe_client/api/converter_library_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/custom_menu_controller_api.py b/pe/tb_pe_client/api/custom_menu_controller_api.py index 8920e328..3823781c 100644 --- a/pe/tb_pe_client/api/custom_menu_controller_api.py +++ b/pe/tb_pe_client/api/custom_menu_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/custom_translation_controller_api.py b/pe/tb_pe_client/api/custom_translation_controller_api.py index 5f10c0a4..9241fdf1 100644 --- a/pe/tb_pe_client/api/custom_translation_controller_api.py +++ b/pe/tb_pe_client/api/custom_translation_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/customer_controller_api.py b/pe/tb_pe_client/api/customer_controller_api.py index f08982b1..a8634686 100644 --- a/pe/tb_pe_client/api/customer_controller_api.py +++ b/pe/tb_pe_client/api/customer_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/dashboard_controller_api.py b/pe/tb_pe_client/api/dashboard_controller_api.py index aafa5acc..c1b6c530 100644 --- a/pe/tb_pe_client/api/dashboard_controller_api.py +++ b/pe/tb_pe_client/api/dashboard_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/dashboard_report_controller_api.py b/pe/tb_pe_client/api/dashboard_report_controller_api.py index 7caf9b24..9a13f85b 100644 --- a/pe/tb_pe_client/api/dashboard_report_controller_api.py +++ b/pe/tb_pe_client/api/dashboard_report_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/device_connectivity_controller_api.py b/pe/tb_pe_client/api/device_connectivity_controller_api.py index 977059bb..158134cd 100644 --- a/pe/tb_pe_client/api/device_connectivity_controller_api.py +++ b/pe/tb_pe_client/api/device_connectivity_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/device_controller_api.py b/pe/tb_pe_client/api/device_controller_api.py index 246ede2d..2f56927d 100644 --- a/pe/tb_pe_client/api/device_controller_api.py +++ b/pe/tb_pe_client/api/device_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/device_group_ota_package_controller_api.py b/pe/tb_pe_client/api/device_group_ota_package_controller_api.py index 543c0ff0..547ec6e2 100644 --- a/pe/tb_pe_client/api/device_group_ota_package_controller_api.py +++ b/pe/tb_pe_client/api/device_group_ota_package_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/device_profile_controller_api.py b/pe/tb_pe_client/api/device_profile_controller_api.py index fefaeec4..218b6af5 100644 --- a/pe/tb_pe_client/api/device_profile_controller_api.py +++ b/pe/tb_pe_client/api/device_profile_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/domain_controller_api.py b/pe/tb_pe_client/api/domain_controller_api.py index 9e1abb00..8b8a185e 100644 --- a/pe/tb_pe_client/api/domain_controller_api.py +++ b/pe/tb_pe_client/api/domain_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/edge_controller_api.py b/pe/tb_pe_client/api/edge_controller_api.py index 6b307e4c..dbe3d9bc 100644 --- a/pe/tb_pe_client/api/edge_controller_api.py +++ b/pe/tb_pe_client/api/edge_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/edge_event_controller_api.py b/pe/tb_pe_client/api/edge_event_controller_api.py index b9690bf9..6bddf85b 100644 --- a/pe/tb_pe_client/api/edge_event_controller_api.py +++ b/pe/tb_pe_client/api/edge_event_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/entities_version_control_controller_api.py b/pe/tb_pe_client/api/entities_version_control_controller_api.py index 88c08fa1..c4a00395 100644 --- a/pe/tb_pe_client/api/entities_version_control_controller_api.py +++ b/pe/tb_pe_client/api/entities_version_control_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/entity_group_controller_api.py b/pe/tb_pe_client/api/entity_group_controller_api.py index bc2c3a39..49e7c3ac 100644 --- a/pe/tb_pe_client/api/entity_group_controller_api.py +++ b/pe/tb_pe_client/api/entity_group_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/entity_query_controller_api.py b/pe/tb_pe_client/api/entity_query_controller_api.py index 5f1b0c97..29aaeddf 100644 --- a/pe/tb_pe_client/api/entity_query_controller_api.py +++ b/pe/tb_pe_client/api/entity_query_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/entity_relation_controller_api.py b/pe/tb_pe_client/api/entity_relation_controller_api.py index 09aa977b..f35914a5 100644 --- a/pe/tb_pe_client/api/entity_relation_controller_api.py +++ b/pe/tb_pe_client/api/entity_relation_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/entity_view_controller_api.py b/pe/tb_pe_client/api/entity_view_controller_api.py index 5238d3a8..b240f6e5 100644 --- a/pe/tb_pe_client/api/entity_view_controller_api.py +++ b/pe/tb_pe_client/api/entity_view_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/event_controller_api.py b/pe/tb_pe_client/api/event_controller_api.py index 430f185c..07e869e8 100644 --- a/pe/tb_pe_client/api/event_controller_api.py +++ b/pe/tb_pe_client/api/event_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/group_permission_controller_api.py b/pe/tb_pe_client/api/group_permission_controller_api.py index d8352c1c..8b74aa84 100644 --- a/pe/tb_pe_client/api/group_permission_controller_api.py +++ b/pe/tb_pe_client/api/group_permission_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/image_controller_api.py b/pe/tb_pe_client/api/image_controller_api.py index 9af196e7..38017e74 100644 --- a/pe/tb_pe_client/api/image_controller_api.py +++ b/pe/tb_pe_client/api/image_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/integration_controller_api.py b/pe/tb_pe_client/api/integration_controller_api.py index b52d4210..907305e9 100644 --- a/pe/tb_pe_client/api/integration_controller_api.py +++ b/pe/tb_pe_client/api/integration_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/job_controller_api.py b/pe/tb_pe_client/api/job_controller_api.py index 1c4d3c83..039a5358 100644 --- a/pe/tb_pe_client/api/job_controller_api.py +++ b/pe/tb_pe_client/api/job_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/login_endpoint_api.py b/pe/tb_pe_client/api/login_endpoint_api.py index 0b1474ba..53ac1fba 100644 --- a/pe/tb_pe_client/api/login_endpoint_api.py +++ b/pe/tb_pe_client/api/login_endpoint_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/lwm2m_controller_api.py b/pe/tb_pe_client/api/lwm2m_controller_api.py index af36d5df..26180797 100644 --- a/pe/tb_pe_client/api/lwm2m_controller_api.py +++ b/pe/tb_pe_client/api/lwm2m_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/mail_config_template_controller_api.py b/pe/tb_pe_client/api/mail_config_template_controller_api.py index 58a0b5fc..4fd2fd21 100644 --- a/pe/tb_pe_client/api/mail_config_template_controller_api.py +++ b/pe/tb_pe_client/api/mail_config_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/mobile_app_bundle_controller_api.py b/pe/tb_pe_client/api/mobile_app_bundle_controller_api.py index d6471b07..46287fca 100644 --- a/pe/tb_pe_client/api/mobile_app_bundle_controller_api.py +++ b/pe/tb_pe_client/api/mobile_app_bundle_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/mobile_app_controller_api.py b/pe/tb_pe_client/api/mobile_app_controller_api.py index 06eb89d4..2b580188 100644 --- a/pe/tb_pe_client/api/mobile_app_controller_api.py +++ b/pe/tb_pe_client/api/mobile_app_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/notification_controller_api.py b/pe/tb_pe_client/api/notification_controller_api.py index de55bf8f..c24bd706 100644 --- a/pe/tb_pe_client/api/notification_controller_api.py +++ b/pe/tb_pe_client/api/notification_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/notification_rule_controller_api.py b/pe/tb_pe_client/api/notification_rule_controller_api.py index a1017675..79d52330 100644 --- a/pe/tb_pe_client/api/notification_rule_controller_api.py +++ b/pe/tb_pe_client/api/notification_rule_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/notification_target_controller_api.py b/pe/tb_pe_client/api/notification_target_controller_api.py index 89b6c49a..b672c1a2 100644 --- a/pe/tb_pe_client/api/notification_target_controller_api.py +++ b/pe/tb_pe_client/api/notification_target_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/notification_template_controller_api.py b/pe/tb_pe_client/api/notification_template_controller_api.py index ba26ba46..7168edba 100644 --- a/pe/tb_pe_client/api/notification_template_controller_api.py +++ b/pe/tb_pe_client/api/notification_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/o_auth2_config_template_controller_api.py b/pe/tb_pe_client/api/o_auth2_config_template_controller_api.py index 55755f45..2a82baf6 100644 --- a/pe/tb_pe_client/api/o_auth2_config_template_controller_api.py +++ b/pe/tb_pe_client/api/o_auth2_config_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/o_auth2_controller_api.py b/pe/tb_pe_client/api/o_auth2_controller_api.py index 5ca3b71a..00870e4b 100644 --- a/pe/tb_pe_client/api/o_auth2_controller_api.py +++ b/pe/tb_pe_client/api/o_auth2_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/ota_package_controller_api.py b/pe/tb_pe_client/api/ota_package_controller_api.py index e6eb3404..7b350069 100644 --- a/pe/tb_pe_client/api/ota_package_controller_api.py +++ b/pe/tb_pe_client/api/ota_package_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/owner_controller_api.py b/pe/tb_pe_client/api/owner_controller_api.py index 88771365..758f4787 100644 --- a/pe/tb_pe_client/api/owner_controller_api.py +++ b/pe/tb_pe_client/api/owner_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/qr_code_settings_controller_api.py b/pe/tb_pe_client/api/qr_code_settings_controller_api.py index 715c7b1e..d93f78b2 100644 --- a/pe/tb_pe_client/api/qr_code_settings_controller_api.py +++ b/pe/tb_pe_client/api/qr_code_settings_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/queue_controller_api.py b/pe/tb_pe_client/api/queue_controller_api.py index 7eda9f5e..1d69b50b 100644 --- a/pe/tb_pe_client/api/queue_controller_api.py +++ b/pe/tb_pe_client/api/queue_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/queue_stats_controller_api.py b/pe/tb_pe_client/api/queue_stats_controller_api.py index 122a5600..a16102b0 100644 --- a/pe/tb_pe_client/api/queue_stats_controller_api.py +++ b/pe/tb_pe_client/api/queue_stats_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/report_controller_api.py b/pe/tb_pe_client/api/report_controller_api.py index 6d1414f5..44caf41a 100644 --- a/pe/tb_pe_client/api/report_controller_api.py +++ b/pe/tb_pe_client/api/report_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/report_template_controller_api.py b/pe/tb_pe_client/api/report_template_controller_api.py index 7018d9a4..848e0f55 100644 --- a/pe/tb_pe_client/api/report_template_controller_api.py +++ b/pe/tb_pe_client/api/report_template_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/role_controller_api.py b/pe/tb_pe_client/api/role_controller_api.py index 50fe5262..2a75a620 100644 --- a/pe/tb_pe_client/api/role_controller_api.py +++ b/pe/tb_pe_client/api/role_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/rpc_v1_controller_api.py b/pe/tb_pe_client/api/rpc_v1_controller_api.py index df0bdcb0..b3ab2c15 100644 --- a/pe/tb_pe_client/api/rpc_v1_controller_api.py +++ b/pe/tb_pe_client/api/rpc_v1_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/rpc_v2_controller_api.py b/pe/tb_pe_client/api/rpc_v2_controller_api.py index 1bca82dd..776471ab 100644 --- a/pe/tb_pe_client/api/rpc_v2_controller_api.py +++ b/pe/tb_pe_client/api/rpc_v2_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/rule_chain_controller_api.py b/pe/tb_pe_client/api/rule_chain_controller_api.py index 5a9cffbe..7a508dd8 100644 --- a/pe/tb_pe_client/api/rule_chain_controller_api.py +++ b/pe/tb_pe_client/api/rule_chain_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/rule_engine_controller_api.py b/pe/tb_pe_client/api/rule_engine_controller_api.py index 87be4901..0cb183dd 100644 --- a/pe/tb_pe_client/api/rule_engine_controller_api.py +++ b/pe/tb_pe_client/api/rule_engine_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/scheduler_event_controller_api.py b/pe/tb_pe_client/api/scheduler_event_controller_api.py index b390a965..69d3ab7b 100644 --- a/pe/tb_pe_client/api/scheduler_event_controller_api.py +++ b/pe/tb_pe_client/api/scheduler_event_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/secret_controller_api.py b/pe/tb_pe_client/api/secret_controller_api.py index 1db5a231..f3edf876 100644 --- a/pe/tb_pe_client/api/secret_controller_api.py +++ b/pe/tb_pe_client/api/secret_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/self_registration_controller_api.py b/pe/tb_pe_client/api/self_registration_controller_api.py index 855a5231..f2827371 100644 --- a/pe/tb_pe_client/api/self_registration_controller_api.py +++ b/pe/tb_pe_client/api/self_registration_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/sign_up_controller_api.py b/pe/tb_pe_client/api/sign_up_controller_api.py index 0d890e4f..0d01ad28 100644 --- a/pe/tb_pe_client/api/sign_up_controller_api.py +++ b/pe/tb_pe_client/api/sign_up_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/solution_controller_api.py b/pe/tb_pe_client/api/solution_controller_api.py index 15d1fced..5ddd38cc 100644 --- a/pe/tb_pe_client/api/solution_controller_api.py +++ b/pe/tb_pe_client/api/solution_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/solution_export_import_controller_api.py b/pe/tb_pe_client/api/solution_export_import_controller_api.py index 4940e5ca..d17da6b4 100644 --- a/pe/tb_pe_client/api/solution_export_import_controller_api.py +++ b/pe/tb_pe_client/api/solution_export_import_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/tb_resource_controller_api.py b/pe/tb_pe_client/api/tb_resource_controller_api.py index 7fc05352..d98566c7 100644 --- a/pe/tb_pe_client/api/tb_resource_controller_api.py +++ b/pe/tb_pe_client/api/tb_resource_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/telemetry_controller_api.py b/pe/tb_pe_client/api/telemetry_controller_api.py index 2f6bcd30..c1de4fb6 100644 --- a/pe/tb_pe_client/api/telemetry_controller_api.py +++ b/pe/tb_pe_client/api/telemetry_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/tenant_controller_api.py b/pe/tb_pe_client/api/tenant_controller_api.py index 285372bc..b92d4fb5 100644 --- a/pe/tb_pe_client/api/tenant_controller_api.py +++ b/pe/tb_pe_client/api/tenant_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/tenant_profile_controller_api.py b/pe/tb_pe_client/api/tenant_profile_controller_api.py index b76288d2..5afb2264 100644 --- a/pe/tb_pe_client/api/tenant_profile_controller_api.py +++ b/pe/tb_pe_client/api/tenant_profile_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/translation_controller_api.py b/pe/tb_pe_client/api/translation_controller_api.py index 28f31724..bf4d579f 100644 --- a/pe/tb_pe_client/api/translation_controller_api.py +++ b/pe/tb_pe_client/api/translation_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/trendz_api_controller_api.py b/pe/tb_pe_client/api/trendz_api_controller_api.py index 884c04bc..040d4afd 100644 --- a/pe/tb_pe_client/api/trendz_api_controller_api.py +++ b/pe/tb_pe_client/api/trendz_api_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/trendz_controller_api.py b/pe/tb_pe_client/api/trendz_controller_api.py index eab4fce5..c738e48d 100644 --- a/pe/tb_pe_client/api/trendz_controller_api.py +++ b/pe/tb_pe_client/api/trendz_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/two_factor_auth_config_controller_api.py b/pe/tb_pe_client/api/two_factor_auth_config_controller_api.py index f50fc593..a0360147 100644 --- a/pe/tb_pe_client/api/two_factor_auth_config_controller_api.py +++ b/pe/tb_pe_client/api/two_factor_auth_config_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/two_factor_auth_controller_api.py b/pe/tb_pe_client/api/two_factor_auth_controller_api.py index 4604966e..ba69279c 100644 --- a/pe/tb_pe_client/api/two_factor_auth_controller_api.py +++ b/pe/tb_pe_client/api/two_factor_auth_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/ui_settings_controller_api.py b/pe/tb_pe_client/api/ui_settings_controller_api.py index b2c0954f..acc651d3 100644 --- a/pe/tb_pe_client/api/ui_settings_controller_api.py +++ b/pe/tb_pe_client/api/ui_settings_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/usage_info_controller_api.py b/pe/tb_pe_client/api/usage_info_controller_api.py index f73a61e7..f9cfa878 100644 --- a/pe/tb_pe_client/api/usage_info_controller_api.py +++ b/pe/tb_pe_client/api/usage_info_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/user_controller_api.py b/pe/tb_pe_client/api/user_controller_api.py index fa961a70..2b38c819 100644 --- a/pe/tb_pe_client/api/user_controller_api.py +++ b/pe/tb_pe_client/api/user_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/user_permissions_controller_api.py b/pe/tb_pe_client/api/user_permissions_controller_api.py index 2578ec00..fe7337c7 100644 --- a/pe/tb_pe_client/api/user_permissions_controller_api.py +++ b/pe/tb_pe_client/api/user_permissions_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/white_labeling_controller_api.py b/pe/tb_pe_client/api/white_labeling_controller_api.py index 6dfef570..b932250f 100644 --- a/pe/tb_pe_client/api/white_labeling_controller_api.py +++ b/pe/tb_pe_client/api/white_labeling_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/widget_type_controller_api.py b/pe/tb_pe_client/api/widget_type_controller_api.py index cc4733e1..fb93d511 100644 --- a/pe/tb_pe_client/api/widget_type_controller_api.py +++ b/pe/tb_pe_client/api/widget_type_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api/widgets_bundle_controller_api.py b/pe/tb_pe_client/api/widgets_bundle_controller_api.py index 648089cb..bc9fb170 100644 --- a/pe/tb_pe_client/api/widgets_bundle_controller_api.py +++ b/pe/tb_pe_client/api/widgets_bundle_controller_api.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/api_client.py b/pe/tb_pe_client/api_client.py index 51044c62..6dfad2d8 100644 --- a/pe/tb_pe_client/api_client.py +++ b/pe/tb_pe_client/api_client.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/client.py b/pe/tb_pe_client/client.py index 95f1c260..27502cc0 100644 --- a/pe/tb_pe_client/client.py +++ b/pe/tb_pe_client/client.py @@ -24,13 +24,15 @@ - _RetryingRESTClient for transparent HTTP 429 retry with exponential backoff - __getattr__ delegation to per-controller API classes via _CONTROLLER_MAP """ + import importlib + +from ._auth import _AuthManager +from ._controller_map import _CONTROLLER_ATTR_MAP, _CONTROLLER_MAP +from ._retry import _RetryingRESTClient from .api_client import ApiClient from .configuration import Configuration from .models.login_request import LoginRequest -from ._auth import _AuthManager -from ._retry import _RetryingRESTClient -from ._controller_map import _CONTROLLER_MAP, _CONTROLLER_ATTR_MAP class ThingsboardClient: @@ -120,6 +122,7 @@ def __init__( # JWT eager login if username is not None: from .api.login_endpoint_api import LoginEndpointApi + login_api = LoginEndpointApi(api_client) response = login_api.login(LoginRequest(username=username, password=password)) auth_manager.on_login(username, password, response.token, response.refresh_token) @@ -171,9 +174,7 @@ def __getattr__(self, name: str): controller = self._get_or_create_controller(cls_name, module_path) return getattr(controller, name) - raise AttributeError( - f"'{type(self).__name__}' object has no attribute {name!r}" - ) + raise AttributeError(f"'{type(self).__name__}' object has no attribute {name!r}") # ------------------------------------------------------------------ # Token accessors diff --git a/pe/tb_pe_client/client.pyi b/pe/tb_pe_client/client.pyi index e7612063..5af84193 100644 --- a/pe/tb_pe_client/client.pyi +++ b/pe/tb_pe_client/client.pyi @@ -22,7 +22,10 @@ from tb_pe_client.api_client import ApiClient # Controller class imports from tb_pe_client.api.admin_controller_api import AdminControllerApi +from tb_pe_client.api.ai_chat_controller_api import AiChatControllerApi from tb_pe_client.api.ai_model_controller_api import AiModelControllerApi +from tb_pe_client.api.ai_solution_controller_api import AiSolutionControllerApi +from tb_pe_client.api.ai_tool_controller_api import AiToolControllerApi from tb_pe_client.api.alarm_comment_controller_api import AlarmCommentControllerApi from tb_pe_client.api.alarm_controller_api import AlarmControllerApi from tb_pe_client.api.alarm_rule_controller_api import AlarmRuleControllerApi @@ -235,6 +238,34 @@ class ThingsboardClient: def send_test_sms_without_preload_content(self, test_sms_request: TestSmsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _send_test_sms_serialize(self, test_sms_request, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- AiChatControllerApi --- + @property + def ai_chat_controller(self) -> AiChatControllerApi: ... + def create_chat(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def create_chat_with_http_info(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def create_chat_without_preload_content(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _create_chat_serialize(self, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def delete_chat(self, chat_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... + def delete_chat_with_http_info(self, chat_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def delete_chat_without_preload_content(self, chat_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _delete_chat_serialize(self, chat_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_chat_messages(self, chat_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def get_chat_messages_with_http_info(self, chat_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def get_chat_messages_without_preload_content(self, chat_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_chat_messages_serialize(self, chat_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def list_chats(self, chat_type: ChatType, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def list_chats_with_http_info(self, chat_type: ChatType, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def list_chats_without_preload_content(self, chat_type: ChatType, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _list_chats_serialize(self, chat_type, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def send_chat_message(self, chat_id: UUID, x_authorization: StrictStr, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> List[object]: ... + def send_chat_message_with_http_info(self, chat_id: UUID, x_authorization: StrictStr, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[List[object]]: ... + def send_chat_message_without_preload_content(self, chat_id: UUID, x_authorization: StrictStr, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _send_chat_message_serialize(self, chat_id, x_authorization, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def update_chat(self, chat_id: UUID, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... + def update_chat_with_http_info(self, chat_id: UUID, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def update_chat_without_preload_content(self, chat_id: UUID, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _update_chat_serialize(self, chat_id, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- AiModelControllerApi --- @property def ai_model_controller(self) -> AiModelControllerApi: ... @@ -259,6 +290,58 @@ class ThingsboardClient: def send_chat_request_without_preload_content(self, tb_chat_request: TbChatRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... def _send_chat_request_serialize(self, tb_chat_request, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- AiSolutionControllerApi --- + @property + def ai_solution_controller(self) -> AiSolutionControllerApi: ... + def chat(self, solution_id: UUID, step: SolutionStep, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def chat_with_http_info(self, solution_id: UUID, step: SolutionStep, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def chat_without_preload_content(self, solution_id: UUID, step: SolutionStep, body: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _chat_serialize(self, solution_id, step, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def clear_step(self, solution_id: UUID, step: SolutionStep, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... + def clear_step_with_http_info(self, solution_id: UUID, step: SolutionStep, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def clear_step_without_preload_content(self, solution_id: UUID, step: SolutionStep, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _clear_step_serialize(self, solution_id, step, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def create_solution(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def create_solution_with_http_info(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def create_solution_without_preload_content(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _create_solution_serialize(self, solution_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def delete_solution(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> None: ... + def delete_solution_with_http_info(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[None]: ... + def delete_solution_without_preload_content(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _delete_solution_serialize(self, solution_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_solution(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def get_solution_with_http_info(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def get_solution_without_preload_content(self, solution_id: UUID, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_solution_serialize(self, solution_id, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def get_solutions(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def get_solutions_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def get_solutions_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _get_solutions_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def install_solution(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def install_solution_with_http_info(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def install_solution_without_preload_content(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _install_solution_serialize(self, solution_id, x_authorization, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def start_new(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def start_new_with_http_info(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def start_new_without_preload_content(self, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _start_new_serialize(self, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def uninstall_solution(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def uninstall_solution_with_http_info(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def uninstall_solution_without_preload_content(self, solution_id: UUID, x_authorization: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _uninstall_solution_serialize(self, solution_id, x_authorization, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + def update_data(self, solution_id: UUID, data_key: StrictStr, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def update_data_with_http_info(self, solution_id: UUID, data_key: StrictStr, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def update_data_without_preload_content(self, solution_id: UUID, data_key: StrictStr, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _update_data_serialize(self, solution_id, data_key, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + + # --- AiToolControllerApi --- + @property + def ai_tool_controller(self) -> AiToolControllerApi: ... + def resolve_tool_approval(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> object: ... + def resolve_tool_approval_with_http_info(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> ApiResponse[object]: ... + def resolve_tool_approval_without_preload_content(self, body: Optional[Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] ] ] = ..., _request_auth: Optional[Dict[StrictStr, Any]] = ..., _content_type: Optional[StrictStr] = ..., _headers: Optional[Dict[StrictStr, Any]] = ..., _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = ...) -> RESTResponseType: ... + def _resolve_tool_approval_serialize(self, body, _request_auth, _content_type, _headers, _host_index) -> RequestSerialized: ... + # --- AlarmCommentControllerApi --- @property def alarm_comment_controller(self) -> AlarmCommentControllerApi: ... diff --git a/pe/tb_pe_client/configuration.py b/pe/tb_pe_client/configuration.py index 452b60dd..81d1b6a1 100644 --- a/pe/tb_pe_client/configuration.py +++ b/pe/tb_pe_client/configuration.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -549,7 +549,7 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 4.3.1.2PE-SNAPSHOT\n"\ + "Version of the API: 4.3.1.2PE\n"\ "SDK Package Version: 1.0.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/pe/tb_pe_client/exceptions.py b/pe/tb_pe_client/exceptions.py index f417b720..acfb34cd 100644 --- a/pe/tb_pe_client/exceptions.py +++ b/pe/tb_pe_client/exceptions.py @@ -18,7 +18,7 @@ ThingsBoard Professional Edition IoT platform REST API documentation. - The version of the OpenAPI document: 4.3.1.2PE-SNAPSHOT + The version of the OpenAPI document: 4.3.1.2PE Contact: info@thingsboard.io Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/pe/tb_pe_client/models/__init__.py b/pe/tb_pe_client/models/__init__.py index b2cae734..07fdf848 100644 --- a/pe/tb_pe_client/models/__init__.py +++ b/pe/tb_pe_client/models/__init__.py @@ -183,6 +183,7 @@ "ChartLabelPosition", "ChartLineType", "ChartShape", + "ChatType", "CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration", "ChecksumAlgorithm", "ClaimRequest", @@ -801,6 +802,7 @@ "SolutionExportResponse", "SolutionImportResult", "SolutionInstallResponse", + "SolutionStep", "SolutionTemplateLevel", "SolutionValidationResult", "SpecificTimeSchedule", @@ -1129,6 +1131,7 @@ from tb_pe_client.models.chart_label_position import ChartLabelPosition from tb_pe_client.models.chart_line_type import ChartLineType from tb_pe_client.models.chart_shape import ChartShape + from tb_pe_client.models.chat_type import ChatType from tb_pe_client.models.check_pre_provisioned_devices_device_profile_provision_configuration import CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration from tb_pe_client.models.checksum_algorithm import ChecksumAlgorithm from tb_pe_client.models.claim_request import ClaimRequest @@ -1747,6 +1750,7 @@ from tb_pe_client.models.solution_export_response import SolutionExportResponse from tb_pe_client.models.solution_import_result import SolutionImportResult from tb_pe_client.models.solution_install_response import SolutionInstallResponse + from tb_pe_client.models.solution_step import SolutionStep from tb_pe_client.models.solution_template_level import SolutionTemplateLevel from tb_pe_client.models.solution_validation_result import SolutionValidationResult from tb_pe_client.models.specific_time_schedule import SpecificTimeSchedule @@ -2074,6 +2078,7 @@ "ChartLabelPosition": "tb_pe_client.models.chart_label_position", "ChartLineType": "tb_pe_client.models.chart_line_type", "ChartShape": "tb_pe_client.models.chart_shape", + "ChatType": "tb_pe_client.models.chat_type", "CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration": "tb_pe_client.models.check_pre_provisioned_devices_device_profile_provision_configuration", "ChecksumAlgorithm": "tb_pe_client.models.checksum_algorithm", "ClaimRequest": "tb_pe_client.models.claim_request", @@ -2692,6 +2697,7 @@ "SolutionExportResponse": "tb_pe_client.models.solution_export_response", "SolutionImportResult": "tb_pe_client.models.solution_import_result", "SolutionInstallResponse": "tb_pe_client.models.solution_install_response", + "SolutionStep": "tb_pe_client.models.solution_step", "SolutionTemplateLevel": "tb_pe_client.models.solution_template_level", "SolutionValidationResult": "tb_pe_client.models.solution_validation_result", "SpecificTimeSchedule": "tb_pe_client.models.specific_time_schedule", diff --git a/pe/tb_pe_client/models/api_feature.py b/pe/tb_pe_client/models/api_feature.py index 01e85489..44ac3a15 100644 --- a/pe/tb_pe_client/models/api_feature.py +++ b/pe/tb_pe_client/models/api_feature.py @@ -39,6 +39,7 @@ class ApiFeature(str, Enum): SMS = 'SMS' ALARM = 'ALARM' REPORT = 'REPORT' + AI = 'AI' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/pe/tb_pe_client/models/available_entity_keys_v2.py b/pe/tb_pe_client/models/available_entity_keys_v2.py index c7b59628..edc98ab6 100644 --- a/pe/tb_pe_client/models/available_entity_keys_v2.py +++ b/pe/tb_pe_client/models/available_entity_keys_v2.py @@ -21,7 +21,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field +from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional from tb_pe_client.models.entity_type import EntityType from tb_pe_client.models.key_info import KeyInfo @@ -32,10 +32,11 @@ class AvailableEntityKeysV2(BaseModel): """ Contains unique time series and attribute key names discovered from entities matching a query, optionally including a sample value for each key. """ # noqa: E501 + total_entities: StrictInt = Field(description="Total number of entities that matched the query filter.", serialization_alias="totalEntities") entity_types: List[EntityType] = Field(description="Set of entity types found among the matched entities.", serialization_alias="entityTypes") timeseries: Optional[List[KeyInfo]] = None attributes: Optional[Dict[str, List[KeyInfo]]] = Field(default=None, description="Map of attribute scope to the list of unique attribute keys available on the matched entities. Only scopes supported by the matched entity types are included. Omitted when attribute keys were not requested or when none of the requested scopes apply to the matched entity types.") - __properties: ClassVar[List[str]] = ["entityTypes", "timeseries", "attributes"] + __properties: ClassVar[List[str]] = ["totalEntities", "entityTypes", "timeseries", "attributes"] model_config = ConfigDict( populate_by_name=True, @@ -109,6 +110,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "total_entities": obj.get("totalEntities"), "entity_types": obj.get("entityTypes"), "timeseries": [KeyInfo.from_dict(_item) for _item in obj["timeseries"]] if obj.get("timeseries") is not None else None, "attributes": dict( diff --git a/pe/tb_pe_client/models/chat_type.py b/pe/tb_pe_client/models/chat_type.py new file mode 100644 index 00000000..2b0d5d30 --- /dev/null +++ b/pe/tb_pe_client/models/chat_type.py @@ -0,0 +1,41 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ChatType(str, Enum): + """ + ChatType + """ + + """ + allowed enum values + """ + GENERIC = 'GENERIC' + SOLUTION_BUILDER = 'SOLUTION_BUILDER' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ChatType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/pe/tb_pe_client/models/default_tenant_profile_configuration.py b/pe/tb_pe_client/models/default_tenant_profile_configuration.py index 648e3cf9..32cef31e 100644 --- a/pe/tb_pe_client/models/default_tenant_profile_configuration.py +++ b/pe/tb_pe_client/models/default_tenant_profile_configuration.py @@ -77,6 +77,7 @@ class DefaultTenantProfileConfiguration(TenantProfileConfiguration): max_sms: Optional[StrictInt] = Field(default=None, serialization_alias="maxSms") max_created_alarms: Optional[StrictInt] = Field(default=None, serialization_alias="maxCreatedAlarms") max_generated_reports: Optional[StrictInt] = Field(default=None, serialization_alias="maxGeneratedReports") + max_ai_credits: Optional[StrictInt] = Field(default=None, serialization_alias="maxAiCredits") tenant_server_rest_limits_configuration: Optional[StrictStr] = Field(default=None, serialization_alias="tenantServerRestLimitsConfiguration") customer_server_rest_limits_configuration: Optional[StrictStr] = Field(default=None, serialization_alias="customerServerRestLimitsConfiguration") max_ws_sessions_per_tenant: Optional[StrictInt] = Field(default=None, serialization_alias="maxWsSessionsPerTenant") @@ -118,7 +119,8 @@ class DefaultTenantProfileConfiguration(TenantProfileConfiguration): intermediate_aggregation_interval_in_sec_for_cf: Optional[StrictInt] = Field(default=None, serialization_alias="intermediateAggregationIntervalInSecForCF") cf_reevaluation_check_interval: Optional[StrictInt] = Field(default=None, serialization_alias="cfReevaluationCheckInterval") alarms_reevaluation_interval: Optional[StrictInt] = Field(default=None, serialization_alias="alarmsReevaluationInterval") - __properties: ClassVar[List[str]] = ["type", "maxDevices", "maxAssets", "maxCustomers", "maxUsers", "maxDashboards", "maxRuleChains", "maxEdges", "maxResourcesInBytes", "maxOtaPackagesInBytes", "maxResourceSize", "maxReportSizeInBytes", "maxIntegrations", "maxConverters", "maxSchedulerEvents", "transportTenantMsgRateLimit", "transportTenantTelemetryMsgRateLimit", "transportTenantTelemetryDataPointsRateLimit", "transportDeviceMsgRateLimit", "transportDeviceTelemetryMsgRateLimit", "transportDeviceTelemetryDataPointsRateLimit", "transportGatewayMsgRateLimit", "transportGatewayTelemetryMsgRateLimit", "transportGatewayTelemetryDataPointsRateLimit", "transportGatewayDeviceMsgRateLimit", "transportGatewayDeviceTelemetryMsgRateLimit", "transportGatewayDeviceTelemetryDataPointsRateLimit", "integrationMsgsPerTenantRateLimit", "integrationMsgsPerDeviceRateLimit", "integrationMsgsPerAssetRateLimit", "tenantEntityExportRateLimit", "tenantEntityImportRateLimit", "tenantNotificationRequestsRateLimit", "tenantNotificationRequestsPerRuleRateLimit", "maxTransportMessages", "maxTransportDataPoints", "maxREExecutions", "maxJSExecutions", "maxTbelExecutions", "maxDPStorageDays", "maxRuleNodeExecutionsPerMessage", "maxDebugModeDurationMinutes", "maxEmails", "smsEnabled", "maxSms", "maxCreatedAlarms", "maxGeneratedReports", "tenantServerRestLimitsConfiguration", "customerServerRestLimitsConfiguration", "maxWsSessionsPerTenant", "maxWsSessionsPerCustomer", "maxWsSessionsPerRegularUser", "maxWsSessionsPerPublicUser", "wsMsgQueueLimitPerSession", "maxWsSubscriptionsPerTenant", "maxWsSubscriptionsPerCustomer", "maxWsSubscriptionsPerRegularUser", "maxWsSubscriptionsPerPublicUser", "wsUpdatesPerSessionRateLimit", "cassandraReadQueryTenantCoreRateLimits", "cassandraWriteQueryTenantCoreRateLimits", "cassandraReadQueryTenantRuleEngineRateLimits", "cassandraWriteQueryTenantRuleEngineRateLimits", "edgeEventRateLimits", "edgeEventRateLimitsPerEdge", "edgeUplinkMessagesRateLimits", "edgeUplinkMessagesRateLimitsPerEdge", "defaultStorageTtlDays", "alarmsTtlDays", "rpcTtlDays", "queueStatsTtlDays", "ruleEngineExceptionsTtlDays", "blobEntityTtlDays", "reportTtlDays", "warnThreshold", "maxCalculatedFieldsPerEntity", "maxArgumentsPerCF", "minAllowedScheduledUpdateIntervalInSecForCF", "maxRelationLevelPerCfArgument", "maxRelatedEntitiesToReturnPerCfArgument", "maxDataPointsPerRollingArg", "maxStateSizeInKBytes", "maxSingleValueArgumentSizeInKBytes", "minAllowedDeduplicationIntervalInSecForCF", "minAllowedAggregationIntervalInSecForCF", "intermediateAggregationIntervalInSecForCF", "cfReevaluationCheckInterval", "alarmsReevaluationInterval"] + ai_chat_requests_per_tenant_rate_limit: Optional[StrictStr] = Field(default=None, serialization_alias="aiChatRequestsPerTenantRateLimit") + __properties: ClassVar[List[str]] = ["type", "maxDevices", "maxAssets", "maxCustomers", "maxUsers", "maxDashboards", "maxRuleChains", "maxEdges", "maxResourcesInBytes", "maxOtaPackagesInBytes", "maxResourceSize", "maxReportSizeInBytes", "maxIntegrations", "maxConverters", "maxSchedulerEvents", "transportTenantMsgRateLimit", "transportTenantTelemetryMsgRateLimit", "transportTenantTelemetryDataPointsRateLimit", "transportDeviceMsgRateLimit", "transportDeviceTelemetryMsgRateLimit", "transportDeviceTelemetryDataPointsRateLimit", "transportGatewayMsgRateLimit", "transportGatewayTelemetryMsgRateLimit", "transportGatewayTelemetryDataPointsRateLimit", "transportGatewayDeviceMsgRateLimit", "transportGatewayDeviceTelemetryMsgRateLimit", "transportGatewayDeviceTelemetryDataPointsRateLimit", "integrationMsgsPerTenantRateLimit", "integrationMsgsPerDeviceRateLimit", "integrationMsgsPerAssetRateLimit", "tenantEntityExportRateLimit", "tenantEntityImportRateLimit", "tenantNotificationRequestsRateLimit", "tenantNotificationRequestsPerRuleRateLimit", "maxTransportMessages", "maxTransportDataPoints", "maxREExecutions", "maxJSExecutions", "maxTbelExecutions", "maxDPStorageDays", "maxRuleNodeExecutionsPerMessage", "maxDebugModeDurationMinutes", "maxEmails", "smsEnabled", "maxSms", "maxCreatedAlarms", "maxGeneratedReports", "maxAiCredits", "tenantServerRestLimitsConfiguration", "customerServerRestLimitsConfiguration", "maxWsSessionsPerTenant", "maxWsSessionsPerCustomer", "maxWsSessionsPerRegularUser", "maxWsSessionsPerPublicUser", "wsMsgQueueLimitPerSession", "maxWsSubscriptionsPerTenant", "maxWsSubscriptionsPerCustomer", "maxWsSubscriptionsPerRegularUser", "maxWsSubscriptionsPerPublicUser", "wsUpdatesPerSessionRateLimit", "cassandraReadQueryTenantCoreRateLimits", "cassandraWriteQueryTenantCoreRateLimits", "cassandraReadQueryTenantRuleEngineRateLimits", "cassandraWriteQueryTenantRuleEngineRateLimits", "edgeEventRateLimits", "edgeEventRateLimitsPerEdge", "edgeUplinkMessagesRateLimits", "edgeUplinkMessagesRateLimitsPerEdge", "defaultStorageTtlDays", "alarmsTtlDays", "rpcTtlDays", "queueStatsTtlDays", "ruleEngineExceptionsTtlDays", "blobEntityTtlDays", "reportTtlDays", "warnThreshold", "maxCalculatedFieldsPerEntity", "maxArgumentsPerCF", "minAllowedScheduledUpdateIntervalInSecForCF", "maxRelationLevelPerCfArgument", "maxRelatedEntitiesToReturnPerCfArgument", "maxDataPointsPerRollingArg", "maxStateSizeInKBytes", "maxSingleValueArgumentSizeInKBytes", "minAllowedDeduplicationIntervalInSecForCF", "minAllowedAggregationIntervalInSecForCF", "intermediateAggregationIntervalInSecForCF", "cfReevaluationCheckInterval", "alarmsReevaluationInterval", "aiChatRequestsPerTenantRateLimit"] model_config = ConfigDict( populate_by_name=True, @@ -223,6 +225,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "max_sms": obj.get("maxSms"), "max_created_alarms": obj.get("maxCreatedAlarms"), "max_generated_reports": obj.get("maxGeneratedReports"), + "max_ai_credits": obj.get("maxAiCredits"), "tenant_server_rest_limits_configuration": obj.get("tenantServerRestLimitsConfiguration"), "customer_server_rest_limits_configuration": obj.get("customerServerRestLimitsConfiguration"), "max_ws_sessions_per_tenant": obj.get("maxWsSessionsPerTenant"), @@ -263,7 +266,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "min_allowed_aggregation_interval_in_sec_for_cf": obj.get("minAllowedAggregationIntervalInSecForCF"), "intermediate_aggregation_interval_in_sec_for_cf": obj.get("intermediateAggregationIntervalInSecForCF"), "cf_reevaluation_check_interval": obj.get("cfReevaluationCheckInterval"), - "alarms_reevaluation_interval": obj.get("alarmsReevaluationInterval") + "alarms_reevaluation_interval": obj.get("alarmsReevaluationInterval"), + "ai_chat_requests_per_tenant_rate_limit": obj.get("aiChatRequestsPerTenantRateLimit") }) return _obj diff --git a/pe/tb_pe_client/models/limited_api.py b/pe/tb_pe_client/models/limited_api.py index 69b80ace..1ae16b81 100644 --- a/pe/tb_pe_client/models/limited_api.py +++ b/pe/tb_pe_client/models/limited_api.py @@ -65,6 +65,7 @@ class LimitedApi(str, Enum): WS_SUBSCRIPTIONS = 'WS_SUBSCRIPTIONS' CALCULATED_FIELD_DEBUG_EVENTS = 'CALCULATED_FIELD_DEBUG_EVENTS' TRENDZ_PUBLIC_SYNC = 'TRENDZ_PUBLIC_SYNC' + AI_CHAT_REQUESTS = 'AI_CHAT_REQUESTS' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/pe/tb_pe_client/models/resource.py b/pe/tb_pe_client/models/resource.py index d89f013b..029b0301 100644 --- a/pe/tb_pe_client/models/resource.py +++ b/pe/tb_pe_client/models/resource.py @@ -82,6 +82,7 @@ class Resource(str, Enum): REPORT_TEMPLATE = 'REPORT_TEMPLATE' REPORT = 'REPORT' AI_MODEL = 'AI_MODEL' + AI = 'AI' API_KEY = 'API_KEY' @classmethod diff --git a/pe/tb_pe_client/models/solution_step.py b/pe/tb_pe_client/models/solution_step.py new file mode 100644 index 00000000..7cebdfa4 --- /dev/null +++ b/pe/tb_pe_client/models/solution_step.py @@ -0,0 +1,41 @@ +# +# 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. +# +# noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class SolutionStep(str, Enum): + """ + SolutionStep + """ + + """ + allowed enum values + """ + INITIAL_CONFIGURATION = 'INITIAL_CONFIGURATION' + DASHBOARDS_CONFIGURATION = 'DASHBOARDS_CONFIGURATION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of SolutionStep from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/pe/tb_pe_client/models/usage_info.py b/pe/tb_pe_client/models/usage_info.py index 9ee627fb..35d4697e 100644 --- a/pe/tb_pe_client/models/usage_info.py +++ b/pe/tb_pe_client/models/usage_info.py @@ -57,7 +57,9 @@ class UsageInfo(BaseModel): max_alarms: Optional[StrictInt] = Field(default=None, serialization_alias="maxAlarms") reports: Optional[StrictInt] = None max_reports: Optional[StrictInt] = Field(default=None, serialization_alias="maxReports") - __properties: ClassVar[List[str]] = ["devices", "maxDevices", "assets", "maxAssets", "customers", "maxCustomers", "users", "maxUsers", "dashboards", "maxDashboards", "edges", "maxEdges", "transportMessages", "maxTransportMessages", "jsExecutions", "tbelExecutions", "maxJsExecutions", "maxTbelExecutions", "emails", "maxEmails", "sms", "maxSms", "smsEnabled", "alarms", "maxAlarms", "reports", "maxReports"] + ai_credits: Optional[StrictInt] = Field(default=None, serialization_alias="aiCredits") + max_ai_credits: Optional[StrictInt] = Field(default=None, serialization_alias="maxAiCredits") + __properties: ClassVar[List[str]] = ["devices", "maxDevices", "assets", "maxAssets", "customers", "maxCustomers", "users", "maxUsers", "dashboards", "maxDashboards", "edges", "maxEdges", "transportMessages", "maxTransportMessages", "jsExecutions", "tbelExecutions", "maxJsExecutions", "maxTbelExecutions", "emails", "maxEmails", "sms", "maxSms", "smsEnabled", "alarms", "maxAlarms", "reports", "maxReports", "aiCredits", "maxAiCredits"] model_config = ConfigDict( populate_by_name=True, @@ -141,7 +143,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "alarms": obj.get("alarms"), "max_alarms": obj.get("maxAlarms"), "reports": obj.get("reports"), - "max_reports": obj.get("maxReports") + "max_reports": obj.get("maxReports"), + "ai_credits": obj.get("aiCredits"), + "max_ai_credits": obj.get("maxAiCredits") }) return _obj