diff --git a/LLM Integration/__pycache__/main.cpython-313.pyc b/LLM Integration/__pycache__/main.cpython-313.pyc new file mode 100644 index 0000000..73eb26f Binary files /dev/null and b/LLM Integration/__pycache__/main.cpython-313.pyc differ diff --git a/LLM Integration/__pycache__/model.cpython-313.pyc b/LLM Integration/__pycache__/model.cpython-313.pyc new file mode 100644 index 0000000..0a9ebe7 Binary files /dev/null and b/LLM Integration/__pycache__/model.cpython-313.pyc differ diff --git a/LLM Integration/__pycache__/thingsboard.cpython-313.pyc b/LLM Integration/__pycache__/thingsboard.cpython-313.pyc new file mode 100644 index 0000000..eec72a7 Binary files /dev/null and b/LLM Integration/__pycache__/thingsboard.cpython-313.pyc differ diff --git a/LLM Integration/examples/openapi-servers b/LLM Integration/examples/openapi-servers new file mode 160000 index 0000000..2b7844d --- /dev/null +++ b/LLM Integration/examples/openapi-servers @@ -0,0 +1 @@ +Subproject commit 2b7844d6340e5032fb7b0fd8f46918fc0ce71685 diff --git a/LLM Integration/main.py b/LLM Integration/main.py new file mode 100644 index 0000000..c3cef15 --- /dev/null +++ b/LLM Integration/main.py @@ -0,0 +1,95 @@ +import json +import httpx +from fastapi import FastAPI, Request +from fastapi.responses import JSONResponse +from fastapi.middleware.cors import CORSMiddleware +from pydantic import BaseModel +from typing import Dict, Any +import uvicorn + +from dotenv import load_dotenv +load_dotenv() + +app = FastAPI() + +origins = ["*"] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +# Load OpenAPI spec from IBM COS API +OPENAPI_URL = "https://thingsboard.cloud/v3/api-docs/thingsboard" + +class ToolCallInput(BaseModel): + tool_name: str + input: Dict[str, Any] + +# In-memory registry of tools +tool_registry = {} + +async def fetch_openapi_spec(): + async with httpx.AsyncClient() as client: + response = await client.get(OPENAPI_URL) + response.raise_for_status() + return response.json() + +def generate_tools_from_openapi(openapi: Dict[str, Any]): + paths = openapi.get("paths", {}) + if not paths: + raise ValueError(f"Path is empty or invalid for {service_name}") + + for path, methods in paths.items(): + for method, details in methods.items(): + operation_id = details.get("operationId") or f"{method}_{path.replace('/', '_')}" + summary = details.get("summary", "") + + # Create a basic tool function with a name and HTTP method + def make_tool(p, m): + async def tool_func(input_data): + region = input_data.get("region", "us-south") + headers = input_data.get("headers", {}) + body = input_data.get("body", None) + params = input_data.get("params", None) + params = input_data.get("params", {}) + formatted_path = p + for key, value in params.items(): + formatted_path = formatted_path.replace(f"{{{key}}}", value) + url = f"https://thingsboard.cloud/v3{formatted_path}" + async with httpx.AsyncClient() as client: + req = client.build_request(m.upper(), url, headers=headers, json=body, params=params) + res = await client.send(req) + return {"status_code": res.status_code, "body": res.text} + return tool_func + + tool_registry[operation_id] = make_tool(path, method) + +@app.post("/invoke") +async def invoke_tool(call: ToolCallInput): + tool_name = call.tool_name + input_data = call.input + print(input_data) + if tool_name not in tool_registry: + return JSONResponse(status_code=404, content={"error": "Tool not found"}) + + tool_func = tool_registry[tool_name] + try: + result = await tool_func(input_data) + return JSONResponse(content={"output": result}) + except Exception as e: + return JSONResponse(status_code=500, content={"error": str(e)}) + +@app.get("/tools") +async def list_tools(): + return JSONResponse(content={"tools": list(tool_registry.keys())}) + +@app.on_event("startup") +async def startup(): + openapi = await fetch_openapi_spec() + generate_tools_from_openapi(openapi) + print(f"Registered tools: {list(tool_registry.keys())}") diff --git a/LLM Integration/model.py b/LLM Integration/model.py new file mode 100644 index 0000000..7e2ba4e --- /dev/null +++ b/LLM Integration/model.py @@ -0,0 +1,10357 @@ +# generated by datamodel-codegen: +# filename: thingsboardAPI.json +# timestamp: 2025-05-21T15:27:01+00:00 + +from __future__ import annotations + +from enum import Enum +from typing import Any, Dict, List, Optional, Union +from uuid import UUID + +from pydantic import BaseModel, RootModel, Field, confloat, conint, constr + + +class AcmeCertificateId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class ActivateUserRequest(BaseModel): + activateToken: Optional[str] = Field( + None, description='The activate token to verify', example='AAB254FF67D..' + ) + password: Optional[str] = Field( + None, description='The new password to set', example='secret' + ) + + +class AdminSettingsId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class Severity(Enum): + CRITICAL = 'CRITICAL' + MAJOR = 'MAJOR' + MINOR = 'MINOR' + WARNING = 'WARNING' + INDETERMINATE = 'INDETERMINATE' + + +class Status(Enum): + ACTIVE_UNACK = 'ACTIVE_UNACK' + ACTIVE_ACK = 'ACTIVE_ACK' + CLEARED_UNACK = 'CLEARED_UNACK' + CLEARED_ACK = 'CLEARED_ACK' + + +class AlarmSeverity(Enum): + CRITICAL = 'CRITICAL' + MAJOR = 'MAJOR' + MINOR = 'MINOR' + WARNING = 'WARNING' + INDETERMINATE = 'INDETERMINATE' + + +class AlarmStatus(Enum): + ANY = 'ANY' + ACTIVE = 'ACTIVE' + CLEARED = 'CLEARED' + ACK = 'ACK' + UNACK = 'UNACK' + + +class NotifyOnEnum(Enum): + ASSIGNED = 'ASSIGNED' + UNASSIGNED = 'UNASSIGNED' + + +class Type(Enum): + SYSTEM = 'SYSTEM' + OTHER = 'OTHER' + + +class AlarmCommentId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class ValueType(Enum): + STRING = 'STRING' + NUMERIC = 'NUMERIC' + BOOLEAN = 'BOOLEAN' + DATE_TIME = 'DATE_TIME' + + +class Type2(Enum): + ATTRIBUTE = 'ATTRIBUTE' + TIME_SERIES = 'TIME_SERIES' + ENTITY_FIELD = 'ENTITY_FIELD' + CONSTANT = 'CONSTANT' + + +class AlarmConditionFilterKey(BaseModel): + type: Optional[Type2] = Field( + None, description='The key type', example='TIME_SERIES' + ) + key: Optional[str] = Field( + None, description='String value representing the key', example='temp' + ) + + +class AlarmConditionSpec(BaseModel): + type: str + + +class StatusListEnum(Enum): + ANY = 'ANY' + ACTIVE = 'ACTIVE' + CLEARED = 'CLEARED' + ACK = 'ACK' + UNACK = 'UNACK' + + +class SeverityListEnum(Enum): + CRITICAL = 'CRITICAL' + MAJOR = 'MAJOR' + MINOR = 'MINOR' + WARNING = 'WARNING' + INDETERMINATE = 'INDETERMINATE' + + +class EntityType(Enum): + ALARM = 'ALARM' + + +class AlarmId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType = Field(..., description='string', example='ALARM') + + +class NotifyOnEnum1(Enum): + CREATED = 'CREATED' + SEVERITY_CHANGED = 'SEVERITY_CHANGED' + ACKNOWLEDGED = 'ACKNOWLEDGED' + CLEARED = 'CLEARED' + + +class Type3(Enum): + ANY_TIME = 'ANY_TIME' + SPECIFIC_TIME = 'SPECIFIC_TIME' + CUSTOM = 'CUSTOM' + + +class OperationsByResourceEnum(Enum): + ALL = 'ALL' + CREATE = 'CREATE' + READ = 'READ' + WRITE = 'WRITE' + DELETE = 'DELETE' + RPC_CALL = 'RPC_CALL' + READ_CREDENTIALS = 'READ_CREDENTIALS' + WRITE_CREDENTIALS = 'WRITE_CREDENTIALS' + READ_ATTRIBUTES = 'READ_ATTRIBUTES' + WRITE_ATTRIBUTES = 'WRITE_ATTRIBUTES' + READ_TELEMETRY = 'READ_TELEMETRY' + WRITE_TELEMETRY = 'WRITE_TELEMETRY' + ADD_TO_GROUP = 'ADD_TO_GROUP' + REMOVE_FROM_GROUP = 'REMOVE_FROM_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + IMPERSONATE = 'IMPERSONATE' + CLAIM_DEVICES = 'CLAIM_DEVICES' + SHARE_GROUP = 'SHARE_GROUP' + ASSIGN_TO_TENANT = 'ASSIGN_TO_TENANT' + READ_CALCULATED_FIELD = 'READ_CALCULATED_FIELD' + WRITE_CALCULATED_FIELD = 'WRITE_CALCULATED_FIELD' + + +class AllowedForGroupRoleOperation(Enum): + ALL = 'ALL' + CREATE = 'CREATE' + READ = 'READ' + WRITE = 'WRITE' + DELETE = 'DELETE' + RPC_CALL = 'RPC_CALL' + READ_CREDENTIALS = 'READ_CREDENTIALS' + WRITE_CREDENTIALS = 'WRITE_CREDENTIALS' + READ_ATTRIBUTES = 'READ_ATTRIBUTES' + WRITE_ATTRIBUTES = 'WRITE_ATTRIBUTES' + READ_TELEMETRY = 'READ_TELEMETRY' + WRITE_TELEMETRY = 'WRITE_TELEMETRY' + ADD_TO_GROUP = 'ADD_TO_GROUP' + REMOVE_FROM_GROUP = 'REMOVE_FROM_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + IMPERSONATE = 'IMPERSONATE' + CLAIM_DEVICES = 'CLAIM_DEVICES' + SHARE_GROUP = 'SHARE_GROUP' + ASSIGN_TO_TENANT = 'ASSIGN_TO_TENANT' + READ_CALCULATED_FIELD = 'READ_CALCULATED_FIELD' + WRITE_CALCULATED_FIELD = 'WRITE_CALCULATED_FIELD' + + +class AllowedForGroupOwnerOnlyOperation(Enum): + ALL = 'ALL' + CREATE = 'CREATE' + READ = 'READ' + WRITE = 'WRITE' + DELETE = 'DELETE' + RPC_CALL = 'RPC_CALL' + READ_CREDENTIALS = 'READ_CREDENTIALS' + WRITE_CREDENTIALS = 'WRITE_CREDENTIALS' + READ_ATTRIBUTES = 'READ_ATTRIBUTES' + WRITE_ATTRIBUTES = 'WRITE_ATTRIBUTES' + READ_TELEMETRY = 'READ_TELEMETRY' + WRITE_TELEMETRY = 'WRITE_TELEMETRY' + ADD_TO_GROUP = 'ADD_TO_GROUP' + REMOVE_FROM_GROUP = 'REMOVE_FROM_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + IMPERSONATE = 'IMPERSONATE' + CLAIM_DEVICES = 'CLAIM_DEVICES' + SHARE_GROUP = 'SHARE_GROUP' + ASSIGN_TO_TENANT = 'ASSIGN_TO_TENANT' + READ_CALCULATED_FIELD = 'READ_CALCULATED_FIELD' + WRITE_CALCULATED_FIELD = 'WRITE_CALCULATED_FIELD' + + +class AllowedForGroupOwnerOnlyGroupOperation(Enum): + ALL = 'ALL' + CREATE = 'CREATE' + READ = 'READ' + WRITE = 'WRITE' + DELETE = 'DELETE' + RPC_CALL = 'RPC_CALL' + READ_CREDENTIALS = 'READ_CREDENTIALS' + WRITE_CREDENTIALS = 'WRITE_CREDENTIALS' + READ_ATTRIBUTES = 'READ_ATTRIBUTES' + WRITE_ATTRIBUTES = 'WRITE_ATTRIBUTES' + READ_TELEMETRY = 'READ_TELEMETRY' + WRITE_TELEMETRY = 'WRITE_TELEMETRY' + ADD_TO_GROUP = 'ADD_TO_GROUP' + REMOVE_FROM_GROUP = 'REMOVE_FROM_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + IMPERSONATE = 'IMPERSONATE' + CLAIM_DEVICES = 'CLAIM_DEVICES' + SHARE_GROUP = 'SHARE_GROUP' + ASSIGN_TO_TENANT = 'ASSIGN_TO_TENANT' + READ_CALCULATED_FIELD = 'READ_CALCULATED_FIELD' + WRITE_CALCULATED_FIELD = 'WRITE_CALCULATED_FIELD' + + +class AllowedResource(Enum): + ALL = 'ALL' + PROFILE = 'PROFILE' + ADMIN_SETTINGS = 'ADMIN_SETTINGS' + ALARM = 'ALARM' + DEVICE = 'DEVICE' + ASSET = 'ASSET' + CUSTOMER = 'CUSTOMER' + DASHBOARD = 'DASHBOARD' + ENTITY_VIEW = 'ENTITY_VIEW' + EDGE = 'EDGE' + TENANT = 'TENANT' + RULE_CHAIN = 'RULE_CHAIN' + USER = 'USER' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + OAUTH2_CONFIGURATION_TEMPLATE = 'OAUTH2_CONFIGURATION_TEMPLATE' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + CUSTOMER_GROUP = 'CUSTOMER_GROUP' + DEVICE_GROUP = 'DEVICE_GROUP' + ASSET_GROUP = 'ASSET_GROUP' + USER_GROUP = 'USER_GROUP' + ENTITY_VIEW_GROUP = 'ENTITY_VIEW_GROUP' + EDGE_GROUP = 'EDGE_GROUP' + DASHBOARD_GROUP = 'DASHBOARD_GROUP' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + WHITE_LABELING = 'WHITE_LABELING' + AUDIT_LOG = 'AUDIT_LOG' + API_USAGE_STATE = 'API_USAGE_STATE' + BILLING = 'BILLING' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + QUEUE = 'QUEUE' + QUEUE_STATS = 'QUEUE_STATS' + VERSION_CONTROL = 'VERSION_CONTROL' + NOTIFICATION = 'NOTIFICATION' + MOBILE_APP_SETTINGS = 'MOBILE_APP_SETTINGS' + CUSTOM_MENU = 'CUSTOM_MENU' + + +class ApiFeature(Enum): + TRANSPORT = 'TRANSPORT' + DB = 'DB' + RE = 'RE' + JS = 'JS' + TBEL = 'TBEL' + EMAIL = 'EMAIL' + SMS = 'SMS' + ALARM = 'ALARM' + + +class NotifyOnEnum2(Enum): + ENABLED = 'ENABLED' + WARNING = 'WARNING' + DISABLED = 'DISABLED' + + +class ArrayNode(RootModel): + root: Any + + +class EntityType1(Enum): + ASSET = 'ASSET' + + +class AssetId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType1 = Field(..., description='string', example='ASSET') + + +class EntityType2(Enum): + ASSET_PROFILE = 'ASSET_PROFILE' + + +class AssetProfileId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType2 = Field(..., description='string', example='ASSET_PROFILE') + + +class Direction(Enum): + FROM = 'FROM' + TO = 'TO' + + +class AttributeExportData(BaseModel): + key: Optional[str] = None + lastUpdateTs: Optional[int] = None + booleanValue: Optional[bool] = None + strValue: Optional[str] = None + longValue: Optional[int] = None + doubleValue: Optional[float] = None + jsonValue: Optional[str] = None + + +class AttributesEntityView(BaseModel): + cs: List[str] = Field( + ..., + description='List of client-side attribute keys to expose', + example=['currentConfiguration'], + ) + ss: List[str] = Field( + ..., + description='List of server-side attribute keys to expose', + example=['model'], + ) + sh: List[str] = Field( + ..., + description='List of shared attribute keys to expose', + example=['targetConfiguration'], + ) + + +class ActionType(Enum): + ADDED = 'ADDED' + DELETED = 'DELETED' + UPDATED = 'UPDATED' + ATTRIBUTES_UPDATED = 'ATTRIBUTES_UPDATED' + ATTRIBUTES_DELETED = 'ATTRIBUTES_DELETED' + TIMESERIES_UPDATED = 'TIMESERIES_UPDATED' + TIMESERIES_DELETED = 'TIMESERIES_DELETED' + RPC_CALL = 'RPC_CALL' + CREDENTIALS_UPDATED = 'CREDENTIALS_UPDATED' + ASSIGNED_TO_CUSTOMER = 'ASSIGNED_TO_CUSTOMER' + UNASSIGNED_FROM_CUSTOMER = 'UNASSIGNED_FROM_CUSTOMER' + CHANGE_OWNER = 'CHANGE_OWNER' + ACTIVATED = 'ACTIVATED' + SUSPENDED = 'SUSPENDED' + CREDENTIALS_READ = 'CREDENTIALS_READ' + ATTRIBUTES_READ = 'ATTRIBUTES_READ' + RELATION_ADD_OR_UPDATE = 'RELATION_ADD_OR_UPDATE' + RELATION_DELETED = 'RELATION_DELETED' + RELATIONS_DELETED = 'RELATIONS_DELETED' + ALARM_ACK = 'ALARM_ACK' + ALARM_CLEAR = 'ALARM_CLEAR' + ALARM_DELETE = 'ALARM_DELETE' + ALARM_ASSIGNED = 'ALARM_ASSIGNED' + ALARM_UNASSIGNED = 'ALARM_UNASSIGNED' + ADDED_TO_ENTITY_GROUP = 'ADDED_TO_ENTITY_GROUP' + REMOVED_FROM_ENTITY_GROUP = 'REMOVED_FROM_ENTITY_GROUP' + REST_API_RULE_ENGINE_CALL = 'REST_API_RULE_ENGINE_CALL' + MADE_PUBLIC = 'MADE_PUBLIC' + MADE_PRIVATE = 'MADE_PRIVATE' + LOGIN = 'LOGIN' + LOGOUT = 'LOGOUT' + LOCKOUT = 'LOCKOUT' + ASSIGNED_FROM_TENANT = 'ASSIGNED_FROM_TENANT' + ASSIGNED_TO_TENANT = 'ASSIGNED_TO_TENANT' + PROVISION_SUCCESS = 'PROVISION_SUCCESS' + PROVISION_FAILURE = 'PROVISION_FAILURE' + ASSIGNED_TO_EDGE = 'ASSIGNED_TO_EDGE' + UNASSIGNED_FROM_EDGE = 'UNASSIGNED_FROM_EDGE' + ADDED_COMMENT = 'ADDED_COMMENT' + UPDATED_COMMENT = 'UPDATED_COMMENT' + DELETED_COMMENT = 'DELETED_COMMENT' + SMS_SENT = 'SMS_SENT' + SUBSCRIPTION_CREATED = 'SUBSCRIPTION_CREATED' + SUBSCRIPTION_UPDATED = 'SUBSCRIPTION_UPDATED' + SUBSCRIPTION_CANCELED = 'SUBSCRIPTION_CANCELED' + SUBSCRIPTION_PLAN_UPDATED = 'SUBSCRIPTION_PLAN_UPDATED' + SUBSCRIPTION_COUPON_APPLIED = 'SUBSCRIPTION_COUPON_APPLIED' + + +class ActionStatus(Enum): + SUCCESS = 'SUCCESS' + FAILURE = 'FAILURE' + + +class AuditLogId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class AutoVersionCreateConfig(BaseModel): + saveRelations: Optional[bool] = None + saveAttributes: Optional[bool] = None + saveCredentials: Optional[bool] = None + saveCalculatedFields: Optional[bool] = None + savePermissions: Optional[bool] = None + saveGroupEntities: Optional[bool] = None + branch: Optional[str] = None + + +class EntityType3(Enum): + BLOB_ENTITY = 'BLOB_ENTITY' + + +class BlobEntityId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType3 = Field(..., description='string', example='BLOB_ENTITY') + + +class ContentType(Enum): + application_pdf = 'application/pdf' + image_jpeg = 'image/jpeg' + image_png = 'image/png' + + +class Operation(Enum): + EQUAL = 'EQUAL' + NOT_EQUAL = 'NOT_EQUAL' + + +class BranchInfo(BaseModel): + name: Optional[str] = None + default: Optional[bool] = None + + +class Created(BaseModel): + opaque: Optional[int] = None + acquire: Optional[int] = None + release: Optional[int] = None + andIncrement: Optional[int] = None + andDecrement: Optional[int] = None + plain: Optional[int] = None + + +class Updated(BaseModel): + opaque: Optional[int] = None + acquire: Optional[int] = None + release: Optional[int] = None + andIncrement: Optional[int] = None + andDecrement: Optional[int] = None + plain: Optional[int] = None + + +class Errors(BaseModel): + opaque: Optional[int] = None + acquire: Optional[int] = None + release: Optional[int] = None + andIncrement: Optional[int] = None + andDecrement: Optional[int] = None + plain: Optional[int] = None + + +class BulkImportResultAsset(BaseModel): + created: Optional[Created] = None + updated: Optional[Updated] = None + errors: Optional[Errors] = None + errorsList: Optional[List[str]] = None + + +class BulkImportResultDevice(BaseModel): + created: Optional[Created] = None + updated: Optional[Updated] = None + errors: Optional[Errors] = None + errorsList: Optional[List[str]] = None + + +class BulkImportResultEdge(BaseModel): + created: Optional[Created] = None + updated: Optional[Updated] = None + errors: Optional[Errors] = None + errorsList: Optional[List[str]] = None + + +class LinkType(Enum): + LINK = 'LINK' + DASHBOARD = 'DASHBOARD' + + +class Button(BaseModel): + enabled: Optional[bool] = None + text: Optional[str] = None + linkType: Optional[LinkType] = None + link: Optional[str] = None + dashboardId: Optional[UUID] = None + dashboardState: Optional[str] = None + setEntityIdInState: Optional[bool] = None + + +class Type4(Enum): + SIMPLE = 'SIMPLE' + SCRIPT = 'SCRIPT' + + +class EntityType4(Enum): + DEVICE = 'DEVICE' + + +class EntityType5(Enum): + CALCULATED_FIELD = 'CALCULATED_FIELD' + + +class CalculatedFieldId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType5 = Field( + ..., description='string', example='CALCULATED_FIELD' + ) + + +class CaptchaClientParams(BaseModel): + captchaSiteKey: Optional[str] = None + captchaVersion: Optional[str] = None + captchaAction: Optional[str] = None + + +class CaptchaParams(BaseModel): + version: Optional[str] = None + + +class Status3(Enum): + PENDING_VALIDATION = 'PENDING_VALIDATION' + ISSUED = 'ISSUED' + INACTIVE = 'INACTIVE' + EXPIRED = 'EXPIRED' + VALIDATION_TIMED_OUT = 'VALIDATION_TIMED_OUT' + REVOKED = 'REVOKED' + FAILED = 'FAILED' + UNKNOWN = 'UNKNOWN' + + +class CertificateInfo(BaseModel): + status: Optional[Status3] = None + domainName: Optional[str] = None + serialNumber: Optional[str] = None + notBefore: Optional[int] = None + notAfter: Optional[int] = None + requestedAt: Optional[int] = None + issuedAt: Optional[int] = None + acmeCertificateId: Optional[AcmeCertificateId] = None + + +class ChangePasswordRequest(BaseModel): + currentPassword: Optional[str] = Field( + None, description='The old password', example='OldPassword' + ) + newPassword: Optional[str] = Field( + None, description='The new password', example='NewPassword' + ) + + +class ClaimRequest(BaseModel): + secretKey: Optional[str] = None + + +class ClearRule(BaseModel): + alarmStatuses: Optional[List[AlarmStatus]] = Field(None, Set=True) + + +class PowerMode(Enum): + PSM = 'PSM' + DRX = 'DRX' + E_DRX = 'E_DRX' + + +class CoapDeviceTypeConfiguration(BaseModel): + coapDeviceType: str + + +class Type5(Enum): + NAME = 'NAME' + TYPE = 'TYPE' + LABEL = 'LABEL' + SHARED_ATTRIBUTE = 'SHARED_ATTRIBUTE' + SERVER_ATTRIBUTE = 'SERVER_ATTRIBUTE' + TIMESERIES = 'TIMESERIES' + ACCESS_TOKEN = 'ACCESS_TOKEN' + X509 = 'X509' + MQTT_CLIENT_ID = 'MQTT_CLIENT_ID' + MQTT_USER_NAME = 'MQTT_USER_NAME' + MQTT_PASSWORD = 'MQTT_PASSWORD' + LWM2M_CLIENT_ENDPOINT = 'LWM2M_CLIENT_ENDPOINT' + LWM2M_CLIENT_SECURITY_CONFIG_MODE = 'LWM2M_CLIENT_SECURITY_CONFIG_MODE' + LWM2M_CLIENT_IDENTITY = 'LWM2M_CLIENT_IDENTITY' + LWM2M_CLIENT_KEY = 'LWM2M_CLIENT_KEY' + LWM2M_CLIENT_CERT = 'LWM2M_CLIENT_CERT' + LWM2M_BOOTSTRAP_SERVER_SECURITY_MODE = 'LWM2M_BOOTSTRAP_SERVER_SECURITY_MODE' + LWM2M_BOOTSTRAP_SERVER_PUBLIC_KEY_OR_ID = 'LWM2M_BOOTSTRAP_SERVER_PUBLIC_KEY_OR_ID' + LWM2M_BOOTSTRAP_SERVER_SECRET_KEY = 'LWM2M_BOOTSTRAP_SERVER_SECRET_KEY' + LWM2M_SERVER_SECURITY_MODE = 'LWM2M_SERVER_SECURITY_MODE' + LWM2M_SERVER_CLIENT_PUBLIC_KEY_OR_ID = 'LWM2M_SERVER_CLIENT_PUBLIC_KEY_OR_ID' + LWM2M_SERVER_CLIENT_SECRET_KEY = 'LWM2M_SERVER_CLIENT_SECRET_KEY' + SNMP_HOST = 'SNMP_HOST' + SNMP_PORT = 'SNMP_PORT' + SNMP_VERSION = 'SNMP_VERSION' + SNMP_COMMUNITY_STRING = 'SNMP_COMMUNITY_STRING' + IS_GATEWAY = 'IS_GATEWAY' + DESCRIPTION = 'DESCRIPTION' + EDGE_LICENSE_KEY = 'EDGE_LICENSE_KEY' + CLOUD_ENDPOINT = 'CLOUD_ENDPOINT' + ROUTING_KEY = 'ROUTING_KEY' + SECRET = 'SECRET' + + +class ColumnMapping(BaseModel): + type: Optional[Type5] = None + key: Optional[str] = None + + +class Operation1(Enum): + AND = 'AND' + OR = 'OR' + + +class SyncStrategy(Enum): + MERGE = 'MERGE' + OVERWRITE = 'OVERWRITE' + + +class Type6(Enum): + ENRICHMENT = 'ENRICHMENT' + FILTER = 'FILTER' + TRANSFORMATION = 'TRANSFORMATION' + ACTION = 'ACTION' + ANALYTICS = 'ANALYTICS' + EXTERNAL = 'EXTERNAL' + FLOW = 'FLOW' + + +class Scope(Enum): + TENANT = 'TENANT' + + +class ClusteringMode(Enum): + USER_PREFERENCE = 'USER_PREFERENCE' + ENABLED = 'ENABLED' + SINGLETON = 'SINGLETON' + + +class ComponentDescriptorId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class Type7(Enum): + UPLINK = 'UPLINK' + DOWNLINK = 'DOWNLINK' + + +class IntegrationType(Enum): + OCEANCONNECT = 'OCEANCONNECT' + SIGFOX = 'SIGFOX' + THINGPARK = 'THINGPARK' + TPE = 'TPE' + CHIRPSTACK = 'CHIRPSTACK' + PARTICLE = 'PARTICLE' + TMOBILE_IOT_CDP = 'TMOBILE_IOT_CDP' + HTTP = 'HTTP' + MQTT = 'MQTT' + PUB_SUB = 'PUB_SUB' + AWS_IOT = 'AWS_IOT' + AWS_SQS = 'AWS_SQS' + AWS_KINESIS = 'AWS_KINESIS' + IBM_WATSON_IOT = 'IBM_WATSON_IOT' + TTN = 'TTN' + TTI = 'TTI' + AZURE_EVENT_HUB = 'AZURE_EVENT_HUB' + OPC_UA = 'OPC_UA' + CUSTOM = 'CUSTOM' + UDP = 'UDP' + TCP = 'TCP' + KAFKA = 'KAFKA' + AZURE_IOT_HUB = 'AZURE_IOT_HUB' + APACHE_PULSAR = 'APACHE_PULSAR' + RABBITMQ = 'RABBITMQ' + LORIOT = 'LORIOT' + COAP = 'COAP' + TUYA = 'TUYA' + AZURE_SERVICE_BUS = 'AZURE_SERVICE_BUS' + KPN = 'KPN' + + +class EntityType6(Enum): + CONVERTER = 'CONVERTER' + + +class ConverterId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType6 = Field(..., description='string', example='CONVERTER') + + +class ConvertersInfo(BaseModel): + library: Optional[bool] = None + existing: Optional[bool] = None + keys: Optional[List[str]] = Field(None, Set=True) + + +class Scope1(Enum): + SYSTEM = 'SYSTEM' + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + + +class AssigneeType(Enum): + NO_ASSIGN = 'NO_ASSIGN' + ALL = 'ALL' + CUSTOMERS = 'CUSTOMERS' + USERS = 'USERS' + + +class CustomMenuId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class MenuItemType(Enum): + LINK = 'LINK' + SECTION = 'SECTION' + + +class LinkType1(Enum): + URL = 'URL' + DASHBOARD = 'DASHBOARD' + + +class CustomTimeScheduleItem(BaseModel): + enabled: Optional[bool] = None + dayOfWeek: Optional[int] = None + startsOn: Optional[int] = None + endsOn: Optional[int] = None + + +class EntityType7(Enum): + CUSTOMER = 'CUSTOMER' + + +class CustomerId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType7 = Field(..., description='string', example='CUSTOMER') + + +class EntityType8(Enum): + DASHBOARD = 'DASHBOARD' + + +class DashboardId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType8 = Field(..., description='string', example='DASHBOARD') + + +class DebugSettings(BaseModel): + failuresEnabled: Optional[bool] = Field( + None, description='Debug failures. ', example=False + ) + allEnabled: Optional[bool] = Field( + None, + description='Debug All. Used as a trigger for updating debugAllUntil.', + example=False, + ) + allEnabledUntil: Optional[int] = Field( + None, description='Timestamp of the end time for the processing debug events.' + ) + + +class DefaultDashboardParams(BaseModel): + id: Optional[str] = Field( + None, + description='Default dashboard Id to assign for the new user.', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + fullscreen: Optional[bool] = Field( + None, description='Set default dashboard to full screen mode.' + ) + + +class Id(Enum): + HOME = 'HOME' + ALARMS = 'ALARMS' + DEVICES = 'DEVICES' + CUSTOMERS = 'CUSTOMERS' + ASSETS = 'ASSETS' + AUDIT_LOGS = 'AUDIT_LOGS' + NOTIFICATIONS = 'NOTIFICATIONS' + DEVICE_LIST = 'DEVICE_LIST' + DASHBOARDS = 'DASHBOARDS' + + +class DefaultRuleChainCreateRequest(BaseModel): + name: str = Field( + ..., description='Name of the new rule chain', example='Root Rule Chain' + ) + + +class DeleteTenantRequest(BaseModel): + reason: Optional[str] = None + additionalNotes: Optional[str] = None + + +class DeliveryMethodNotificationTemplate(BaseModel): + enabled: Optional[bool] = None + body: str + method: str + + +class NotifyOnEnum3(Enum): + ACTIVE = 'ACTIVE' + INACTIVE = 'INACTIVE' + + +class DeviceConfiguration(BaseModel): + type: str + + +class CredentialsType(Enum): + ACCESS_TOKEN = 'ACCESS_TOKEN' + X509_CERTIFICATE = 'X509_CERTIFICATE' + MQTT_BASIC = 'MQTT_BASIC' + LWM2M_CREDENTIALS = 'LWM2M_CREDENTIALS' + + +class DeviceCredentialsId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class OtaPackageType(Enum): + FIRMWARE = 'FIRMWARE' + SOFTWARE = 'SOFTWARE' + + +class EntityType9(Enum): + DEVICE = 'DEVICE' + + +class DeviceId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType9 = Field(..., description='string', example='DEVICE') + + +class Type8(Enum): + DEFAULT = 'DEFAULT' + + +class TransportType(Enum): + DEFAULT = 'DEFAULT' + MQTT = 'MQTT' + COAP = 'COAP' + LWM2M = 'LWM2M' + SNMP = 'SNMP' + + +class ProvisionType(Enum): + DISABLED = 'DISABLED' + ALLOW_CREATE_NEW_DEVICES = 'ALLOW_CREATE_NEW_DEVICES' + CHECK_PRE_PROVISIONED_DEVICES = 'CHECK_PRE_PROVISIONED_DEVICES' + X509_CERTIFICATE_CHAIN = 'X509_CERTIFICATE_CHAIN' + + +class DeviceProfileConfiguration(BaseModel): + type: str + + +class EntityType10(Enum): + DEVICE_PROFILE = 'DEVICE_PROFILE' + + +class DeviceProfileId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType10 = Field( + ..., description='string', example='DEVICE_PROFILE' + ) + + +class DeviceProfileProvisionConfiguration(BaseModel): + provisionDeviceSecret: Optional[str] = None + type: str + + +class DeviceProfileTransportConfiguration(BaseModel): + type: str + + +class DeviceTransportConfiguration(BaseModel): + type: str + + +class DisabledDeviceProfileProvisionConfiguration(DeviceProfileProvisionConfiguration): + pass + + +class EntityType11(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class DomainId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType11 = Field(..., example='DEVICE') + + +class Unit(Enum): + NANOSECONDS = 'NANOSECONDS' + MICROSECONDS = 'MICROSECONDS' + MILLISECONDS = 'MILLISECONDS' + SECONDS = 'SECONDS' + MINUTES = 'MINUTES' + HOURS = 'HOURS' + DAYS = 'DAYS' + + +class SourceType(Enum): + CURRENT_TENANT = 'CURRENT_TENANT' + CURRENT_CUSTOMER = 'CURRENT_CUSTOMER' + CURRENT_USER = 'CURRENT_USER' + CURRENT_DEVICE = 'CURRENT_DEVICE' + + +class DynamicValueBoolean(BaseModel): + sourceType: Optional[SourceType] = None + sourceAttribute: Optional[str] = None + inherit: Optional[bool] = None + resolvedValue: Optional[bool] = None + + +class DynamicValueDouble(BaseModel): + sourceType: Optional[SourceType] = None + sourceAttribute: Optional[str] = None + inherit: Optional[bool] = None + resolvedValue: Optional[float] = None + + +class DynamicValueInteger(BaseModel): + sourceType: Optional[SourceType] = None + sourceAttribute: Optional[str] = None + inherit: Optional[bool] = None + resolvedValue: Optional[int] = None + + +class DynamicValueLong(BaseModel): + sourceType: Optional[SourceType] = None + sourceAttribute: Optional[str] = None + inherit: Optional[bool] = None + resolvedValue: Optional[int] = None + + +class DynamicValueString(BaseModel): + sourceType: Optional[SourceType] = None + sourceAttribute: Optional[str] = None + inherit: Optional[bool] = None + resolvedValue: Optional[str] = None + + +class NotifyOnEnum4(Enum): + CONNECTED = 'CONNECTED' + DISCONNECTED = 'DISCONNECTED' + + +class Action(Enum): + ADDED = 'ADDED' + UPDATED = 'UPDATED' + DELETED = 'DELETED' + POST_ATTRIBUTES = 'POST_ATTRIBUTES' + ATTRIBUTES_UPDATED = 'ATTRIBUTES_UPDATED' + ATTRIBUTES_DELETED = 'ATTRIBUTES_DELETED' + TIMESERIES_UPDATED = 'TIMESERIES_UPDATED' + CREDENTIALS_UPDATED = 'CREDENTIALS_UPDATED' + RELATION_ADD_OR_UPDATE = 'RELATION_ADD_OR_UPDATE' + RELATION_DELETED = 'RELATION_DELETED' + RPC_CALL = 'RPC_CALL' + ALARM_ACK = 'ALARM_ACK' + ALARM_CLEAR = 'ALARM_CLEAR' + ALARM_DELETE = 'ALARM_DELETE' + ALARM_ASSIGNED = 'ALARM_ASSIGNED' + ALARM_UNASSIGNED = 'ALARM_UNASSIGNED' + ADDED_COMMENT = 'ADDED_COMMENT' + UPDATED_COMMENT = 'UPDATED_COMMENT' + DELETED_COMMENT = 'DELETED_COMMENT' + ASSIGNED_TO_EDGE = 'ASSIGNED_TO_EDGE' + UNASSIGNED_FROM_EDGE = 'UNASSIGNED_FROM_EDGE' + CREDENTIALS_REQUEST = 'CREDENTIALS_REQUEST' + ADDED_TO_ENTITY_GROUP = 'ADDED_TO_ENTITY_GROUP' + REMOVED_FROM_ENTITY_GROUP = 'REMOVED_FROM_ENTITY_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + ENTITY_MERGE_REQUEST = 'ENTITY_MERGE_REQUEST' + + +class Type10(Enum): + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + ENTITY_VIEW = 'ENTITY_VIEW' + ALARM = 'ALARM' + ALARM_COMMENT = 'ALARM_COMMENT' + RULE_CHAIN = 'RULE_CHAIN' + RULE_CHAIN_METADATA = 'RULE_CHAIN_METADATA' + EDGE = 'EDGE' + USER = 'USER' + CUSTOMER = 'CUSTOMER' + RELATION = 'RELATION' + TENANT = 'TENANT' + TENANT_PROFILE = 'TENANT_PROFILE' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ADMIN_SETTINGS = 'ADMIN_SETTINGS' + OTA_PACKAGE = 'OTA_PACKAGE' + QUEUE = 'QUEUE' + ENTITY_GROUP = 'ENTITY_GROUP' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + WHITE_LABELING = 'WHITE_LABELING' + LOGIN_WHITE_LABELING = 'LOGIN_WHITE_LABELING' + MAIL_TEMPLATES = 'MAIL_TEMPLATES' + CUSTOM_TRANSLATION = 'CUSTOM_TRANSLATION' + CUSTOM_MENU = 'CUSTOM_MENU' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + TB_RESOURCE = 'TB_RESOURCE' + DEVICE_GROUP_OTA = 'DEVICE_GROUP_OTA' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + + +class EdgeEventId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class EntityType12(Enum): + EDGE = 'EDGE' + + +class EdgeId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType12 = Field(..., description='string', example='EDGE') + + +class EdgeInstructions(BaseModel): + instructions: Optional[str] = Field( + None, description='Markdown with install/upgrade instructions' + ) + + +class EdqsSyncRequest(RootModel): + root: Any + + +class EfentoCoapDeviceTypeConfiguration(CoapDeviceTypeConfiguration): + pass + + +class EmailDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + subject: str + body: str + + +class EnterpriseCaptchaParams(CaptchaParams): + projectId: Optional[str] = Field(None, description='Your Google Cloud project ID') + serviceAccountCredentials: Optional[str] = Field( + None, description='Service account credentials' + ) + serviceAccountCredentialsFileName: Optional[str] = Field( + None, description='Service account credentials file name' + ) + androidKey: Optional[str] = Field( + None, description='The reCAPTCHA key associated with android app.' + ) + iosKey: Optional[str] = Field( + None, description='The reCAPTCHA key associated with iOS app.' + ) + logActionName: Optional[str] = Field( + None, description='Optional action name used for logging' + ) + + +class GroupType(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class EntityType13(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class EntityDataInfo(BaseModel): + hasRelations: Optional[bool] = None + hasAttributes: Optional[bool] = None + hasCredentials: Optional[bool] = None + hasCalculatedFields: Optional[bool] = None + hasPermissions: Optional[bool] = None + hasGroupEntities: Optional[bool] = None + + +class Direction3(Enum): + ASC = 'ASC' + DESC = 'DESC' + + +class EntityFilter(BaseModel): + type: str + + +class Type11(Enum): + CUSTOMER = 'CUSTOMER' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + USER = 'USER' + ENTITY_VIEW = 'ENTITY_VIEW' + DASHBOARD = 'DASHBOARD' + EDGE = 'EDGE' + + +class EntityGroupFilter(EntityFilter): + groupType: Optional[GroupType] = None + entityGroup: Optional[str] = None + + +class EntityType16(Enum): + ENTITY_GROUP = 'ENTITY_GROUP' + + +class EntityGroupId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType16 = Field(..., description='string', example='ENTITY_GROUP') + + +class EntityGroupListFilter(EntityFilter): + groupType: Optional[GroupType] = None + entityGroupList: Optional[List[str]] = None + + +class EntityGroupNameFilter(EntityFilter): + groupType: Optional[GroupType] = None + entityGroupNameFilter: Optional[str] = None + + +class EntityType17(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class EntityId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType17 = Field(..., example='DEVICE') + + +class EntityInfo(BaseModel): + id: Optional[EntityId] = Field(None, description='JSON object with the entity Id. ') + name: Optional[str] = Field(None, description='Entity Name') + + +class Type13(Enum): + ATTRIBUTE = 'ATTRIBUTE' + CLIENT_ATTRIBUTE = 'CLIENT_ATTRIBUTE' + SHARED_ATTRIBUTE = 'SHARED_ATTRIBUTE' + SERVER_ATTRIBUTE = 'SERVER_ATTRIBUTE' + TIME_SERIES = 'TIME_SERIES' + ENTITY_FIELD = 'ENTITY_FIELD' + ALARM_FIELD = 'ALARM_FIELD' + + +class EntityKey(BaseModel): + type: Optional[Type13] = None + key: Optional[str] = None + + +class EntityListFilter(EntityFilter): + entityType: Optional[EntityType17] = None + entityList: Optional[List[str]] = None + + +class EntityLoadError(BaseModel): + type: Optional[str] = None + source: Optional[EntityId] = None + target: Optional[EntityId] = None + message: Optional[str] = None + + +class EntityNameFilter(EntityFilter): + entityType: Optional[EntityType17] = None + entityNameFilter: Optional[str] = None + + +class TypeGroup(Enum): + COMMON = 'COMMON' + DASHBOARD = 'DASHBOARD' + FROM_ENTITY_GROUP = 'FROM_ENTITY_GROUP' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + EDGE = 'EDGE' + EDGE_AUTO_ASSIGN_RULE_CHAIN = 'EDGE_AUTO_ASSIGN_RULE_CHAIN' + + +class EntityTypeFilter(EntityFilter): + entityType: Optional[EntityType17] = None + + +class EntityTypeLoadResult(BaseModel): + entityType: Optional[EntityType17] = None + created: Optional[int] = None + updated: Optional[int] = None + deleted: Optional[int] = None + groupsCreated: Optional[int] = None + groupsUpdated: Optional[int] = None + groupsDeleted: Optional[int] = None + + +class EntityTypeVersionCreateConfig(BaseModel): + saveRelations: Optional[bool] = None + saveAttributes: Optional[bool] = None + saveCredentials: Optional[bool] = None + saveCalculatedFields: Optional[bool] = None + savePermissions: Optional[bool] = None + saveGroupEntities: Optional[bool] = None + syncStrategy: Optional[SyncStrategy] = None + entityIds: Optional[List[UUID]] = None + allEntities: Optional[bool] = None + + +class EntityTypeVersionLoadConfig(BaseModel): + loadRelations: Optional[bool] = None + loadAttributes: Optional[bool] = None + loadCredentials: Optional[bool] = None + loadCalculatedFields: Optional[bool] = None + loadPermissions: Optional[bool] = None + loadGroupEntities: Optional[bool] = None + autoGenerateIntegrationKey: Optional[bool] = None + removeOtherEntities: Optional[bool] = None + findExistingEntityByName: Optional[bool] = None + + +class EntityVersion(BaseModel): + timestamp: Optional[int] = None + id: Optional[str] = None + name: Optional[str] = None + author: Optional[str] = None + + +class EntityType23(Enum): + ENTITY_VIEW = 'ENTITY_VIEW' + + +class EntityViewId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType23 = Field(..., description='string', example='ENTITY_VIEW') + + +class Direction4(Enum): + FROM = 'FROM' + TO = 'TO' + + +class EntityViewSearchQueryFilter(EntityFilter): + rootEntity: Optional[EntityId] = None + relationType: Optional[str] = None + direction: Optional[Direction4] = None + maxLevel: Optional[int] = None + fetchLastLevelOnly: Optional[bool] = None + entityViewTypes: Optional[List[str]] = None + + +class EntityViewTypeFilter(EntityFilter): + entityViewType: Optional[str] = None + entityViewTypes: Optional[List[str]] = None + entityViewNameFilter: Optional[str] = None + + +class EventType(Enum): + ERROR = 'ERROR' + LC_EVENT = 'LC_EVENT' + STATS = 'STATS' + RAW_DATA = 'RAW_DATA' + DEBUG_RULE_NODE = 'DEBUG_RULE_NODE' + DEBUG_RULE_CHAIN = 'DEBUG_RULE_CHAIN' + DEBUG_CONVERTER = 'DEBUG_CONVERTER' + DEBUG_INTEGRATION = 'DEBUG_INTEGRATION' + DEBUG_CALCULATED_FIELD = 'DEBUG_CALCULATED_FIELD' + + +class EventFilter(BaseModel): + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + notEmpty: Optional[bool] = None + + +class EventId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class ExportableEntityEntityId(BaseModel): + id: Optional[EntityId] = None + name: Optional[str] = None + + +class Favicon(BaseModel): + url: Optional[str] = None + + +class FeaturesInfo(BaseModel): + smsEnabled: Optional[bool] = None + oauthEnabled: Optional[bool] = None + notificationEnabled: Optional[bool] = None + twoFaEnabled: Optional[bool] = None + whiteLabelingEnabled: Optional[bool] = None + emailEnabled: Optional[bool] = None + + +class FilterPredicateValueBoolean(BaseModel): + defaultValue: Optional[bool] = None + userValue: Optional[bool] = None + dynamicValue: Optional[DynamicValueBoolean] = None + + +class FilterPredicateValueDouble(BaseModel): + defaultValue: Optional[float] = None + userValue: Optional[float] = None + dynamicValue: Optional[DynamicValueDouble] = None + + +class FilterPredicateValueInteger(BaseModel): + defaultValue: Optional[int] = None + userValue: Optional[int] = None + dynamicValue: Optional[DynamicValueInteger] = None + + +class FilterPredicateValueLong(BaseModel): + defaultValue: Optional[int] = None + userValue: Optional[int] = None + dynamicValue: Optional[DynamicValueLong] = None + + +class FilterPredicateValueString(BaseModel): + defaultValue: Optional[str] = None + userValue: Optional[str] = None + dynamicValue: Optional[DynamicValueString] = None + + +class EntityGroupType(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class EntityType24(Enum): + GROUP_PERMISSION = 'GROUP_PERMISSION' + + +class GroupPermissionId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType24 = Field( + ..., description='string', example='GROUP_PERMISSION' + ) + + +class HasIdObject(BaseModel): + id: Optional[Any] = None + + +class HomeDashboardInfo(BaseModel): + dashboardId: Optional[DashboardId] = Field( + None, description='JSON object with the dashboard Id.' + ) + hideDashboardToolbar: Optional[bool] = Field( + None, + description='Hide dashboard toolbar flag. Useful for rendering dashboards on mobile.', + ) + + +class HomeDashboardParams(BaseModel): + id: Optional[str] = Field( + None, + description='Home dashboard Id to assign for the new user.', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + hideToolbar: Optional[bool] = Field( + None, description='Indicates if hide toolbar should be hidden.' + ) + + +class HomeType(Enum): + DEFAULT = 'DEFAULT' + DASHBOARD = 'DASHBOARD' + + +class Type14(Enum): + OCEANCONNECT = 'OCEANCONNECT' + SIGFOX = 'SIGFOX' + THINGPARK = 'THINGPARK' + TPE = 'TPE' + CHIRPSTACK = 'CHIRPSTACK' + PARTICLE = 'PARTICLE' + TMOBILE_IOT_CDP = 'TMOBILE_IOT_CDP' + HTTP = 'HTTP' + MQTT = 'MQTT' + PUB_SUB = 'PUB_SUB' + AWS_IOT = 'AWS_IOT' + AWS_SQS = 'AWS_SQS' + AWS_KINESIS = 'AWS_KINESIS' + IBM_WATSON_IOT = 'IBM_WATSON_IOT' + TTN = 'TTN' + TTI = 'TTI' + AZURE_EVENT_HUB = 'AZURE_EVENT_HUB' + OPC_UA = 'OPC_UA' + CUSTOM = 'CUSTOM' + UDP = 'UDP' + TCP = 'TCP' + KAFKA = 'KAFKA' + AZURE_IOT_HUB = 'AZURE_IOT_HUB' + APACHE_PULSAR = 'APACHE_PULSAR' + RABBITMQ = 'RABBITMQ' + LORIOT = 'LORIOT' + COAP = 'COAP' + TUYA = 'TUYA' + AZURE_SERVICE_BUS = 'AZURE_SERVICE_BUS' + KPN = 'KPN' + + +class IntegrationConvertersInfo(BaseModel): + uplink: Optional[ConvertersInfo] = None + downlink: Optional[ConvertersInfo] = None + + +class EntityType25(Enum): + INTEGRATION = 'INTEGRATION' + + +class IntegrationId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType25 = Field(..., description='string', example='INTEGRATION') + + +class NotifyOnEnum5(Enum): + CREATED = 'CREATED' + STARTED = 'STARTED' + ACTIVATED = 'ACTIVATED' + SUSPENDED = 'SUSPENDED' + UPDATED = 'UPDATED' + STOPPED = 'STOPPED' + DELETED = 'DELETED' + FAILED = 'FAILED' + DEACTIVATED = 'DEACTIVATED' + + +class JsonNode(RootModel): + root: Any = Field( + ..., + description='A JSON value representing the custom translation. See API call notes above for valid example.', + examples=[{}], + ) + + +class Scope3(Enum): + SYS_ADMIN = 'SYS_ADMIN' + TENANT_ADMIN = 'TENANT_ADMIN' + CUSTOMER_USER = 'CUSTOMER_USER' + BILLING_ADMIN = 'BILLING_ADMIN' + BILLING_SERVICE = 'BILLING_SERVICE' + REFRESH_TOKEN = 'REFRESH_TOKEN' + PRE_VERIFICATION_TOKEN = 'PRE_VERIFICATION_TOKEN' + + +class JwtPair(BaseModel): + token: Optional[str] = Field( + None, + description='The JWT Access Token. Used to perform API calls.', + example='AAB254FF67D..', + ) + refreshToken: Optional[str] = Field( + None, + description='The JWT Refresh Token. Used to get new JWT Access Token if old one has expired.', + example='AAB254FF67D..', + ) + scope: Optional[Scope3] = None + + +class JwtSettings(BaseModel): + tokenExpirationTime: Optional[int] = Field( + None, description='The JWT will expire after seconds.', example=9000 + ) + refreshTokenExpTime: Optional[int] = Field( + None, description='The JWT can be refreshed during seconds.', example=604800 + ) + tokenIssuer: Optional[str] = Field( + None, description='The JWT issuer.', example='thingsboard.io' + ) + tokenSigningKey: Optional[str] = Field( + None, + description='The JWT key is used to sing token. Base64 encoded.', + example='dkVTUzU2M2VMWUNwVVltTUhQU2o5SUM0Tkc3M0k2Ykdwcm85QTl6R0RaQ252OFlmVDk2OEptZXBNcndGeExFZg==', + ) + + +class KeyFilterPredicate(BaseModel): + type: str + + +class LastVisitedDashboardInfo(BaseModel): + id: Optional[UUID] = Field(None, description='JSON object with Dashboard id.') + title: Optional[str] = Field(None, description='Title of the dashboard.') + starred: Optional[bool] = Field(None, description='Starred flag') + lastVisited: Optional[int] = Field(None, description='Last visit timestamp') + + +class LicenseUsageInfo(BaseModel): + maxDevices: Optional[int] = None + maxAssets: Optional[int] = None + whiteLabelingEnabled: Optional[bool] = None + development: Optional[bool] = None + plan: Optional[str] = None + devicesCount: Optional[int] = None + assetsCount: Optional[int] = None + dashboardsCount: Optional[int] = None + integrationsCount: Optional[int] = None + + +class Status4(Enum): + Success = 'Success' + Failure = 'Failure' + + +class LifeCycleEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + event: Optional[str] = Field( + None, + description='String value representing the lifecycle event type', + example='STARTED', + ) + status: Optional[Status4] = Field( + None, description='String value representing status of the lifecycle event' + ) + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class LoginRequest(BaseModel): + username: str = Field( + ..., description='User email', example='tenant@thingsboard.org' + ) + password: str = Field(..., description='User password', example='tenant') + + +class LoginResponse(BaseModel): + token: str = Field( + ..., + description='JWT token', + example='eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi...', + ) + refreshToken: str = Field( + ..., + description='Refresh token', + example='eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi...', + ) + + +class LwM2MBootstrapServerCredential(BaseModel): + securityMode: str + + +class LwM2MServerSecurityConfigDefault(BaseModel): + shortServerId: Optional[int] = Field( + None, + description="Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + example=123, + ) + bootstrapServerIs: Optional[bool] = Field( + None, + description='Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.', + example=True, + ) + host: Optional[str] = Field( + None, description="Host for 'No Security' mode", example='0.0.0.0' + ) + port: Optional[int] = Field( + None, + description="Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + example="'5685' or '5687'", + ) + clientHoldOffTime: Optional[int] = Field( + None, + description='Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)', + example=1, + ) + serverPublicKey: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + example='MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==', + ) + serverCertificate: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + example='MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=', + ) + bootstrapServerAccountTimeout: Optional[int] = Field( + None, + description='Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)', + example=0, + ) + lifetime: Optional[int] = Field( + None, + description='Specify the lifetime of the registration in seconds.', + example=300, + ) + defaultMinPeriod: Optional[int] = Field( + None, + description='The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.', + example=1, + ) + notifIfDisabled: Optional[bool] = Field( + None, + description='If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.', + example=True, + ) + binding: Optional[str] = Field( + None, + description='This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.', + example='U', + ) + securityHost: Optional[str] = Field( + None, description="Host for 'Security' mode (DTLS)", example='0.0.0.0' + ) + securityPort: Optional[int] = Field( + None, + description="Port for 'Security' mode (DTLS): Lwm2m Server or Bootstrap Server", + example=5686, + ) + + +class LwM2mResourceObserve(BaseModel): + id: Optional[int] = Field( + None, description='LwM2M Resource Observe id.', example=0 + ) + name: Optional[str] = Field( + None, description='LwM2M Resource Observe name.', example='Data' + ) + observe: Optional[bool] = Field( + None, description='LwM2M Resource Observe observe.', example=False + ) + attribute: Optional[bool] = Field( + None, description='LwM2M Resource Observe attribute.', example=False + ) + telemetry: Optional[bool] = Field( + None, description='LwM2M Resource Observe telemetry.', example=False + ) + keyName: Optional[str] = Field( + None, description='LwM2M Resource Observe key name.', example='data' + ) + + +class LwM2mVersion(BaseModel): + supported: Optional[bool] = None + + +class Lwm2mDeviceTransportConfiguration(DeviceTransportConfiguration): + powerMode: Optional[PowerMode] = None + psmActivityTimer: Optional[int] = None + edrxCycle: Optional[int] = None + pagingTransmissionWindow: Optional[int] = None + + +class Mapping(BaseModel): + columns: Optional[List[ColumnMapping]] = None + delimiter: Optional[str] = None + update: Optional[bool] = None + header: Optional[bool] = None + + +class Type16(Enum): + HOME = 'HOME' + DEFAULT = 'DEFAULT' + CUSTOM = 'CUSTOM' + + +class MenuItem(BaseModel): + type: Optional[Type16] = None + visible: Optional[bool] = None + + +class EntityType26(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class Operation2(Enum): + ALL = 'ALL' + CREATE = 'CREATE' + READ = 'READ' + WRITE = 'WRITE' + DELETE = 'DELETE' + RPC_CALL = 'RPC_CALL' + READ_CREDENTIALS = 'READ_CREDENTIALS' + WRITE_CREDENTIALS = 'WRITE_CREDENTIALS' + READ_ATTRIBUTES = 'READ_ATTRIBUTES' + WRITE_ATTRIBUTES = 'WRITE_ATTRIBUTES' + READ_TELEMETRY = 'READ_TELEMETRY' + WRITE_TELEMETRY = 'WRITE_TELEMETRY' + ADD_TO_GROUP = 'ADD_TO_GROUP' + REMOVE_FROM_GROUP = 'REMOVE_FROM_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + IMPERSONATE = 'IMPERSONATE' + CLAIM_DEVICES = 'CLAIM_DEVICES' + SHARE_GROUP = 'SHARE_GROUP' + ASSIGN_TO_TENANT = 'ASSIGN_TO_TENANT' + READ_CALCULATED_FIELD = 'READ_CALCULATED_FIELD' + WRITE_CALCULATED_FIELD = 'WRITE_CALCULATED_FIELD' + + +class MergedGroupPermissionInfo(BaseModel): + entityType: Optional[EntityType26] = None + operations: Optional[List[Operation2]] = Field(None, Set=True) + + +class MergedGroupTypePermissionInfo(BaseModel): + entityGroupIds: Optional[List[EntityGroupId]] = Field( + None, + description='List of Entity Groups in case of group roles are assigned to the user (user group)', + ) + hasGenericRead: Optional[bool] = Field( + None, description='Indicates if generic permission assigned to the user group.' + ) + + +class GenericPermission(Enum): + ALL = 'ALL' + CREATE = 'CREATE' + READ = 'READ' + WRITE = 'WRITE' + DELETE = 'DELETE' + RPC_CALL = 'RPC_CALL' + READ_CREDENTIALS = 'READ_CREDENTIALS' + WRITE_CREDENTIALS = 'WRITE_CREDENTIALS' + READ_ATTRIBUTES = 'READ_ATTRIBUTES' + WRITE_ATTRIBUTES = 'WRITE_ATTRIBUTES' + READ_TELEMETRY = 'READ_TELEMETRY' + WRITE_TELEMETRY = 'WRITE_TELEMETRY' + ADD_TO_GROUP = 'ADD_TO_GROUP' + REMOVE_FROM_GROUP = 'REMOVE_FROM_GROUP' + CHANGE_OWNER = 'CHANGE_OWNER' + IMPERSONATE = 'IMPERSONATE' + CLAIM_DEVICES = 'CLAIM_DEVICES' + SHARE_GROUP = 'SHARE_GROUP' + ASSIGN_TO_TENANT = 'ASSIGN_TO_TENANT' + READ_CALCULATED_FIELD = 'READ_CALCULATED_FIELD' + WRITE_CALCULATED_FIELD = 'WRITE_CALCULATED_FIELD' + + +class MergedUserPermissions(BaseModel): + genericPermissions: Optional[Dict[str, List[GenericPermission]]] = Field( + None, + description="Map of permissions defined using generic roles ('Customer Administrator', etc)", + ) + groupPermissions: Optional[Dict[str, MergedGroupPermissionInfo]] = Field( + None, + description="Map of permissions defined using group roles ('Read' or 'Write' access to specific entity group, etc)", + ) + readGroupPermissions: Optional[Dict[str, MergedGroupTypePermissionInfo]] = Field( + None, + description='Map of read permissions per entity type. Used on the UI to enable/disable certain components.', + ) + readEntityPermissions: Optional[Dict[str, MergedGroupTypePermissionInfo]] = Field( + None, + description='Map of read permissions per resource. Used on the UI to enable/disable certain components.', + ) + readAttrPermissions: Optional[Dict[str, MergedGroupTypePermissionInfo]] = Field( + None, + description='Map of read entity attributes permissions per resource. Used on the UI to enable/disable certain tabs.', + ) + readTsPermissions: Optional[Dict[str, MergedGroupTypePermissionInfo]] = Field( + None, + description='Map of read entity time-series permissions per resource. Used on the UI to enable/disable certain tabs.', + ) + + +class MicrosoftTeamsDeliveryMethodNotificationTemplate( + DeliveryMethodNotificationTemplate +): + subject: Optional[str] = None + themeColor: Optional[str] = None + button: Optional[Button] = None + body: str + + +class PlatformType(Enum): + WEB = 'WEB' + ANDROID = 'ANDROID' + IOS = 'IOS' + + +class Status5(Enum): + DRAFT = 'DRAFT' + PUBLISHED = 'PUBLISHED' + DEPRECATED = 'DEPRECATED' + SUSPENDED = 'SUSPENDED' + + +class MobileAppBundleId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType26 = Field(..., example='DEVICE') + + +class MobileAppDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + subject: str + additionalConfig: Optional[Any] = None + body: str + + +class MobileAppId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType26 = Field(..., example='DEVICE') + + +class MobileAppVersionInfo(BaseModel): + minVersion: Optional[str] = Field(None, description='Minimum supported version') + minVersionReleaseNotes: Optional[str] = Field( + None, description='Release notes of minimum supported version' + ) + latestVersion: Optional[str] = Field(None, description='Latest supported version') + latestVersionReleaseNotes: Optional[str] = Field( + None, description='Release notes of latest supported version' + ) + + +class Type17(Enum): + DEFAULT = 'DEFAULT' + DASHBOARD = 'DASHBOARD' + WEB_VIEW = 'WEB_VIEW' + CUSTOM = 'CUSTOM' + + +class MobilePage(BaseModel): + type: Optional[Type17] = None + visible: Optional[bool] = None + + +class MobileRedirectParams(BaseModel): + scheme: Optional[str] = Field( + None, + description='Mobile application verification settings. Used for callback to mobile application once user is registered.', + ) + host: Optional[str] = Field( + None, + description='Mobile application verification settings. Used for callback to mobile application once user is registered.', + ) + + +class MobileSessionInfo(BaseModel): + fcmTokenTimestamp: Optional[int] = None + + +class Model(BaseModel): + name: Optional[str] = None + info: Optional[JsonNode] = None + photo: Optional[str] = None + + +class MqttDeviceTransportConfiguration(DeviceTransportConfiguration): + pass + + +class NoSecLwM2MBootstrapServerCredential(LwM2MBootstrapServerCredential): + shortServerId: Optional[int] = Field( + None, + description="Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + example=123, + ) + bootstrapServerIs: Optional[bool] = Field( + None, + description='Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.', + example=True, + ) + host: Optional[str] = Field( + None, description="Host for 'No Security' mode", example='0.0.0.0' + ) + port: Optional[int] = Field( + None, + description="Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + example="'5685' or '5687'", + ) + clientHoldOffTime: Optional[int] = Field( + None, + description='Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)', + example=1, + ) + serverPublicKey: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + example='MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==', + ) + serverCertificate: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + example='MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=', + ) + bootstrapServerAccountTimeout: Optional[int] = Field( + None, + description='Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)', + example=0, + ) + lifetime: Optional[int] = Field( + None, + description='Specify the lifetime of the registration in seconds.', + example=300, + ) + defaultMinPeriod: Optional[int] = Field( + None, + description='The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.', + example=1, + ) + notifIfDisabled: Optional[bool] = Field( + None, + description='If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.', + example=True, + ) + binding: Optional[str] = Field( + None, + description='This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.', + example='U', + ) + + +class NodeConnectionInfo(BaseModel): + fromIndex: int = Field( + ..., + description="Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection.", + ) + toIndex: int = Field( + ..., + description="Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'to' part of the connection.", + ) + type: str = Field( + ..., + description="Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'", + ) + + +class Type18(Enum): + GENERAL = 'GENERAL' + ALARM = 'ALARM' + DEVICE_ACTIVITY = 'DEVICE_ACTIVITY' + ENTITY_ACTION = 'ENTITY_ACTION' + ALARM_COMMENT = 'ALARM_COMMENT' + RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT = 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' + ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT' + NEW_PLATFORM_VERSION = 'NEW_PLATFORM_VERSION' + ENTITIES_LIMIT = 'ENTITIES_LIMIT' + API_USAGE_LIMIT = 'API_USAGE_LIMIT' + RULE_NODE = 'RULE_NODE' + INTEGRATION_LIFECYCLE_EVENT = 'INTEGRATION_LIFECYCLE_EVENT' + RATE_LIMITS = 'RATE_LIMITS' + EDGE_CONNECTION = 'EDGE_CONNECTION' + EDGE_COMMUNICATION_FAILURE = 'EDGE_COMMUNICATION_FAILURE' + TASK_PROCESSING_FAILURE = 'TASK_PROCESSING_FAILURE' + USER_ACTIVATED = 'USER_ACTIVATED' + USER_REGISTERED = 'USER_REGISTERED' + + +class DeliveryMethod(Enum): + WEB = 'WEB' + EMAIL = 'EMAIL' + SMS = 'SMS' + SLACK = 'SLACK' + MICROSOFT_TEAMS = 'MICROSOFT_TEAMS' + MOBILE_APP = 'MOBILE_APP' + + +class Status6(Enum): + SENT = 'SENT' + READ = 'READ' + + +class NotificationDeliveryMethodConfig(BaseModel): + method: str + + +class EntityType29(Enum): + NOTIFICATION = 'NOTIFICATION' + + +class NotificationId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType29 = Field(..., description='string', example='NOTIFICATION') + + +class NotificationInfo(BaseModel): + stateEntityId: Optional[EntityId] = None + dashboardId: Optional[DashboardId] = None + type: str + + +class NotificationPref(BaseModel): + enabled: Optional[bool] = None + enabledDeliveryMethods: Dict[str, bool] + + +class Status7(Enum): + PROCESSING = 'PROCESSING' + SENT = 'SENT' + SCHEDULED = 'SCHEDULED' + + +class NotificationRequestConfig(BaseModel): + sendingDelayInSec: Optional[conint(le=604800)] = None + + +class EntityType30(Enum): + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + + +class NotificationRequestId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType30 = Field( + ..., description='string', example='NOTIFICATION_REQUEST' + ) + + +class Sent(BaseModel): + opaque: Optional[int] = None + acquire: Optional[int] = None + release: Optional[int] = None + andIncrement: Optional[int] = None + andDecrement: Optional[int] = None + plain: Optional[int] = None + + +class TotalErrors(BaseModel): + opaque: Optional[int] = None + acquire: Optional[int] = None + release: Optional[int] = None + andIncrement: Optional[int] = None + andDecrement: Optional[int] = None + plain: Optional[int] = None + + +class NotificationRequestStats(BaseModel): + sent: Optional[Dict[str, Sent]] = None + errors: Optional[Dict[str, Dict[str, str]]] = None + totalErrors: Optional[TotalErrors] = None + error: Optional[str] = None + + +class TriggerType(Enum): + ENTITY_ACTION = 'ENTITY_ACTION' + ALARM = 'ALARM' + ALARM_COMMENT = 'ALARM_COMMENT' + ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT' + DEVICE_ACTIVITY = 'DEVICE_ACTIVITY' + RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT = 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' + INTEGRATION_LIFECYCLE_EVENT = 'INTEGRATION_LIFECYCLE_EVENT' + EDGE_CONNECTION = 'EDGE_CONNECTION' + EDGE_COMMUNICATION_FAILURE = 'EDGE_COMMUNICATION_FAILURE' + NEW_PLATFORM_VERSION = 'NEW_PLATFORM_VERSION' + ENTITIES_LIMIT = 'ENTITIES_LIMIT' + API_USAGE_LIMIT = 'API_USAGE_LIMIT' + RATE_LIMITS = 'RATE_LIMITS' + TASK_PROCESSING_FAILURE = 'TASK_PROCESSING_FAILURE' + + +class NotificationRuleConfig(BaseModel): + description: Optional[str] = None + + +class EntityType31(Enum): + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + + +class NotificationRuleId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType31 = Field( + ..., description='string', example='NOTIFICATION_RULE' + ) + + +class NotificationRuleRecipientsConfig(BaseModel): + triggerType: TriggerType + + +class NotificationRuleTriggerConfig(BaseModel): + triggerType: Optional[TriggerType] = None + + +class NotificationTargetConfig(BaseModel): + description: Optional[str] = None + type: str + + +class EntityType32(Enum): + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + + +class NotificationTargetId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType32 = Field( + ..., description='string', example='NOTIFICATION_TARGET' + ) + + +class NotificationType(Enum): + GENERAL = 'GENERAL' + ALARM = 'ALARM' + DEVICE_ACTIVITY = 'DEVICE_ACTIVITY' + ENTITY_ACTION = 'ENTITY_ACTION' + ALARM_COMMENT = 'ALARM_COMMENT' + RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT = 'RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT' + ALARM_ASSIGNMENT = 'ALARM_ASSIGNMENT' + NEW_PLATFORM_VERSION = 'NEW_PLATFORM_VERSION' + ENTITIES_LIMIT = 'ENTITIES_LIMIT' + API_USAGE_LIMIT = 'API_USAGE_LIMIT' + RULE_NODE = 'RULE_NODE' + INTEGRATION_LIFECYCLE_EVENT = 'INTEGRATION_LIFECYCLE_EVENT' + RATE_LIMITS = 'RATE_LIMITS' + EDGE_CONNECTION = 'EDGE_CONNECTION' + EDGE_COMMUNICATION_FAILURE = 'EDGE_COMMUNICATION_FAILURE' + TASK_PROCESSING_FAILURE = 'TASK_PROCESSING_FAILURE' + USER_ACTIVATED = 'USER_ACTIVATED' + USER_REGISTERED = 'USER_REGISTERED' + + +class EntityType33(Enum): + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + + +class NotificationTemplateId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType33 = Field( + ..., description='string', example='NOTIFICATION_TEMPLATE' + ) + + +class Operation3(Enum): + EQUAL = 'EQUAL' + NOT_EQUAL = 'NOT_EQUAL' + GREATER = 'GREATER' + LESS = 'LESS' + GREATER_OR_EQUAL = 'GREATER_OR_EQUAL' + LESS_OR_EQUAL = 'LESS_OR_EQUAL' + + +class NumericFilterPredicate(KeyFilterPredicate): + operation: Optional[Operation3] = None + value: Optional[FilterPredicateValueDouble] = None + + +class TenantNameStrategy(Enum): + DOMAIN = 'DOMAIN' + EMAIL = 'EMAIL' + CUSTOM = 'CUSTOM' + + +class OAuth2BasicMapperConfig(BaseModel): + emailAttributeKey: Optional[str] = Field( + None, + description='Email attribute key of OAuth2 principal attributes. Must be specified for BASIC mapper type and cannot be specified for GITHUB type', + ) + firstNameAttributeKey: Optional[str] = Field( + None, description='First name attribute key' + ) + lastNameAttributeKey: Optional[str] = Field( + None, description='Last name attribute key' + ) + tenantNameStrategy: TenantNameStrategy = Field( + ..., + description="Tenant naming strategy. For DOMAIN type, domain for tenant name will be taken from the email (substring before '@')", + ) + tenantNamePattern: Optional[str] = Field( + None, + description="Tenant name pattern for CUSTOM naming strategy. OAuth2 attributes in the pattern can be used by enclosing attribute key in '%{' and '}'", + example='%{email}', + ) + customerNamePattern: Optional[str] = Field( + None, + description='Customer name pattern. When creating a user on the first OAuth2 log in, if specified, customer name will be used to create or find existing customer in the platform and assign customerId to the user', + ) + defaultDashboardName: Optional[str] = Field( + None, + description="Name of the tenant's dashboard to set as default dashboard for newly created user", + ) + alwaysFullScreen: Optional[bool] = Field( + None, description='Whether default dashboard should be open in full screen' + ) + parentCustomerNamePattern: Optional[str] = None + userGroupsNamePattern: Optional[List[str]] = None + + +class Platform(Enum): + WEB = 'WEB' + ANDROID = 'ANDROID' + IOS = 'IOS' + + +class EntityType34(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class OAuth2ClientId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType34 = Field(..., example='DEVICE') + + +class OAuth2ClientInfo(BaseModel): + id: Optional[OAuth2ClientId] = None + createdTime: Optional[int] = None + title: Optional[str] = Field( + None, description='Oauth2 client registration title (e.g. My google)' + ) + providerName: Optional[str] = Field( + None, description='Oauth2 client provider name (e.g. Google)' + ) + platforms: Optional[List[Platform]] = Field( + None, + description='List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed)', + ) + name: Optional[str] = None + + +class OAuth2ClientLoginInfo(BaseModel): + name: Optional[str] = Field( + None, description='OAuth2 client name', example='GitHub' + ) + icon: Optional[str] = Field( + None, + description='Name of the icon, displayed on OAuth2 log in button', + example='github-logo', + ) + url: Optional[str] = Field( + None, + description='URI for OAuth2 log in. On HTTP GET request to this URI, it redirects to the OAuth2 provider page', + example='/oauth2/authorization/8352f191-2b4d-11ec-9ed1-cbf57c026ecc', + ) + + +class OAuth2ClientRegistrationTemplateId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class OAuth2CustomMapperConfig(BaseModel): + url: Optional[str] = None + username: Optional[str] = None + password: Optional[str] = None + sendToken: Optional[bool] = None + + +class Type19(Enum): + BASIC = 'BASIC' + CUSTOM = 'CUSTOM' + GITHUB = 'GITHUB' + APPLE = 'APPLE' + + +class OAuth2MapperConfig(BaseModel): + allowUserCreation: Optional[bool] = Field( + None, + description='Whether user should be created if not yet present on the platform after successful authentication', + ) + activateUser: Optional[bool] = Field( + None, + description='Whether user credentials should be activated when user is created after successful authentication', + ) + type: Type19 = Field( + ..., + description='Type of OAuth2 mapper. Depending on this param, different mapper config fields must be specified', + ) + basic: Optional[OAuth2BasicMapperConfig] = Field( + None, description='Mapper config for BASIC and GITHUB mapper types' + ) + custom: Optional[OAuth2CustomMapperConfig] = Field( + None, description='Mapper config for CUSTOM mapper type' + ) + + +class ObjectAttributes(BaseModel): + dim: Optional[int] = None + ssid: Optional[int] = None + uri: Optional[str] = None + ver: Optional[Any] = None + lwm2m: Optional[LwM2mVersion] = None + pmin: Optional[int] = None + pmax: Optional[int] = None + gt: Optional[float] = None + lt: Optional[float] = None + st: Optional[float] = None + epmin: Optional[int] = None + epmax: Optional[int] = None + + +class Type20(Enum): + FIRMWARE = 'FIRMWARE' + SOFTWARE = 'SOFTWARE' + + +class ChecksumAlgorithm(Enum): + MD5 = 'MD5' + SHA256 = 'SHA256' + SHA384 = 'SHA384' + SHA512 = 'SHA512' + CRC32 = 'CRC32' + MURMUR3_32 = 'MURMUR3_32' + MURMUR3_128 = 'MURMUR3_128' + + +class Data(BaseModel): + short: Optional[int] = None + char: Optional[str] = None + int: Optional[int] = None + long: Optional[int] = None + float: Optional[float] = None + double: Optional[float] = None + direct: Optional[bool] = None + readOnly: Optional[bool] = None + + +class EntityType35(Enum): + OTA_PACKAGE = 'OTA_PACKAGE' + + +class OtaPackageId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType35 = Field(..., description='string', example='OTA_PACKAGE') + + +class OtherConfiguration(BaseModel): + fwUpdateStrategy: Optional[int] = None + swUpdateStrategy: Optional[int] = None + clientOnlyObserveAfterConnect: Optional[int] = None + powerMode: Optional[PowerMode] = None + psmActivityTimer: Optional[int] = None + edrxCycle: Optional[int] = None + pagingTransmissionWindow: Optional[int] = None + fwUpdateResource: Optional[str] = None + swUpdateResource: Optional[str] = None + defaultObjectIDVer: Optional[str] = None + + +class Type22(Enum): + TIME_SERIES = 'TIME_SERIES' + ATTRIBUTES = 'ATTRIBUTES' + + +class Scope4(Enum): + CLIENT_SCOPE = 'CLIENT_SCOPE' + SERVER_SCOPE = 'SERVER_SCOPE' + SHARED_SCOPE = 'SHARED_SCOPE' + + +class Output(BaseModel): + name: Optional[str] = None + type: Optional[Type22] = None + scope: Optional[Scope4] = None + decimalsByDefault: Optional[int] = None + + +class PSKLwM2MBootstrapServerCredential(LwM2MBootstrapServerCredential): + shortServerId: Optional[int] = Field( + None, + description="Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + example=123, + ) + bootstrapServerIs: Optional[bool] = Field( + None, + description='Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.', + example=True, + ) + host: Optional[str] = Field( + None, description="Host for 'No Security' mode", example='0.0.0.0' + ) + port: Optional[int] = Field( + None, + description="Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + example="'5685' or '5687'", + ) + clientHoldOffTime: Optional[int] = Field( + None, + description='Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)', + example=1, + ) + serverPublicKey: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + example='MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==', + ) + serverCertificate: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + example='MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=', + ) + bootstrapServerAccountTimeout: Optional[int] = Field( + None, + description='Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)', + example=0, + ) + lifetime: Optional[int] = Field( + None, + description='Specify the lifetime of the registration in seconds.', + example=300, + ) + defaultMinPeriod: Optional[int] = Field( + None, + description='The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.', + example=1, + ) + notifIfDisabled: Optional[bool] = Field( + None, + description='If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.', + example=True, + ) + binding: Optional[str] = Field( + None, + description='This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.', + example='U', + ) + + +class PageDataEntityInfo(BaseModel): + data: Optional[List[EntityInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEntityVersion(BaseModel): + data: Optional[List[EntityVersion]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataOAuth2ClientInfo(BaseModel): + data: Optional[List[OAuth2ClientInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class Palette(BaseModel): + type: str = Field( + ..., + description="Name of the pre-defined palette, or 'custom'", + example='custom', + ) + colors: Optional[Dict[str, str]] = Field( + None, description='Mapping of hue identifier number to the rgb(a) color code' + ) + extends: Optional[str] = Field( + None, + description='Pre-defined palette name that the custom palette extends', + example='purple', + ) + + +class PaletteSettings(BaseModel): + primaryPalette: Palette = Field(..., description='Primary palette JSON') + accentPalette: Palette = Field(..., description='Accent palette JSON') + + +class PowerSavingConfiguration(BaseModel): + powerMode: Optional[PowerMode] = None + psmActivityTimer: Optional[int] = None + edrxCycle: Optional[int] = None + pagingTransmissionWindow: Optional[int] = None + + +class Type23(Enum): + SKIP_ALL_FAILURES = 'SKIP_ALL_FAILURES' + SKIP_ALL_FAILURES_AND_TIMED_OUT = 'SKIP_ALL_FAILURES_AND_TIMED_OUT' + RETRY_ALL = 'RETRY_ALL' + RETRY_FAILED = 'RETRY_FAILED' + RETRY_TIMED_OUT = 'RETRY_TIMED_OUT' + RETRY_FAILED_AND_TIMED_OUT = 'RETRY_FAILED_AND_TIMED_OUT' + + +class ProcessingStrategy(BaseModel): + type: Optional[Type23] = None + retries: Optional[int] = None + failurePercentage: Optional[float] = None + pauseBetweenRetries: Optional[int] = None + maxPauseBetweenRetries: Optional[int] = None + + +class BadgePosition(Enum): + RIGHT = 'RIGHT' + LEFT = 'LEFT' + + +class QRCodeConfig(BaseModel): + showOnHomePage: Optional[bool] = None + badgeEnabled: Optional[bool] = None + qrCodeLabelEnabled: Optional[bool] = None + badgePosition: Optional[BadgePosition] = None + qrCodeLabel: Optional[str] = None + + +class QrCodeSettingsId(BaseModel): + id: UUID = Field( + ..., description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + + +class EntityType36(Enum): + QUEUE = 'QUEUE' + + +class QueueId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType36 = Field(..., description='string', example='QUEUE') + + +class EntityType37(Enum): + QUEUE_STATS = 'QUEUE_STATS' + + +class QueueStatsId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType37 = Field(..., description='string', example='QUEUE_STATS') + + +class RPKLwM2MBootstrapServerCredential(LwM2MBootstrapServerCredential): + shortServerId: Optional[int] = Field( + None, + description="Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + example=123, + ) + bootstrapServerIs: Optional[bool] = Field( + None, + description='Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.', + example=True, + ) + host: Optional[str] = Field( + None, description="Host for 'No Security' mode", example='0.0.0.0' + ) + port: Optional[int] = Field( + None, + description="Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + example="'5685' or '5687'", + ) + clientHoldOffTime: Optional[int] = Field( + None, + description='Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)', + example=1, + ) + serverPublicKey: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + example='MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==', + ) + serverCertificate: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + example='MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=', + ) + bootstrapServerAccountTimeout: Optional[int] = Field( + None, + description='Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)', + example=0, + ) + lifetime: Optional[int] = Field( + None, + description='Specify the lifetime of the registration in seconds.', + example=300, + ) + defaultMinPeriod: Optional[int] = Field( + None, + description='The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.', + example=1, + ) + notifIfDisabled: Optional[bool] = Field( + None, + description='If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.', + example=True, + ) + binding: Optional[str] = Field( + None, + description='This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.', + example='U', + ) + + +class Api(Enum): + ENTITY_EXPORT = 'ENTITY_EXPORT' + ENTITY_IMPORT = 'ENTITY_IMPORT' + NOTIFICATION_REQUESTS = 'NOTIFICATION_REQUESTS' + NOTIFICATION_REQUESTS_PER_RULE = 'NOTIFICATION_REQUESTS_PER_RULE' + REST_REQUESTS_PER_TENANT = 'REST_REQUESTS_PER_TENANT' + REST_REQUESTS_PER_CUSTOMER = 'REST_REQUESTS_PER_CUSTOMER' + WS_UPDATES_PER_SESSION = 'WS_UPDATES_PER_SESSION' + CASSANDRA_QUERIES = 'CASSANDRA_QUERIES' + EDGE_EVENTS = 'EDGE_EVENTS' + EDGE_EVENTS_PER_EDGE = 'EDGE_EVENTS_PER_EDGE' + EDGE_UPLINK_MESSAGES = 'EDGE_UPLINK_MESSAGES' + EDGE_UPLINK_MESSAGES_PER_EDGE = 'EDGE_UPLINK_MESSAGES_PER_EDGE' + INTEGRATION_MSGS_PER_TENANT = 'INTEGRATION_MSGS_PER_TENANT' + INTEGRATION_MSGS_PER_DEVICE = 'INTEGRATION_MSGS_PER_DEVICE' + INTEGRATION_MSGS_PER_ASSET = 'INTEGRATION_MSGS_PER_ASSET' + INTEGRATION_EVENTS = 'INTEGRATION_EVENTS' + CONVERTER_EVENTS = 'CONVERTER_EVENTS' + REPORTS = 'REPORTS' + PASSWORD_RESET = 'PASSWORD_RESET' + TWO_FA_VERIFICATION_CODE_SEND = 'TWO_FA_VERIFICATION_CODE_SEND' + TWO_FA_VERIFICATION_CODE_CHECK = 'TWO_FA_VERIFICATION_CODE_CHECK' + TRANSPORT_MESSAGES_PER_TENANT = 'TRANSPORT_MESSAGES_PER_TENANT' + TRANSPORT_MESSAGES_PER_DEVICE = 'TRANSPORT_MESSAGES_PER_DEVICE' + TRANSPORT_MESSAGES_PER_GATEWAY = 'TRANSPORT_MESSAGES_PER_GATEWAY' + TRANSPORT_MESSAGES_PER_GATEWAY_DEVICE = 'TRANSPORT_MESSAGES_PER_GATEWAY_DEVICE' + EMAILS = 'EMAILS' + WS_SUBSCRIPTIONS = 'WS_SUBSCRIPTIONS' + CALCULATED_FIELD_DEBUG_EVENTS = 'CALCULATED_FIELD_DEBUG_EVENTS' + + +class RateLimitsNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + apis: Optional[List[Api]] = Field(None, Set=True) + + +class RawDataEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + uuid: Optional[str] = Field( + None, description='String value representing the uuid', example='STARTED' + ) + messageType: Optional[str] = Field( + None, description='String value representing the message type' + ) + message: Optional[str] = Field( + None, description='String value representing the message' + ) + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class Type24(Enum): + TS_LATEST = 'TS_LATEST' + ATTRIBUTE = 'ATTRIBUTE' + TS_ROLLING = 'TS_ROLLING' + + +class ReferencedEntityKey(BaseModel): + key: Optional[str] = None + type: Optional[Type24] = None + scope: Optional[Scope4] = None + + +class EntityType38(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class RelationEntityTypeFilter(BaseModel): + relationType: Optional[str] = Field( + None, + description="Type of the relation between root entity and other entity (e.g. 'Contains' or 'Manages').", + example='Contains', + ) + entityTypes: Optional[List[EntityType38]] = Field( + None, + description="Array of entity types to filter the related entities (e.g. 'DEVICE', 'ASSET').", + ) + negate: Optional[bool] = Field( + None, description='Negate relation type between root entity and other entity.' + ) + + +class MultiRootEntitiesType(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class RelationsQueryFilter(EntityFilter): + rootEntity: Optional[EntityId] = None + multiRootEntitiesType: Optional[MultiRootEntitiesType] = None + multiRootEntityIds: Optional[List[str]] = Field(None, Set=True) + direction: Optional[Direction4] = None + filters: Optional[List[RelationEntityTypeFilter]] = None + maxLevel: Optional[int] = None + fetchLastLevelOnly: Optional[bool] = None + negate: Optional[bool] = None + multiRoot: Optional[bool] = None + + +class RootType(Enum): + TENANT = 'TENANT' + CUSTOMER = 'CUSTOMER' + USER = 'USER' + DASHBOARD = 'DASHBOARD' + ASSET = 'ASSET' + DEVICE = 'DEVICE' + ALARM = 'ALARM' + ENTITY_GROUP = 'ENTITY_GROUP' + CONVERTER = 'CONVERTER' + INTEGRATION = 'INTEGRATION' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + BLOB_ENTITY = 'BLOB_ENTITY' + ENTITY_VIEW = 'ENTITY_VIEW' + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + WIDGET_TYPE = 'WIDGET_TYPE' + ROLE = 'ROLE' + GROUP_PERMISSION = 'GROUP_PERMISSION' + TENANT_PROFILE = 'TENANT_PROFILE' + DEVICE_PROFILE = 'DEVICE_PROFILE' + ASSET_PROFILE = 'ASSET_PROFILE' + API_USAGE_STATE = 'API_USAGE_STATE' + TB_RESOURCE = 'TB_RESOURCE' + OTA_PACKAGE = 'OTA_PACKAGE' + EDGE = 'EDGE' + RPC = 'RPC' + QUEUE = 'QUEUE' + NOTIFICATION_TARGET = 'NOTIFICATION_TARGET' + NOTIFICATION_TEMPLATE = 'NOTIFICATION_TEMPLATE' + NOTIFICATION_REQUEST = 'NOTIFICATION_REQUEST' + NOTIFICATION = 'NOTIFICATION' + NOTIFICATION_RULE = 'NOTIFICATION_RULE' + QUEUE_STATS = 'QUEUE_STATS' + OAUTH2_CLIENT = 'OAUTH2_CLIENT' + DOMAIN = 'DOMAIN' + MOBILE_APP = 'MOBILE_APP' + MOBILE_APP_BUNDLE = 'MOBILE_APP_BUNDLE' + CALCULATED_FIELD = 'CALCULATED_FIELD' + CALCULATED_FIELD_LINK = 'CALCULATED_FIELD_LINK' + BILLING_CUSTOMER = 'BILLING_CUSTOMER' + SUBSCRIPTION_PLAN = 'SUBSCRIPTION_PLAN' + SUBSCRIPTION = 'SUBSCRIPTION' + COUPON = 'COUPON' + + +class RelationTypeGroup(Enum): + COMMON = 'COMMON' + DASHBOARD = 'DASHBOARD' + FROM_ENTITY_GROUP = 'FROM_ENTITY_GROUP' + RULE_CHAIN = 'RULE_CHAIN' + RULE_NODE = 'RULE_NODE' + EDGE = 'EDGE' + EDGE_AUTO_ASSIGN_RULE_CHAIN = 'EDGE_AUTO_ASSIGN_RULE_CHAIN' + + +class RelationsSearchParameters(BaseModel): + rootId: Optional[UUID] = Field( + None, + description='Root entity id to start search from.', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + rootType: Optional[RootType] = Field(None, description='Type of the root entity.') + direction: Optional[Direction4] = Field( + None, description='Type of the root entity.' + ) + relationTypeGroup: Optional[RelationTypeGroup] = Field( + None, description='Type of the relation.' + ) + maxLevel: Optional[int] = Field( + None, description='Maximum level of the search depth.' + ) + fetchLastLevelOnly: Optional[bool] = Field( + None, + description="Fetch entities that match the last level of search. Useful to find Devices that are strictly 'maxLevel' relations away from the root entity.", + ) + + +class RepeatingAlarmConditionSpec(AlarmConditionSpec): + predicate: Optional[FilterPredicateValueInteger] = None + + +class ReportConfig(BaseModel): + baseUrl: str = Field( + ..., + description='Base URL of ThingsBoard UI that should be accessible by Report Server.', + example='https:thingsboard.cloud', + ) + dashboardId: str = Field( + ..., + description='A string value representing the dashboard id.', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + state: Optional[str] = Field( + None, description='Target dashboard state for report generation.' + ) + timezone: str = Field( + ..., + description='Timezone in which target dashboard will be presented in report.', + example='Europe/Kiev', + ) + useDashboardTimewindow: Optional[bool] = Field( + None, + description='If set, timewindow configured in the target dashboard will be used during report generation.', + example=True, + ) + timewindow: Optional[JsonNode] = Field( + None, + description='Specific dashboard timewindow that will be used during report generation.', + ) + namePattern: str = Field( + ..., + description='If set, timewindow configured in the target dashboard will be used during report generation.', + example='report-%d{yyyy-MM-dd_HH:mm:ss}', + ) + type: Optional[str] = Field( + None, description='Report file type, can be PDF | PNG | JPEG.', example='pdf' + ) + useCurrentUserCredentials: Optional[bool] = Field( + None, + description='If set, credentials of user created this report configuration will be used to open dashboard UI during report generation.', + example=True, + ) + userId: str = Field( + ..., + description='A string value representing the user id.', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + + +class AuthMethod(Enum): + USERNAME_PASSWORD = 'USERNAME_PASSWORD' + PRIVATE_KEY = 'PRIVATE_KEY' + + +class RepositorySettings(BaseModel): + repositoryUri: Optional[str] = None + authMethod: Optional[AuthMethod] = None + username: Optional[str] = None + password: Optional[str] = None + privateKeyFileName: Optional[str] = None + privateKey: Optional[str] = None + privateKeyPassword: Optional[str] = None + defaultBranch: Optional[str] = None + readOnly: Optional[bool] = None + showMergeCommits: Optional[bool] = None + localOnly: Optional[bool] = None + + +class RepositorySettingsInfo(BaseModel): + configured: Optional[bool] = None + readOnly: Optional[bool] = None + + +class ResetPasswordEmailRequest(BaseModel): + email: Optional[str] = Field( + None, description='The email of the user', example='user@example.com' + ) + + +class ResetPasswordRequest(BaseModel): + resetToken: Optional[str] = Field( + None, description='The reset token to verify', example='AAB254FF67D..' + ) + password: Optional[str] = Field( + None, description='The new password to set', example='secret' + ) + + +class Type25(Enum): + LWM2M_MODEL = 'LWM2M_MODEL' + JKS = 'JKS' + PKCS_12 = 'PKCS_12' + JS_MODULE = 'JS_MODULE' + IMAGE = 'IMAGE' + DASHBOARD = 'DASHBOARD' + + +class SubType(Enum): + IMAGE = 'IMAGE' + SCADA_SYMBOL = 'SCADA_SYMBOL' + EXTENSION = 'EXTENSION' + MODULE = 'MODULE' + + +class ResourceExportData(BaseModel): + link: Optional[str] = None + title: Optional[str] = None + type: Optional[Type25] = None + subType: Optional[SubType] = None + resourceKey: Optional[str] = None + fileName: Optional[str] = None + publicResourceKey: Optional[str] = None + isPublic: Optional[bool] = None + mediaType: Optional[str] = None + data: Optional[str] = None + public: Optional[bool] = None + + +class Type26(Enum): + GENERIC = 'GENERIC' + GROUP = 'GROUP' + + +class EntityType39(Enum): + ROLE = 'ROLE' + + +class RoleId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType39 = Field(..., description='string', example='ROLE') + + +class Status9(Enum): + QUEUED = 'QUEUED' + SENT = 'SENT' + DELIVERED = 'DELIVERED' + SUCCESSFUL = 'SUCCESSFUL' + TIMEOUT = 'TIMEOUT' + EXPIRED = 'EXPIRED' + FAILED = 'FAILED' + DELETED = 'DELETED' + + +class EntityType40(Enum): + RPC = 'RPC' + + +class RpcId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType40 = Field(..., description='string', example='RPC') + + +class Type27(Enum): + CORE = 'CORE' + EDGE = 'EDGE' + + +class RuleChainDebugEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + isError: Optional[bool] = None + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + message: Optional[str] = Field( + None, description='String value representing the message' + ) + error: Optional[bool] = None + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class EntityType41(Enum): + RULE_CHAIN = 'RULE_CHAIN' + + +class RuleChainId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType41 = Field(..., description='string', example='RULE_CHAIN') + + +class RuleChainImportResult(BaseModel): + ruleChainId: Optional[RuleChainId] = None + ruleChainName: Optional[str] = None + updated: Optional[bool] = None + error: Optional[str] = None + + +class RuleChainEvent(Enum): + CREATED = 'CREATED' + STARTED = 'STARTED' + ACTIVATED = 'ACTIVATED' + SUSPENDED = 'SUSPENDED' + UPDATED = 'UPDATED' + STOPPED = 'STOPPED' + DELETED = 'DELETED' + FAILED = 'FAILED' + DEACTIVATED = 'DEACTIVATED' + + +class RuleNodeEvent(Enum): + CREATED = 'CREATED' + STARTED = 'STARTED' + ACTIVATED = 'ACTIVATED' + SUSPENDED = 'SUSPENDED' + UPDATED = 'UPDATED' + STOPPED = 'STOPPED' + DELETED = 'DELETED' + FAILED = 'FAILED' + DEACTIVATED = 'DEACTIVATED' + + +class RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig( + NotificationRuleTriggerConfig +): + ruleChains: Optional[List[UUID]] = Field(None, Set=True) + ruleChainEvents: Optional[List[RuleChainEvent]] = Field(None, Set=True) + onlyRuleChainLifecycleFailures: Optional[bool] = None + trackRuleNodeEvents: Optional[bool] = None + ruleNodeEvents: Optional[List[RuleNodeEvent]] = Field(None, Set=True) + onlyRuleNodeLifecycleFailures: Optional[bool] = None + + +class MsgDirectionType(Enum): + IN = 'IN' + OUT = 'OUT' + + +class EntityType42(Enum): + DEVICE = 'DEVICE' + + +class RuleNodeDebugEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + isError: Optional[bool] = None + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + msgDirectionType: Optional[MsgDirectionType] = Field( + None, + description='String value representing msg direction type (incoming to entity or outcoming from entity)', + ) + entityId: Optional[str] = Field( + None, + description='String value representing the entity id in the event body (originator of the message)', + example='de9d54a0-2b7a-11ec-a3cc-23386423d98f', + ) + entityType: Optional[EntityType42] = Field( + None, description='String value representing the entity type' + ) + msgId: Optional[str] = Field( + None, + description='String value representing the message id in the rule engine', + example='de9d54a0-2b7a-11ec-a3cc-23386423d98f', + ) + msgType: Optional[str] = Field( + None, + description='String value representing the message type', + example='POST_TELEMETRY_REQUEST', + ) + relationType: Optional[str] = Field( + None, + description='String value representing the type of message routing', + example='Success', + ) + dataSearch: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on data (key and value) for the message.", + example='humidity', + ) + metadataSearch: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on metadata (key and value) for the message.", + example='deviceName', + ) + error: Optional[bool] = None + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class EntityType43(Enum): + RULE_NODE = 'RULE_NODE' + + +class RuleNodeId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType43 = Field(..., description='string', example='RULE_NODE') + + +class Type28(Enum): + FIRMWARE = 'FIRMWARE' + SOFTWARE = 'SOFTWARE' + + +class SchedulerEventFilter(EntityFilter): + originator: Optional[EntityId] = None + eventType: Optional[str] = None + + +class EntityType44(Enum): + SCHEDULER_EVENT = 'SCHEDULER_EVENT' + + +class SchedulerEventId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType44 = Field( + ..., description='string', example='SCHEDULER_EVENT' + ) + + +class Type29(Enum): + WEB = 'WEB' + MOBILE = 'MOBILE' + + +class ShareGroupRequest(BaseModel): + ownerId: Optional[EntityId] = Field( + None, + description="In case 'allUserGroup' is set to true, this property specifies the owner of the user group 'All'. Either Tenant or Customer Id.", + ) + allUserGroup: bool = Field( + ..., + description="Indicate that the group should be shared with user group 'All' that belongs to Tenant or Customer (see 'ownerId' property description).", + ) + userGroupId: Optional[EntityGroupId] = Field( + None, + description="In case 'allUserGroup' is set to false, this property specifies the specific user group that the entity group should be shared with.", + ) + readElseWrite: Optional[bool] = Field( + None, + description="Used if 'roleIds' property is not present. if the value is 'true', creates role with read-only permissions. If the value is 'false', creates role with write permissions.", + ) + roleIds: Optional[List[RoleId]] = Field( + None, + description="List of group role Ids that should be used to share the entity group with the user group. If not set, the platform will create new role (see 'readElseWrite' property description)", + ) + + +class ShortCustomerInfo(BaseModel): + customerId: Optional[CustomerId] = Field( + None, description='JSON object with the customer Id.' + ) + title: Optional[str] = Field(None, description='Title of the customer.') + isPublic: Optional[bool] = None + public: Optional[bool] = None + + +class ShortEntityView(BaseModel): + id: EntityId = Field(..., description='Entity Id object') + name: str = Field(..., description='Name of the entity') + + +class Id1(Enum): + EMAIL = 'EMAIL' + PASSWORD = 'PASSWORD' + REPEAT_PASSWORD = 'REPEAT_PASSWORD' + FIRST_NAME = 'FIRST_NAME' + LAST_NAME = 'LAST_NAME' + PHONE = 'PHONE' + COUNTRY = 'COUNTRY' + CITY = 'CITY' + STATE = 'STATE' + ZIP = 'ZIP' + ADDRESS = 'ADDRESS' + ADDRESS2 = 'ADDRESS2' + + +class SignUpField(BaseModel): + id: Id1 = Field(..., description='Signup field id') + label: str = Field(..., description='Signup field label') + required: Optional[bool] = Field(None, description='Indicates if field is required') + + +class SignUpRequest(BaseModel): + fields: Optional[Dict[str, str]] = Field( + None, description='List of sign-up form fields' + ) + recaptchaResponse: Optional[str] = Field( + None, description='Response from reCAPTCHA validation' + ) + pkgName: Optional[str] = Field( + None, description='For mobile apps only. Mobile app package name' + ) + platform: Optional[Platform] = Field( + None, description='For mobile apps only. Mobile app package platform' + ) + appSecret: Optional[str] = Field( + None, description='For mobile apps only. Mobile app secret' + ) + + +class SimpleAlarmConditionSpec(AlarmConditionSpec): + pass + + +class SingleEntityFilter(EntityFilter): + singleEntity: Optional[EntityId] = None + + +class Type30(Enum): + DIRECT = 'DIRECT' + PUBLIC_CHANNEL = 'PUBLIC_CHANNEL' + PRIVATE_CHANNEL = 'PRIVATE_CHANNEL' + + +class SlackConversation(BaseModel): + type: Type30 + id: str + name: str + wholeName: Optional[str] = None + email: Optional[str] = None + title: Optional[str] = None + + +class SlackDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + body: str + + +class SlackNotificationDeliveryMethodConfig(NotificationDeliveryMethodConfig): + botToken: str + + +class ConversationType(Enum): + DIRECT = 'DIRECT' + PUBLIC_CHANNEL = 'PUBLIC_CHANNEL' + PRIVATE_CHANNEL = 'PRIVATE_CHANNEL' + + +class SlackNotificationTargetConfig(NotificationTargetConfig): + conversationType: Optional[ConversationType] = None + conversation: SlackConversation + + +class ProtocolVersion(Enum): + field_3_3__3_4 = '3.3, 3.4' + + +class BindType(Enum): + TX = 'TX' + RX = 'RX' + TRX = 'TRX' + + +class CodingScheme(Enum): + field_0_10 = '0-10' + field_13_14 = '13-14' + + +class SmsDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + body: str + + +class SmsProviderConfiguration(BaseModel): + type: str + + +class Spec(Enum): + TELEMETRY_QUERYING = 'TELEMETRY_QUERYING' + CLIENT_ATTRIBUTES_QUERYING = 'CLIENT_ATTRIBUTES_QUERYING' + SHARED_ATTRIBUTES_SETTING = 'SHARED_ATTRIBUTES_SETTING' + TO_DEVICE_RPC_REQUEST = 'TO_DEVICE_RPC_REQUEST' + TO_SERVER_RPC_REQUEST = 'TO_SERVER_RPC_REQUEST' + + +class SnmpCommunicationConfig(BaseModel): + spec: Optional[Spec] = None + + +class SnmpDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): + timeoutMs: Optional[int] = None + retries: Optional[int] = None + communicationConfigs: Optional[List[SnmpCommunicationConfig]] = None + + +class ProtocolVersion1(Enum): + V1 = 'V1' + V2C = 'V2C' + V3 = 'V3' + + +class AuthenticationProtocol(Enum): + SHA_1 = 'SHA_1' + SHA_224 = 'SHA_224' + SHA_256 = 'SHA_256' + SHA_384 = 'SHA_384' + SHA_512 = 'SHA_512' + MD5 = 'MD5' + + +class PrivacyProtocol(Enum): + DES = 'DES' + AES_128 = 'AES_128' + AES_192 = 'AES_192' + AES_256 = 'AES_256' + + +class SnmpDeviceTransportConfiguration(DeviceTransportConfiguration): + host: Optional[str] = None + port: Optional[int] = None + protocolVersion: Optional[ProtocolVersion1] = None + community: Optional[str] = None + username: Optional[str] = None + securityName: Optional[str] = None + contextName: Optional[str] = None + authenticationProtocol: Optional[AuthenticationProtocol] = None + authenticationPassphrase: Optional[str] = None + privacyProtocol: Optional[PrivacyProtocol] = None + privacyPassphrase: Optional[str] = None + engineId: Optional[str] = None + + +class DataType(Enum): + BOOLEAN = 'BOOLEAN' + LONG = 'LONG' + DOUBLE = 'DOUBLE' + STRING = 'STRING' + JSON = 'JSON' + + +class SnmpMapping(BaseModel): + oid: Optional[str] = None + key: Optional[str] = None + dataType: Optional[DataType] = None + + +class SolutionInstallResponse(BaseModel): + dashboardGroupId: Optional[EntityGroupId] = Field( + None, description='Id of the group that contains main dashboard of the solution' + ) + dashboardId: Optional[DashboardId] = Field( + None, description='Id of the main dashboard of the solution' + ) + publicId: Optional[CustomerId] = Field( + None, description='Id of the public customer if solution has public entities' + ) + mainDashboardPublic: Optional[bool] = Field( + None, description='Is the main dashboard public' + ) + details: Optional[str] = Field( + None, description='Markdown with solution usage instructions' + ) + success: Optional[bool] = Field( + None, description='Indicates that template was installed successfully' + ) + + +class StarredDashboardInfo(BaseModel): + id: Optional[UUID] = Field(None, description='JSON object with Dashboard id.') + title: Optional[str] = Field(None, description='Title of the dashboard.') + starredAt: Optional[int] = Field(None, description='Starred timestamp') + + +class StateEntityOwnerFilter(EntityFilter): + singleEntity: Optional[EntityId] = None + + +class StatisticsEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + minMessagesProcessed: Optional[int] = Field( + None, + description='The minimum number of successfully processed messages', + example=25, + ) + maxMessagesProcessed: Optional[int] = Field( + None, + description='The maximum number of successfully processed messages', + example=250, + ) + minErrorsOccurred: Optional[int] = Field( + None, + description='The minimum number of errors occurred during messages processing', + example=30, + ) + maxErrorsOccurred: Optional[int] = Field( + None, + description='The maximum number of errors occurred during messages processing', + example=300, + ) + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class StoreInfo(BaseModel): + appId: Optional[str] = None + sha256CertFingerprints: Optional[str] = None + storeLink: Optional[str] = None + + +class Operation4(Enum): + 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' + + +class StringFilterPredicate(KeyFilterPredicate): + operation: Optional[Operation4] = None + value: Optional[FilterPredicateValueString] = None + ignoreCase: Optional[bool] = None + + +class Type31(Enum): + BURST = 'BURST' + BATCH = 'BATCH' + SEQUENTIAL_BY_ORIGINATOR = 'SEQUENTIAL_BY_ORIGINATOR' + SEQUENTIAL_BY_TENANT = 'SEQUENTIAL_BY_TENANT' + SEQUENTIAL = 'SEQUENTIAL' + + +class SubmitStrategy(BaseModel): + type: Optional[Type31] = None + batchSize: Optional[int] = None + + +class SubscriptionUsage(BaseModel): + devices: Optional[int] = None + assets: Optional[int] = None + customers: Optional[int] = None + users: Optional[int] = None + dashboards: Optional[int] = None + ruleChains: Optional[int] = None + integrations: Optional[int] = None + converters: Optional[int] = None + schedulerEvents: Optional[int] = None + transportMessages: Optional[int] = None + transportDataPoints: Optional[int] = None + reExecutions: Optional[int] = None + jsExecutions: Optional[int] = None + dpStorageDays: Optional[int] = None + emails: Optional[int] = None + sms: Optional[int] = None + alarms: Optional[int] = None + + +class SystemInfoData(BaseModel): + serviceId: Optional[str] = Field(None, description='Service Id.') + serviceType: Optional[str] = Field(None, description='Service type.') + cpuUsage: Optional[int] = Field(None, description='CPU usage, in percent.') + cpuCount: Optional[int] = Field(None, description='Total CPU usage.') + memoryUsage: Optional[int] = Field( + None, description='Memory usage, in percent.' + ) + totalMemory: Optional[int] = Field( + None, description='Total memory in bytes.' + ) + discUsage: Optional[int] = Field( + None, description='Disk usage, in percent.' + ) + totalDiscSpace: Optional[int] = Field( + None, description='Total disc space in bytes.' + ) + + +class TaskProcessingFailureNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + pass + + +class ResourceType(Enum): + LWM2M_MODEL = 'LWM2M_MODEL' + JKS = 'JKS' + PKCS_12 = 'PKCS_12' + JS_MODULE = 'JS_MODULE' + IMAGE = 'IMAGE' + DASHBOARD = 'DASHBOARD' + + +class ResourceSubType(Enum): + IMAGE = 'IMAGE' + SCADA_SYMBOL = 'SCADA_SYMBOL' + EXTENSION = 'EXTENSION' + MODULE = 'MODULE' + + +class TbResourceDeleteResult(BaseModel): + success: Optional[bool] = None + references: Optional[Dict[str, List[HasIdObject]]] = None + + +class EntityType45(Enum): + TB_RESOURCE = 'TB_RESOURCE' + + +class TbResourceId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType45 = Field(..., description='string', example='TB_RESOURCE') + + +class TelemetryEntityView(BaseModel): + timeseries: List[str] = Field( + ..., + description='List of time-series data keys to expose', + example=['temperature', 'humidity'], + ) + attributes: AttributesEntityView = Field( + ..., description='JSON object with attributes to expose' + ) + + +class TelemetryMappingConfiguration(BaseModel): + keyName: Optional[Dict[str, str]] = None + observe: Optional[List[str]] = Field(None, Set=True) + attribute: Optional[List[str]] = Field(None, Set=True) + telemetry: Optional[List[str]] = Field(None, Set=True) + attributeLwm2m: Optional[Dict[str, ObjectAttributes]] = None + + +class TelemetryQueryingSnmpCommunicationConfig(SnmpCommunicationConfig): + mappings: Optional[List[SnmpMapping]] = None + queryingFrequencyMs: Optional[int] = None + + +class EntityType46(Enum): + TENANT = 'TENANT' + + +class TenantId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType46 = Field(..., description='string', example='TENANT') + + +class TenantProfileConfiguration(BaseModel): + type: str + + +class EntityType47(Enum): + TENANT_PROFILE = 'TENANT_PROFILE' + + +class TenantProfileId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType47 = Field( + ..., description='string', example='TENANT_PROFILE' + ) + + +class TenantProfileQueueConfiguration(BaseModel): + name: Optional[str] = None + topic: Optional[str] = None + pollInterval: Optional[int] = None + partitions: Optional[int] = None + consumerPerPartition: Optional[bool] = None + packProcessingTimeout: Optional[int] = None + submitStrategy: Optional[SubmitStrategy] = None + processingStrategy: Optional[ProcessingStrategy] = None + additionalInfo: Optional[JsonNode] = None + + +class Level(Enum): + MAKER = 'MAKER' + PROTOTYPE = 'PROTOTYPE' + STARTUP = 'STARTUP' + + +class TenantSolutionTemplateDetails(BaseModel): + id: Optional[str] = Field( + None, + description='ID of the solution template', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + title: Optional[str] = Field( + None, description='Template Title', example='Smart office' + ) + level: Optional[Level] = Field( + None, + description='Level of the subscription that is required to unlock the template', + example='PROTOTYPE', + ) + installTimeoutMs: Optional[int] = Field( + None, + description='Timeout for the installation UI to wait while template is installing', + ) + tenantTelemetryKeys: Optional[List[str]] = Field( + None, description='What keys to delete during template uninstall' + ) + tenantAttributeKeys: Optional[List[str]] = Field( + None, description='What attributes to delete during template uninstall' + ) + imageUrls: Optional[List[str]] = None + highlights: Optional[str] = None + description: Optional[str] = None + installed: Optional[bool] = None + + +class TenantSolutionTemplateInfo(BaseModel): + id: Optional[str] = Field( + None, + description='ID of the solution template', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + title: Optional[str] = Field( + None, description='Template Title', example='Smart office' + ) + level: Optional[Level] = Field( + None, + description='Level of the subscription that is required to unlock the template', + example='PROTOTYPE', + ) + installTimeoutMs: Optional[int] = Field( + None, + description='Timeout for the installation UI to wait while template is installing', + ) + tenantTelemetryKeys: Optional[List[str]] = Field( + None, description='What keys to delete during template uninstall' + ) + tenantAttributeKeys: Optional[List[str]] = Field( + None, description='What attributes to delete during template uninstall' + ) + previewImageUrl: Optional[str] = Field(None, description='URL of the preview image') + videoPreviewImageUrl: Optional[str] = Field( + None, description='Video preview image URL' + ) + previewMp4Url: Optional[str] = Field(None, description='Video MP4 URL') + previewWebmUrl: Optional[str] = Field(None, description='Video WEBM URL') + installed: Optional[bool] = Field( + None, + description='Indicates that template is already installed for the current tenant', + ) + + +class TenantSolutionTemplateInstructions(BaseModel): + dashboardGroupId: Optional[EntityGroupId] = Field( + None, description='Id of the group that contains main dashboard of the solution' + ) + dashboardId: Optional[DashboardId] = Field( + None, description='Id of the main dashboard of the solution' + ) + publicId: Optional[CustomerId] = Field( + None, description='Id of the public customer if solution has public entities' + ) + mainDashboardPublic: Optional[bool] = Field( + None, description='Is the main dashboard public' + ) + details: Optional[str] = Field( + None, description='Markdown with solution usage instructions' + ) + + +class ThingsboardCredentialsExpiredResponse(BaseModel): + status: Optional[int] = Field( + None, description='HTTP Response Status Code', example=401 + ) + message: Optional[str] = Field( + None, description='Error message', example='Authentication failed' + ) + errorCode: Optional[int] = Field( + None, + description='Platform error code:\n* `2` - General error (HTTP: 500 - Internal Server Error)\n\n* `10` - Authentication failed (HTTP: 401 - Unauthorized)\n\n* `11` - JWT token expired (HTTP: 401 - Unauthorized)\n\n* `15` - Credentials expired (HTTP: 401 - Unauthorized)\n\n* `20` - Permission denied (HTTP: 403 - Forbidden)\n\n* `30` - Invalid arguments (HTTP: 400 - Bad Request)\n\n* `31` - Bad request params (HTTP: 400 - Bad Request)\n\n* `32` - Item not found (HTTP: 404 - Not Found)\n\n* `33` - Too many requests (HTTP: 429 - Too Many Requests)\n\n* `34` - Too many updates (Too many updates over Websocket session)\n\n* `40` - Subscription violation (HTTP: 403 - Forbidden)', + example=10, + ) + timestamp: Optional[int] = Field(None, description='Timestamp') + subscriptionErrorCode: Optional[int] = Field( + None, + description="Subscription error code:\n* `1` - Entities limit reached (HTTP: 403 - Forbidden)\n\n* `2` - Feature disabled (HTTP: 403 - Forbidden)\n\n* `3` - Subscription is not active (HTTP: 403 - Forbidden)\n\n* `4` - Billing error (HTTP: 400 - Bad Request)\n\n* `5` - Permission denied (HTTP: 403 - Forbidden)\n\n* `6` - Unable to change plan due to entities limits overflow (HTTP: 403 - Forbidden)\n\n* `7` - Solution template level doesn't meet subscription plan (HTTP: 403 - Forbidden)", + example=1, + ) + subscriptionEntry: Optional[int] = Field( + None, + description='Subscription entry:\n* `1` - Devices count\n\n* `2` - Assets count\n\n* `3` - Customers count\n\n* `4` - Users count\n\n* `5` - Dashboards count\n\n* `6` - Rule chains count\n\n* `7` - Integrations count\n\n* `8` - Converters count\n\n* `9` - Scheduler events count\n\n* `30` - White-labeling', + example=1, + ) + subscriptionValue: Optional[JsonNode] = None + resetToken: Optional[str] = Field(None, description='Password reset token') + + +class ThingsboardErrorResponse(BaseModel): + message: Optional[str] = Field( + None, description='Error message', example='Authentication failed' + ) + errorCode: Optional[int] = Field( + None, + description='Platform error code:\n* `2` - General error (HTTP: 500 - Internal Server Error)\n\n* `10` - Authentication failed (HTTP: 401 - Unauthorized)\n\n* `11` - JWT token expired (HTTP: 401 - Unauthorized)\n\n* `15` - Credentials expired (HTTP: 401 - Unauthorized)\n\n* `20` - Permission denied (HTTP: 403 - Forbidden)\n\n* `30` - Invalid arguments (HTTP: 400 - Bad Request)\n\n* `31` - Bad request params (HTTP: 400 - Bad Request)\n\n* `32` - Item not found (HTTP: 404 - Not Found)\n\n* `33` - Too many requests (HTTP: 429 - Too Many Requests)\n\n* `34` - Too many updates (Too many updates over Websocket session)\n\n* `40` - Subscription violation (HTTP: 403 - Forbidden)', + example=10, + ) + status: Optional[int] = Field( + None, description='HTTP Response Status Code', example=401 + ) + subscriptionErrorCode: Optional[int] = Field( + None, + description="Subscription error code:\n* `1` - Entities limit reached (HTTP: 403 - Forbidden)\n\n* `2` - Feature disabled (HTTP: 403 - Forbidden)\n\n* `3` - Subscription is not active (HTTP: 403 - Forbidden)\n\n* `4` - Billing error (HTTP: 400 - Bad Request)\n\n* `5` - Permission denied (HTTP: 403 - Forbidden)\n\n* `6` - Unable to change plan due to entities limits overflow (HTTP: 403 - Forbidden)\n\n* `7` - Solution template level doesn't meet subscription plan (HTTP: 403 - Forbidden)", + example=1, + ) + subscriptionEntry: Optional[int] = Field( + None, + description='Subscription entry:\n* `1` - Devices count\n\n* `2` - Assets count\n\n* `3` - Customers count\n\n* `4` - Users count\n\n* `5` - Dashboards count\n\n* `6` - Rule chains count\n\n* `7` - Integrations count\n\n* `8` - Converters count\n\n* `9` - Scheduler events count\n\n* `30` - White-labeling', + example=1, + ) + subscriptionValue: Optional[JsonNode] = None + timestamp: Optional[int] = Field(None, description='Timestamp') + + +class ToCoreEdqsRequest(BaseModel): + syncRequest: Optional[EdqsSyncRequest] = None + apiEnabled: Optional[bool] = None + + +class ToDeviceRpcRequestSnmpCommunicationConfig(SnmpCommunicationConfig): + mappings: Optional[List[SnmpMapping]] = None + + +class ToServerRpcRequestSnmpCommunicationConfig(SnmpCommunicationConfig): + mappings: Optional[List[SnmpMapping]] = None + + +class TranslationInfo(BaseModel): + localeCode: Optional[str] = Field( + None, + description='Locale code formed by combining the ISO 639-1 language code and the ISO 3166-1 region code. For example, "en_US"', + ) + language: Optional[str] = Field( + None, + description='Locale code language display name. For example, "Polish (Polski)"', + ) + country: Optional[str] = Field( + None, description='Locale code country display name. For example, "Poland"' + ) + progress: Optional[int] = Field( + None, + description='Number representing translation percentage progress. For example, 40 that means 40% of all keys are translated.', + ) + customized: Optional[bool] = Field( + None, description='Boolean representing if current language has customization.' + ) + + +class TransportPayloadTypeConfiguration(BaseModel): + transportPayloadType: str + + +class TsValue(BaseModel): + ts: Optional[int] = None + value: Optional[str] = None + count: Optional[int] = None + + +class TwilioSmsProviderConfiguration(SmsProviderConfiguration): + accountSid: Optional[str] = Field(None, description='Twilio account Sid.') + accountToken: Optional[str] = Field(None, description='Twilio account Token.') + numberFrom: Optional[str] = Field(None, description='The number/id of a sender.') + + +class TwoFaAccountConfig(BaseModel): + useByDefault: Optional[bool] = None + providerType: str + + +class TwoFaAccountConfigUpdateRequest(BaseModel): + useByDefault: Optional[bool] = None + + +class TwoFaProviderConfig(BaseModel): + providerType: str + + +class Type32(Enum): + TOTP = 'TOTP' + SMS = 'SMS' + EMAIL = 'EMAIL' + BACKUP_CODE = 'BACKUP_CODE' + + +class TwoFaProviderInfo(BaseModel): + type: Optional[Type32] = None + isDefault: Optional[bool] = None + contact: Optional[str] = None + minVerificationCodeSendPeriod: Optional[int] = None + default: Optional[bool] = None + + +class UpdateMessage(BaseModel): + updateAvailable: Optional[bool] = Field( + None, description="'True' if new platform update is available." + ) + currentVersion: Optional[str] = Field( + None, description='Current ThingsBoard version.' + ) + latestVersion: Optional[str] = Field( + None, description='Latest ThingsBoard version.' + ) + upgradeInstructionsUrl: Optional[str] = Field( + None, description='Upgrade instructions URL.' + ) + currentVersionReleaseNotesUrl: Optional[str] = Field( + None, description='Current ThingsBoard version release notes URL.' + ) + latestVersionReleaseNotesUrl: Optional[str] = Field( + None, description='Latest ThingsBoard version release notes URL.' + ) + + +class UsageInfo(BaseModel): + devices: Optional[int] = None + maxDevices: Optional[int] = None + assets: Optional[int] = None + maxAssets: Optional[int] = None + customers: Optional[int] = None + maxCustomers: Optional[int] = None + users: Optional[int] = None + maxUsers: Optional[int] = None + dashboards: Optional[int] = None + maxDashboards: Optional[int] = None + edges: Optional[int] = None + maxEdges: Optional[int] = None + transportMessages: Optional[int] = None + maxTransportMessages: Optional[int] = None + jsExecutions: Optional[int] = None + tbelExecutions: Optional[int] = None + maxJsExecutions: Optional[int] = None + maxTbelExecutions: Optional[int] = None + emails: Optional[int] = None + maxEmails: Optional[int] = None + sms: Optional[int] = None + maxSms: Optional[int] = None + smsEnabled: Optional[bool] = None + alarms: Optional[int] = None + maxAlarms: Optional[int] = None + + +class Authority(Enum): + SYS_ADMIN = 'SYS_ADMIN' + TENANT_ADMIN = 'TENANT_ADMIN' + CUSTOMER_USER = 'CUSTOMER_USER' + BILLING_ADMIN = 'BILLING_ADMIN' + BILLING_SERVICE = 'BILLING_SERVICE' + REFRESH_TOKEN = 'REFRESH_TOKEN' + PRE_VERIFICATION_TOKEN = 'PRE_VERIFICATION_TOKEN' + + +class UserActivationLink(BaseModel): + value: Optional[str] = None + ttlMs: Optional[int] = None + + +class UserDashboardsInfo(BaseModel): + last: Optional[List[LastVisitedDashboardInfo]] = Field( + None, description='List of last visited dashboards.' + ) + starred: Optional[List[StarredDashboardInfo]] = Field( + None, description='List of starred dashboards.' + ) + + +class EntityType48(Enum): + USER = 'USER' + + +class UserId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType48 = Field(..., description='string', example='USER') + + +class UserInfo(BaseModel): + id: Optional[UserId] = Field( + None, + description='JSON object with the User Id. Specify this field to update the device. Referencing non-existing User Id will cause error. Omit this field to create new customer.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the user creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with the Tenant Id.' + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with the Customer Id.' + ) + email: str = Field(..., description='Email of the user', example='user@example.com') + authority: Authority = Field( + ..., description='Authority', example='SYS_ADMIN, TENANT_ADMIN or CUSTOMER_USER' + ) + firstName: Optional[str] = Field( + None, description='First name of the user', example='John' + ) + lastName: Optional[str] = Field( + None, description='Last name of the user', example='Doe' + ) + phone: Optional[str] = Field( + None, description='Phone number of the user', example=38012345123 + ) + customMenuId: Optional[CustomMenuId] = None + version: Optional[int] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + name: Optional[str] = Field( + None, + description='Duplicates the email of the user, readonly', + example='user@example.com', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the user' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class UserNotificationSettings(BaseModel): + prefs: Dict[str, NotificationPref] + + +class UserPasswordPolicy(BaseModel): + minimumLength: Optional[int] = Field( + None, description='Minimum number of symbols in the password.' + ) + maximumLength: Optional[int] = Field( + None, description='Maximum number of symbols in the password.' + ) + minimumUppercaseLetters: Optional[int] = Field( + None, description='Minimum number of uppercase letters in the password.' + ) + minimumLowercaseLetters: Optional[int] = Field( + None, description='Minimum number of lowercase letters in the password.' + ) + minimumDigits: Optional[int] = Field( + None, description='Minimum number of digits in the password.' + ) + minimumSpecialCharacters: Optional[int] = Field( + None, description='Minimum number of special in the password.' + ) + allowWhitespaces: Optional[bool] = Field(None, description='Allow whitespaces') + forceUserToResetPasswordIfNotValid: Optional[bool] = Field( + None, + description='Force user to update password if existing one does not pass validation', + ) + passwordExpirationPeriodDays: Optional[int] = Field( + None, + description='Password expiration period (days). Force expiration of the password.', + ) + passwordReuseFrequencyDays: Optional[int] = Field( + None, + description='Password reuse frequency (days). Disallow to use the same password for the defined number of days', + ) + + +class UsersFilter(BaseModel): + type: str + + +class V2CaptchaParams(CaptchaParams): + siteKey: Optional[str] = Field( + None, description="Captcha site key for 'I'm not a robot' validation" + ) + logActionName: Optional[str] = Field( + None, + description="Optional action name used for logging (for captcha version 'v3' and 'enterprise')", + ) + secretKey: Optional[str] = Field( + None, + description='Secret key to validate the Captcha. Should match the Captcha Site Key.', + ) + + +class V3CaptchaParams(CaptchaParams): + siteKey: Optional[str] = Field( + None, description="Captcha site key for 'I'm not a robot' validation" + ) + logActionName: Optional[str] = Field( + None, + description="Optional action name used for logging (for captcha version 'v3' and 'enterprise')", + ) + secretKey: Optional[str] = Field( + None, + description='Secret key to validate the Captcha. Should match the Captcha Site Key.', + ) + + +class Vendor(BaseModel): + name: Optional[str] = None + logo: Optional[str] = None + + +class Version(RootModel): + root: Any + + +class VersionCreateConfig(BaseModel): + saveRelations: Optional[bool] = None + saveAttributes: Optional[bool] = None + saveCredentials: Optional[bool] = None + saveCalculatedFields: Optional[bool] = None + savePermissions: Optional[bool] = None + saveGroupEntities: Optional[bool] = None + + +class Type33(Enum): + SINGLE_ENTITY = 'SINGLE_ENTITY' + COMPLEX = 'COMPLEX' + + +class VersionCreateRequest(BaseModel): + versionName: Optional[str] = None + branch: Optional[str] = None + type: Optional[Type33] = None + + +class VersionCreationResult(BaseModel): + version: Optional[EntityVersion] = None + added: Optional[int] = None + modified: Optional[int] = None + removed: Optional[int] = None + error: Optional[str] = None + done: Optional[bool] = None + + +class VersionLoadConfig(BaseModel): + loadRelations: Optional[bool] = None + loadAttributes: Optional[bool] = None + loadCredentials: Optional[bool] = None + loadCalculatedFields: Optional[bool] = None + loadPermissions: Optional[bool] = None + loadGroupEntities: Optional[bool] = None + autoGenerateIntegrationKey: Optional[bool] = None + + +class Type34(Enum): + SINGLE_ENTITY = 'SINGLE_ENTITY' + ENTITY_TYPE = 'ENTITY_TYPE' + + +class VersionLoadRequest(BaseModel): + versionId: Optional[str] = None + type: Optional[Type34] = None + + +class VersionLoadResult(BaseModel): + result: Optional[List[EntityTypeLoadResult]] = None + error: Optional[EntityLoadError] = None + done: Optional[bool] = None + + +class VersionedEntityInfo(BaseModel): + externalId: Optional[EntityId] = None + path: Optional[str] = None + + +class WebDeliveryMethodNotificationTemplate(DeliveryMethodNotificationTemplate): + subject: str + additionalConfig: Optional[Any] = None + body: str + + +class WebViewPage(MobilePage): + url: Optional[str] = Field(None, description='Url', example='/url') + label: Optional[str] = Field(None, description='Page label', example='Air quality') + visible: bool = Field(..., description='Indicates if page is visible', example=True) + icon: Optional[str] = Field( + None, description='URL of the page icon', example='home_icon' + ) + + +class Type35(Enum): + LOGIN = 'LOGIN' + GENERAL = 'GENERAL' + MAIL_TEMPLATES = 'MAIL_TEMPLATES' + SELF_REGISTRATION = 'SELF_REGISTRATION' + TERMS_OF_USE = 'TERMS_OF_USE' + PRIVACY_POLICY = 'PRIVACY_POLICY' + + +class WhiteLabeling(BaseModel): + tenantId: Optional[TenantId] = None + customerId: Optional[CustomerId] = None + type: Optional[Type35] = None + settings: Optional[JsonNode] = None + legacyDomain: Optional[str] = None + domainId: Optional[DomainId] = None + + +class WhiteLabelingParams(BaseModel): + logoImageUrl: Optional[str] = Field( + None, + description='Logo image URL', + example='https://company.com/images/logo.png', + ) + logoImageHeight: Optional[int] = Field( + None, + description='The height of a logo container. Logo image will be automatically scaled.', + ) + appTitle: Optional[str] = Field( + None, + description='White-labeled name of the platform', + example='My Company IoT Platform', + ) + favicon: Optional[Favicon] = Field( + None, description='JSON object that contains website icon url and type' + ) + paletteSettings: Optional[PaletteSettings] = Field( + None, + description='Complex JSON that describes structure of the Angular Material Palette. See [theming](https://material.angular.io/guide/theming) for more details', + ) + helpLinkBaseUrl: Optional[str] = Field(None, description='Base URL for help link') + uiHelpBaseUrl: Optional[str] = Field( + None, + description='Base URL for the repository with the UI help components (markdown)', + ) + enableHelpLinks: Optional[bool] = Field( + None, description='Enable or Disable help links' + ) + whiteLabelingEnabled: Optional[bool] = Field( + None, description='Enable white-labeling' + ) + showNameVersion: Optional[bool] = Field( + None, description='Show platform name and version on UI and login screen' + ) + platformName: Optional[str] = Field(None, description='White-labeled platform name') + platformVersion: Optional[str] = Field( + None, description='White-labeled platform version' + ) + customCss: Optional[str] = Field(None, description='Custom CSS content') + hideConnectivityDialog: Optional[bool] = Field( + None, description='Hide device connectivity dialog' + ) + + +class WidgetBundleInfo(BaseModel): + id: Optional[EntityId] = Field(None, description='JSON object with the entity Id. ') + name: Optional[str] = Field(None, description='Entity Name') + + +class EntityType49(Enum): + WIDGET_TYPE = 'WIDGET_TYPE' + + +class WidgetTypeId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType49 = Field(..., description='string', example='WIDGET_TYPE') + + +class WidgetTypeInfo(BaseModel): + id: Optional[WidgetTypeId] = Field( + None, + description='JSON object with the Widget Type Id. Specify this field to update the Widget Type. Referencing non-existing Widget Type Id will cause error. Omit this field to create new Widget Type.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the Widget Type creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + fqn: Optional[str] = Field( + None, + description='Unique FQN that is used in dashboards as a reference widget type', + ) + name: Optional[str] = Field(None, description='Widget name used in search and UI') + deprecated: Optional[bool] = Field( + None, description='Whether widget type is deprecated.', example=True + ) + scada: Optional[bool] = Field( + None, description='Whether widget type is SCADA symbol.', example=True + ) + version: Optional[int] = None + image: Optional[str] = Field(None, description='Base64 encoded widget thumbnail') + description: Optional[str] = Field( + None, description='Description of the widget type' + ) + tags: Optional[List[str]] = Field(None, description='Tags of the widget type') + widgetType: Optional[str] = Field( + None, + description='Type of the widget (timeseries, latest, control, alarm or static)', + ) + bundles: Optional[List[WidgetBundleInfo]] = Field(None, description='Bundles') + + +class EntityType50(Enum): + WIDGETS_BUNDLE = 'WIDGETS_BUNDLE' + + +class WidgetsBundleId(BaseModel): + id: UUID = Field( + ..., + description='ID of the entity, time-based UUID v1', + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + entityType: EntityType50 = Field( + ..., description='string', example='WIDGETS_BUNDLE' + ) + + +class X509CertificateChainProvisionConfiguration(DeviceProfileProvisionConfiguration): + certificateRegExPattern: Optional[str] = None + allowCreateNewDevicesByX509Certificate: Optional[bool] = None + + +class X509LwM2MBootstrapServerCredential(LwM2MBootstrapServerCredential): + shortServerId: Optional[int] = Field( + None, + description="Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + example=123, + ) + bootstrapServerIs: Optional[bool] = Field( + None, + description='Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.', + example=True, + ) + host: Optional[str] = Field( + None, description="Host for 'No Security' mode", example='0.0.0.0' + ) + port: Optional[int] = Field( + None, + description="Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + example="'5685' or '5687'", + ) + clientHoldOffTime: Optional[int] = Field( + None, + description='Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)', + example=1, + ) + serverPublicKey: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + example='MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==', + ) + serverCertificate: Optional[str] = Field( + None, + description="Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + example='MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=', + ) + bootstrapServerAccountTimeout: Optional[int] = Field( + None, + description='Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)', + example=0, + ) + lifetime: Optional[int] = Field( + None, + description='Specify the lifetime of the registration in seconds.', + example=300, + ) + defaultMinPeriod: Optional[int] = Field( + None, + description='The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.', + example=1, + ) + notifIfDisabled: Optional[bool] = Field( + None, + description='If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.', + example=True, + ) + binding: Optional[str] = Field( + None, + description='This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.', + example='U', + ) + + +class AdminSettings(BaseModel): + id: Optional[AdminSettingsId] = Field( + None, description='The Id of the Administration Settings, auto-generated, UUID' + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the settings creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + key: Optional[str] = Field( + None, + description="The Administration Settings key, (e.g. 'general' or 'mail')", + example='mail', + ) + jsonValue: Optional[JsonNode] = Field( + None, description='JSON representation of the Administration Settings value' + ) + + +class AffectedTenantAdministratorsFilter(UsersFilter): + pass + + +class AffectedUserFilter(UsersFilter): + pass + + +class Alarm(BaseModel): + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + type: str = Field( + ..., + description='representing type of the Alarm', + example='High Temperature Alarm', + ) + originator: EntityId = Field( + ..., description='JSON object with alarm originator id' + ) + severity: Severity = Field(..., description='Alarm severity', example='CRITICAL') + acknowledged: bool = Field(..., description='Acknowledged', example=True) + cleared: bool = Field(..., description='Cleared', example=False) + assigneeId: Optional[UserId] = Field(None, description='Alarm assignee user id') + startTs: Optional[int] = Field( + None, + description='Timestamp of the alarm start time, in milliseconds', + example=1634058704565, + ) + endTs: Optional[int] = Field( + None, + description='Timestamp of the alarm end time(last time update), in milliseconds', + example=1634111163522, + ) + ackTs: Optional[int] = Field( + None, + description='Timestamp of the alarm acknowledgement, in milliseconds', + example=1634115221948, + ) + clearTs: Optional[int] = Field( + None, + description='Timestamp of the alarm clearing, in milliseconds', + example=1634114528465, + ) + assignTs: Optional[int] = Field( + None, + description='Timestamp of the alarm assignment, in milliseconds', + example=1634115928465, + ) + details: Optional[JsonNode] = None + propagate: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to parent entities of alarm originator', + example=True, + ) + propagateToOwner: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator', + example=True, + ) + propagateToOwnerHierarchy: Optional[bool] = Field( + 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', + example=True, + ) + propagateToTenant: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the tenant entity', + example=True, + ) + propagateRelationTypes: Optional[List[str]] = Field( + 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.", + ) + id: Optional[AlarmId] = Field( + None, + description='JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the alarm creation, in milliseconds', + example=1634058704567, + ) + name: str = Field( + ..., + description='representing type of the Alarm', + example='High Temperature Alarm', + ) + status: Status = Field( + ..., description='status of the Alarm', example='ACTIVE_UNACK' + ) + + +class AlarmAssignee(BaseModel): + id: Optional[UserId] = None + firstName: Optional[str] = None + lastName: Optional[str] = None + email: Optional[str] = None + + +class AlarmAssignmentNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + alarmTypes: Optional[List[str]] = Field(None, Set=True) + alarmSeverities: Optional[List[AlarmSeverity]] = Field(None, Set=True) + alarmStatuses: Optional[List[AlarmStatus]] = Field(None, Set=True) + notifyOn: List[NotifyOnEnum] = Field(..., Set=True) + + +class AlarmComment(BaseModel): + alarmId: Optional[AlarmId] = Field(None, description='JSON object with Alarm id.') + userId: Optional[UserId] = Field(None, description='JSON object with User id.') + type: Optional[Type] = Field( + None, + description='Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.', + example='SYSTEM/OTHER', + ) + comment: Optional[JsonNode] = Field( + None, description='JSON object with text of comment.' + ) + id: Optional[AlarmCommentId] = Field( + None, + description='JSON object with the alarm comment Id. Specify this field to update the alarm comment. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the alarm comment creation, in milliseconds', + example=1634058704567, + ) + name: Optional[str] = Field( + None, description='representing comment text', example='Please take a look' + ) + + +class AlarmCommentInfo(BaseModel): + id: Optional[AlarmCommentId] = Field( + None, + description='JSON object with the alarm comment Id. Specify this field to update the alarm comment. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the alarm comment creation, in milliseconds', + example=1634058704567, + ) + alarmId: Optional[AlarmId] = Field(None, description='JSON object with Alarm id.') + userId: Optional[UserId] = Field(None, description='JSON object with User id.') + type: Optional[Type] = Field( + None, + description='Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.', + example='SYSTEM/OTHER', + ) + comment: Optional[JsonNode] = Field( + None, description='JSON object with text of comment.' + ) + firstName: Optional[str] = Field( + None, description='User first name', example='John' + ) + lastName: Optional[str] = Field(None, description='User last name', example='Brown') + email: Optional[str] = Field( + None, description='User email address', example='johnBrown@gmail.com' + ) + name: Optional[str] = Field( + None, description='representing comment text', example='Please take a look' + ) + + +class AlarmCommentNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + alarmTypes: Optional[List[str]] = Field(None, Set=True) + alarmSeverities: Optional[List[AlarmSeverity]] = Field(None, Set=True) + alarmStatuses: Optional[List[AlarmStatus]] = Field(None, Set=True) + onlyUserComments: Optional[bool] = None + notifyOnCommentUpdate: Optional[bool] = None + + +class AlarmData(BaseModel): + id: Optional[AlarmId] = Field( + None, + description='JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the alarm creation, in milliseconds', + example=1634058704567, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + type: str = Field( + ..., + description='representing type of the Alarm', + example='High Temperature Alarm', + ) + originator: EntityId = Field( + ..., description='JSON object with alarm originator id' + ) + severity: Severity = Field(..., description='Alarm severity', example='CRITICAL') + acknowledged: bool = Field(..., description='Acknowledged', example=True) + cleared: bool = Field(..., description='Cleared', example=False) + assigneeId: Optional[UserId] = Field(None, description='Alarm assignee user id') + startTs: Optional[int] = Field( + None, + description='Timestamp of the alarm start time, in milliseconds', + example=1634058704565, + ) + endTs: Optional[int] = Field( + None, + description='Timestamp of the alarm end time(last time update), in milliseconds', + example=1634111163522, + ) + ackTs: Optional[int] = Field( + None, + description='Timestamp of the alarm acknowledgement, in milliseconds', + example=1634115221948, + ) + clearTs: Optional[int] = Field( + None, + description='Timestamp of the alarm clearing, in milliseconds', + example=1634114528465, + ) + assignTs: Optional[int] = Field( + None, + description='Timestamp of the alarm assignment, in milliseconds', + example=1634115928465, + ) + propagate: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to parent entities of alarm originator', + example=True, + ) + propagateToOwner: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator', + example=True, + ) + propagateToOwnerHierarchy: Optional[bool] = Field( + 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', + example=True, + ) + propagateToTenant: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the tenant entity', + example=True, + ) + propagateRelationTypes: Optional[List[str]] = Field( + 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.", + ) + originatorName: Optional[str] = Field( + None, description='Alarm originator name', example='Thermostat' + ) + originatorLabel: Optional[str] = Field( + None, description='Alarm originator label', example='Thermostat label' + ) + assignee: Optional[AlarmAssignee] = Field(None, description='Alarm assignee') + entityId: Optional[EntityId] = None + latest: Optional[Dict[str, Dict[str, TsValue]]] = None + name: str = Field( + ..., + description='representing type of the Alarm', + example='High Temperature Alarm', + ) + status: Status = Field( + ..., description='status of the Alarm', example='ACTIVE_UNACK' + ) + details: Optional[JsonNode] = None + + +class AlarmInfo(BaseModel): + id: Optional[AlarmId] = Field( + None, + description='JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the alarm creation, in milliseconds', + example=1634058704567, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + type: str = Field( + ..., + description='representing type of the Alarm', + example='High Temperature Alarm', + ) + originator: EntityId = Field( + ..., description='JSON object with alarm originator id' + ) + severity: Severity = Field(..., description='Alarm severity', example='CRITICAL') + acknowledged: bool = Field(..., description='Acknowledged', example=True) + cleared: bool = Field(..., description='Cleared', example=False) + assigneeId: Optional[UserId] = Field(None, description='Alarm assignee user id') + startTs: Optional[int] = Field( + None, + description='Timestamp of the alarm start time, in milliseconds', + example=1634058704565, + ) + endTs: Optional[int] = Field( + None, + description='Timestamp of the alarm end time(last time update), in milliseconds', + example=1634111163522, + ) + ackTs: Optional[int] = Field( + None, + description='Timestamp of the alarm acknowledgement, in milliseconds', + example=1634115221948, + ) + clearTs: Optional[int] = Field( + None, + description='Timestamp of the alarm clearing, in milliseconds', + example=1634114528465, + ) + assignTs: Optional[int] = Field( + None, + description='Timestamp of the alarm assignment, in milliseconds', + example=1634115928465, + ) + propagate: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to parent entities of alarm originator', + example=True, + ) + propagateToOwner: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator', + example=True, + ) + propagateToOwnerHierarchy: Optional[bool] = Field( + 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', + example=True, + ) + propagateToTenant: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the tenant entity', + example=True, + ) + propagateRelationTypes: Optional[List[str]] = Field( + 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.", + ) + originatorName: Optional[str] = Field( + None, description='Alarm originator name', example='Thermostat' + ) + originatorLabel: Optional[str] = Field( + None, description='Alarm originator label', example='Thermostat label' + ) + assignee: Optional[AlarmAssignee] = Field(None, description='Alarm assignee') + name: str = Field( + ..., + description='representing type of the Alarm', + example='High Temperature Alarm', + ) + status: Status = Field( + ..., description='status of the Alarm', example='ACTIVE_UNACK' + ) + details: Optional[JsonNode] = None + + +class AlarmNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + alarmTypes: Optional[List[str]] = Field(None, Set=True) + alarmSeverities: Optional[List[AlarmSeverity]] = Field(None, Set=True) + notifyOn: List[NotifyOnEnum1] = Field(..., Set=True) + clearRule: Optional[ClearRule] = None + + +class AlarmSchedule(BaseModel): + type: Optional[Type3] = None + dynamicValue: Optional[DynamicValueString] = None + + +class AllUsersFilter(UsersFilter): + pass + + +class AllowCreateNewDevicesDeviceProfileProvisionConfiguration( + DeviceProfileProvisionConfiguration +): + pass + + +class AllowedPermissionsInfo(BaseModel): + operationsByResource: Optional[Dict[str, List[OperationsByResourceEnum]]] = Field( + None, + description='Static map (vocabulary) of allowed operations by resource type', + ) + allowedForGroupRoleOperations: Optional[List[AllowedForGroupRoleOperation]] = Field( + None, + description='Static set (vocabulary) of allowed operations for group roles', + Set=True, + ) + allowedForGroupOwnerOnlyOperations: Optional[ + List[AllowedForGroupOwnerOnlyOperation] + ] = Field( + None, + description='Static set (vocabulary) of allowed operations for group owner', + Set=True, + ) + allowedForGroupOwnerOnlyGroupOperations: Optional[ + List[AllowedForGroupOwnerOnlyGroupOperation] + ] = Field( + None, + description='Static set (vocabulary) of allowed group operations for group owner', + Set=True, + ) + allowedResources: Optional[List[AllowedResource]] = Field( + None, + description='Static set (vocabulary) of all possibly allowed resources. Static and depends only on the authority of the user', + Set=True, + ) + userPermissions: Optional[MergedUserPermissions] = Field( + None, + description='JSON object with merged permission for all generic and group roles assigned to all user groups the user belongs to', + ) + userOwnerId: Optional[EntityId] = Field( + None, description='Owner Id of the user (Tenant or Customer)' + ) + + +class AnyTimeSchedule(AlarmSchedule): + pass + + +class ApiUsageLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + apiFeatures: Optional[List[ApiFeature]] = Field(None, Set=True) + notifyOn: Optional[List[NotifyOnEnum2]] = Field(None, Set=True) + + +class ApiUsageStateFilter(EntityFilter): + customerId: Optional[CustomerId] = None + + +class Argument(BaseModel): + refEntityId: Optional[EntityId] = None + refEntityKey: Optional[ReferencedEntityKey] = None + defaultValue: Optional[str] = None + limit: Optional[int] = None + timeWindow: Optional[int] = None + + +class Asset(BaseModel): + id: Optional[AssetId] = Field( + None, + description='JSON object with the asset Id. Specify this field to update the asset. Referencing non-existing asset Id will cause error. Omit this field to create new asset.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the asset creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", + ) + name: str = Field( + ..., + description='Unique Asset Name in scope of Tenant', + example='Empire State Building', + ) + type: Optional[str] = Field(None, description='Asset type', example='Building') + label: Optional[str] = Field( + None, description='Label that may be used in widgets', example='NY Building' + ) + assetProfileId: Optional[AssetProfileId] = Field( + None, description='JSON object with Asset Profile Id.' + ) + version: Optional[int] = None + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the asset' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class AssetInfo(BaseModel): + id: Optional[AssetId] = Field( + None, + description='JSON object with the asset Id. Specify this field to update the asset. Referencing non-existing asset Id will cause error. Omit this field to create new asset.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the asset creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", + ) + name: str = Field( + ..., + description='Unique Asset Name in scope of Tenant', + example='Empire State Building', + ) + type: Optional[str] = Field(None, description='Asset type', example='Building') + label: Optional[str] = Field( + None, description='Label that may be used in widgets', example='NY Building' + ) + assetProfileId: Optional[AssetProfileId] = Field( + None, description='JSON object with Asset Profile Id.' + ) + version: Optional[int] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the asset' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class AssetProfile(BaseModel): + id: Optional[AssetProfileId] = Field( + None, + description='JSON object with the asset profile Id. Specify this field to update the asset profile. Referencing non-existing asset profile Id will cause error. Omit this field to create new asset profile.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the profile creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id that owns the profile.' + ) + name: Optional[str] = Field( + None, + description='Unique Asset Profile Name in scope of Tenant.', + example='Building', + ) + description: Optional[str] = Field(None, description='Asset Profile description. ') + image: Optional[str] = Field( + 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. ', + ) + defaultRuleChainId: Optional[RuleChainId] = Field( + None, + description='Reference to the rule chain. If present, the specified rule chain will be used to process all messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the root rule chain will be used to process those messages.', + ) + defaultDashboardId: Optional[DashboardId] = Field( + None, + description='Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details.', + ) + defaultQueueName: Optional[str] = Field( + None, + description="Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages.", + ) + defaultEdgeRuleChainId: Optional[RuleChainId] = Field( + None, + description='Reference to the edge rule chain. If present, the specified edge rule chain will be used on the edge to process all messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the edge root rule chain will be used to process those messages.', + ) + version: Optional[int] = None + default: Optional[bool] = Field( + None, + description='Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation.', + ) + + +class AssetProfileInfo(BaseModel): + id: Optional[EntityId] = Field(None, description='JSON object with the entity Id. ') + tenantId: Optional[TenantId] = Field(None, description='Tenant id.') + name: Optional[str] = Field(None, description='Entity Name') + image: Optional[str] = Field( + 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. ', + ) + defaultDashboardId: Optional[DashboardId] = Field( + None, + description='Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details.', + ) + + +class AssetSearchQuery(BaseModel): + parameters: Optional[RelationsSearchParameters] = Field( + None, description='Main search parameters.' + ) + relationType: Optional[str] = Field( + None, + description="Type of the relation between root entity and asset (e.g. 'Contains' or 'Manages').", + ) + assetTypes: Optional[List[str]] = Field( + None, + description="Array of asset types to filter the related entities (e.g. 'Building', 'Vehicle').", + ) + + +class AssetSearchQueryFilter(EntityFilter): + rootEntity: Optional[EntityId] = None + relationType: Optional[str] = None + direction: Optional[Direction] = None + maxLevel: Optional[int] = None + fetchLastLevelOnly: Optional[bool] = None + assetTypes: Optional[List[str]] = None + + +class AssetTypeFilter(EntityFilter): + assetType: Optional[str] = None + assetTypes: Optional[List[str]] = None + assetNameFilter: Optional[str] = None + + +class AuditLog(BaseModel): + id: Optional[AuditLogId] = Field( + None, description='JSON object with the auditLog Id' + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the auditLog creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + entityId: Optional[EntityId] = Field(None, description='JSON object with Entity id') + entityName: Optional[str] = Field( + None, description='Name of the logged entity', example='Thermometer' + ) + userId: Optional[UserId] = Field(None, description='JSON object with User id.') + userName: Optional[str] = Field( + None, + description='Unique user name(email) of the user that performed some action on logged entity', + example='tenant@thingsboard.org', + ) + actionType: Optional[ActionType] = Field( + None, description='String represented Action type', example='ADDED' + ) + actionData: Optional[JsonNode] = Field( + None, description='JsonNode represented action data' + ) + actionStatus: Optional[ActionStatus] = Field( + None, description='String represented Action status', example='SUCCESS' + ) + actionFailureDetails: Optional[str] = Field( + None, + description="Failure action details info. An empty string in case of action status type 'SUCCESS', otherwise includes stack trace of the caused exception.", + ) + + +class AutoCommitSettings(RootModel): + root: Optional[Dict[str, AutoVersionCreateConfig]] = None + + +class AwsSnsSmsProviderConfiguration(SmsProviderConfiguration): + accessKeyId: Optional[str] = Field(None, description='The AWS SNS Access Key ID.') + secretAccessKey: Optional[str] = Field(None, description='The AWS SNS Access Key.') + region: Optional[str] = Field(None, description='The AWS region.') + + +class BackupCodeTwoFaAccountConfig(TwoFaAccountConfig): + codes: List[str] = Field(..., Set=True) + codesLeft: Optional[int] = None + + +class BackupCodeTwoFaProviderConfig(TwoFaProviderConfig): + codesQuantity: Optional[conint(ge=1)] = None + + +class BlobEntityInfo(BaseModel): + id: Optional[BlobEntityId] = Field( + None, + description='JSON object with the blob entity Id. Referencing non-existing blob entity Id will cause error', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the blob entity creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + name: Optional[str] = Field( + None, description='blob entity name', example='report-2021-10-29_14:00:00.pdf' + ) + type: Optional[str] = Field(None, description='blob entity type', example='report') + contentType: Optional[ContentType] = Field( + None, description='blob content type', example='application/pdf' + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the blob entity' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class BlobEntityWithCustomerInfo(BaseModel): + id: Optional[BlobEntityId] = Field( + None, + description='JSON object with the blob entity Id. Referencing non-existing blob entity Id will cause error', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the blob entity creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + name: Optional[str] = Field( + None, description='blob entity name', example='report-2021-10-29_14:00:00.pdf' + ) + type: Optional[str] = Field(None, description='blob entity type', example='report') + contentType: Optional[ContentType] = Field( + None, description='blob content type', example='application/pdf' + ) + customerTitle: Optional[str] = Field( + None, description='Title of the customer', example='Company A' + ) + customerIsPublic: Optional[bool] = Field( + None, description='Parameter that specifies if customer is public' + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the blob entity' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class BooleanFilterPredicate(KeyFilterPredicate): + operation: Optional[Operation] = None + value: Optional[FilterPredicateValueBoolean] = None + + +class BulkImportRequest(BaseModel): + file: Optional[str] = None + mapping: Optional[Mapping] = None + customerId: Optional[CustomerId] = None + entityGroupId: Optional[str] = None + + +class CalculatedFieldConfiguration(BaseModel): + arguments: Optional[Dict[str, Argument]] = None + expression: Optional[str] = None + output: Optional[Output] = None + type: str + + +class CalculatedFieldDebugEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + isError: Optional[bool] = None + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + entityId: Optional[str] = Field( + None, + description='String value representing the entity id in the event body', + example='57b6bafe-d600-423c-9267-fe31e5218986', + ) + entityType: Optional[EntityType4] = Field( + None, description='String value representing the entity type' + ) + msgId: Optional[str] = Field( + None, + description='String value representing the message id in the rule engine', + example='dcf44612-2ce4-4e5d-b462-ebb9c5628228', + ) + msgType: Optional[str] = Field( + None, + description='String value representing the message type', + example='POST_TELEMETRY_REQUEST', + ) + arguments: Optional[str] = Field( + None, + description='String value representing the arguments that were used in the calculation performed', + example={ + 'x': {'ts': 1739432016629, 'value': 20}, + 'y': {'ts': 1739429717656, 'value': 12}, + }, + ) + result: Optional[str] = Field( + None, + description='String value representing the result of a calculation', + example={'x + y': 32}, + ) + error: Optional[bool] = None + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration( + DeviceProfileProvisionConfiguration +): + pass + + +class ClientAttributesQueryingSnmpCommunicationConfig(SnmpCommunicationConfig): + mappings: Optional[List[SnmpMapping]] = None + queryingFrequencyMs: Optional[int] = None + + +class CoapDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): + coapDeviceTypeConfiguration: Optional[CoapDeviceTypeConfiguration] = None + clientSettings: Optional[PowerSavingConfiguration] = None + + +class CoapDeviceTransportConfiguration(DeviceTransportConfiguration): + powerMode: Optional[PowerMode] = None + psmActivityTimer: Optional[int] = None + edrxCycle: Optional[int] = None + pagingTransmissionWindow: Optional[int] = None + + +class ComparisonTsValue(BaseModel): + current: Optional[TsValue] = None + previous: Optional[TsValue] = None + + +class ComplexFilterPredicate(KeyFilterPredicate): + operation: Optional[Operation1] = None + predicates: Optional[List[KeyFilterPredicate]] = None + + +class ComplexVersionCreateRequest(VersionCreateRequest): + syncStrategy: Optional[SyncStrategy] = None + entityTypes: Optional[Dict[str, EntityTypeVersionCreateConfig]] = None + + +class ComponentDescriptor(BaseModel): + id: Optional[ComponentDescriptorId] = Field( + None, + description='JSON object with the descriptor Id. Specify existing descriptor id to update the descriptor. Referencing non-existing descriptor Id will cause error. Omit this field to create new descriptor.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the descriptor creation, in milliseconds', + example=1609459200000, + ) + type: Optional[Type6] = Field(None, description='Type of the Rule Node') + scope: Optional[Scope] = Field( + None, + description="Scope of the Rule Node. Always set to 'TENANT', since no rule chains on the 'SYSTEM' level yet.", + example='TENANT', + ) + clusteringMode: Optional[ClusteringMode] = Field( + None, + description='Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices.', + example='ENABLED', + ) + name: Optional[str] = Field( + None, + description='Name of the Rule Node. Taken from the @RuleNode annotation.', + example='Custom Rule Node', + ) + clazz: Optional[str] = Field( + None, + description='Full name of the Java class that implements the Rule Engine Node interface.', + example='com.mycompany.CustomRuleNode', + ) + configurationVersion: Optional[int] = Field( + None, + description='Rule node configuration version. By default, this value is 0. If the rule node is a versioned node, this value might be greater than 0.', + ) + actions: Optional[str] = Field( + None, description='Rule Node Actions. Deprecated. Always null.' + ) + hasQueueName: Optional[bool] = Field( + None, + description='Indicates that the RuleNode supports queue name configuration.', + example=True, + ) + configurationDescriptor: Optional[JsonNode] = None + + +class ContactBasedObject(BaseModel): + id: Optional[Any] = None + createdTime: Optional[int] = None + country: Optional[str] = None + state: Optional[str] = None + city: Optional[str] = None + address: Optional[str] = None + address2: Optional[str] = None + zip: Optional[str] = None + phone: Optional[str] = None + email: Optional[str] = None + name: Optional[str] = None + additionalInfo: Optional[JsonNode] = None + + +class Converter(BaseModel): + id: Optional[ConverterId] = Field( + None, + description='JSON object with the Converter Id. Specify this field to update the Converter. Referencing non-existing Converter Id will cause error. Omit this field to create new Converter.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the converter creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + name: str = Field( + ..., + description='Unique Converter Name in scope of Tenant', + example='Http Converter', + ) + type: Type7 = Field( + ..., + description='The type of the converter to process incoming or outgoing messages', + ) + integrationType: Optional[IntegrationType] = Field( + None, + description='The type of the integration to which the converter is dedicated', + ) + debugMode: Optional[bool] = Field( + None, description='Enable/disable debug. ', example=False + ) + debugSettings: Optional[DebugSettings] = Field( + None, description='Debug settings object.' + ) + configuration: Optional[JsonNode] = Field( + None, + description="JSON object representing converter configuration. It 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'", + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the converter' + ) + edgeTemplate: Optional[bool] = Field( + None, + description='Boolean flag that specifies that is regular or edge template converter', + ) + converterVersion: Optional[int] = None + version: Optional[int] = None + + +class CustomMenuDeleteResult(BaseModel): + success: Optional[bool] = None + assigneeType: Optional[AssigneeType] = None + assigneeList: Optional[List[EntityInfo]] = None + + +class CustomMenuInfo(BaseModel): + id: Optional[CustomMenuId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id that owns the menu.' + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id that owns the menu.' + ) + name: str = Field( + ..., description='Custom menu name', example='Customer A custom menu' + ) + scope: Scope1 = Field( + ..., + description='Custom menu scope. Possible values: SYSTEM, TENANT, CUSTOMER', + example='TENANT', + ) + assigneeType: AssigneeType = Field( + ..., + description='Custom menu assignee type. Possible values are: All (all users of specified scope), CUSTOMERS (specified customers), USERS (specified list of users), NO_ASSIGN (no assignees)', + example='ALL', + ) + + +class CustomMenuItem(MenuItem): + name: str = Field( + ..., description='Name of the menu item', example='My Custom Menu' + ) + icon: Optional[str] = Field( + None, + description="URL of the menu item icon. Overrides 'materialIcon'", + example='My Custom Menu', + ) + menuItemType: MenuItemType = Field( + ..., + description='Type of menu item (LINK or SECTION). LINK type means item has no child items, SECTION type should have at least one child', + example='LINK', + ) + linkType: Optional[LinkType1] = Field( + None, description='Type of menu item (URL or DASHBOARD)', example='URL' + ) + dashboardId: Optional[str] = Field( + None, + description='Id of the Dashboard to open, when user clicks the menu item', + example='https://mycompany.com', + ) + hideDashboardToolbar: Optional[bool] = Field( + None, description='Hide the dashboard toolbar' + ) + url: Optional[str] = Field( + None, + description='URL to open in the iframe, when user clicks the menu item', + example='https://myexternalurl.com', + ) + setAccessToken: Optional[bool] = Field( + None, description='Set the access token of the current user to a new dashboard' + ) + visible: Optional[bool] = Field( + None, description='Mark if menu item is visible for user' + ) + pages: Optional[List[CustomMenuItem]] = Field( + None, description='List of child menu items' + ) + + +class CustomMobilePage(MobilePage): + path: Optional[str] = Field( + None, + description='Path to custom page', + example='/alarmDetails/868c7083-032d-4f52-b8b4-7859aebb6a4e', + ) + label: Optional[str] = Field(None, description='Page label', example='Air quality') + visible: bool = Field(..., description='Indicates if page is visible', example=True) + icon: Optional[str] = Field( + None, description='URL of the page icon', example='home_icon' + ) + + +class CustomTimeSchedule(AlarmSchedule): + timezone: Optional[str] = None + items: Optional[List[CustomTimeScheduleItem]] = None + + +class Customer(BaseModel): + id: Optional[CustomerId] = Field( + None, + description='JSON object with the customer Id. Specify this field to update the customer. Referencing non-existing customer Id will cause error. Omit this field to create new customer.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the customer creation, in milliseconds', + example=1609459200000, + ) + country: Optional[str] = Field(None, description='Country', example='US') + state: Optional[str] = Field(None, description='State', example='NY') + city: Optional[str] = Field(None, description='City', example='New York') + address: Optional[str] = Field(None, description='Address Line 1', example=42) + address2: Optional[str] = Field(None, description='Address Line 2') + zip: Optional[str] = Field(None, description='Zip code', example=10004) + phone: Optional[str] = Field( + None, description='Phone number', example='+1(415)777-7777' + ) + email: Optional[str] = Field(..., description='Email', example='example@company.com') + title: Optional[str] = Field(..., + description='Title of the customer', example='Company A') + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + parentCustomerId: Optional[CustomerId] = Field( + None, description='JSON object with parent Customer Id' + ) + version: Optional[int] = None + customMenuId: Optional[CustomMenuId] = None + name: Optional[str] = Field( + None, + description='Name of the customer. Read-only, duplicated from title for backward compatibility', + example='Company A', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with parent Customer Id' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class CustomerInfo(BaseModel): + id: Optional[CustomerId] = Field( + None, + description='JSON object with the customer Id. Specify this field to update the customer. Referencing non-existing customer Id will cause error. Omit this field to create new customer.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the customer creation, in milliseconds', + example=1609459200000, + ) + country: Optional[str] = Field(None, description='Country', example='US') + state: Optional[str] = Field(None, description='State', example='NY') + city: Optional[str] = Field(None, description='City', example='New York') + address: Optional[str] = Field(None, description='Address Line 1', example=42) + address2: Optional[str] = Field(None, description='Address Line 2') + zip: Optional[str] = Field(None, description='Zip code', example=10004) + phone: Optional[str] = Field( + None, description='Phone number', example='+1(415)777-7777' + ) + email: str = Field(..., description='Email', example='example@company.com') + title: str = Field(..., description='Title of the customer', example='Company A') + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + parentCustomerId: Optional[CustomerId] = Field( + None, description='JSON object with parent Customer Id' + ) + version: Optional[int] = None + customMenuId: Optional[CustomMenuId] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + name: Optional[str] = Field( + None, + description='Name of the customer. Read-only, duplicated from title for backward compatibility', + example='Company A', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with parent Customer Id' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class CustomerUsersFilter(UsersFilter): + customerId: UUID + + +class Dashboard(BaseModel): + title: Optional[str] = Field(None, description='Title of the dashboard.') + image: Optional[str] = Field( + None, + description='Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.', + ) + mobileHide: Optional[bool] = Field( + None, + description='Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.', + ) + mobileOrder: Optional[int] = Field( + None, + description='Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications', + ) + configuration: Optional[JsonNode] = Field( + None, + description='JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON.', + ) + name: Optional[str] = Field( + None, + description="Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + ) + resources: Optional[List[ResourceExportData]] = None + id: Optional[DashboardId] = Field( + 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.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the dashboard creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id. ' + ) + assignedCustomers: Optional[List[ShortCustomerInfo]] = Field( + None, + description='List of assigned customers with their info.', + Set=True, + ) + version: Optional[int] = None + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class DashboardInfo(BaseModel): + title: Optional[str] = Field(None, description='Title of the dashboard.') + image: Optional[str] = Field( + None, + description='Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.', + ) + mobileHide: Optional[bool] = Field( + None, + description='Hide dashboard from mobile devices. Useful if the dashboard is not designed for small screens.', + ) + mobileOrder: Optional[int] = Field( + None, + description='Order on mobile devices. Useful to adjust sorting of the dashboards for mobile applications', + ) + configuration: Optional[JsonNode] = Field( + None, + description='JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON.', + ) + name: Optional[str] = Field( + None, + description="Same as title of the dashboard. Read-only field. Update the 'title' to change the 'name' of the dashboard.", + ) + resources: Optional[List[ResourceExportData]] = None + id: Optional[DashboardId] = Field( + 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.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the dashboard creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the dashboard can't be changed.", + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id. ' + ) + assignedCustomers: Optional[List[ShortCustomerInfo]] = Field( + None, + description='List of assigned customers with their info.', + Set=True, + ) + version: Optional[int] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class DashboardPage(MobilePage): + dashboardId: Optional[str] = Field( + None, description='Dashboard id', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + label: Optional[str] = Field(None, description='Page label', example='Air quality') + visible: bool = Field(..., description='Indicates if page is visible', example=True) + icon: Optional[str] = Field( + None, description='URL of the page icon', example='home_icon' + ) + + +class DebugConverterEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + isError: Optional[bool] = None + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + type: Optional[str] = None + in_: Optional[str] = Field(None, alias='in') + out: Optional[str] = None + metadata: Optional[str] = None + error: Optional[bool] = None + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class DebugIntegrationEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + isError: Optional[bool] = None + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + type: Optional[str] = None + message: Optional[str] = None + statusIntegration: Optional[str] = None + error: Optional[bool] = None + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class DefaultCoapDeviceTypeConfiguration(CoapDeviceTypeConfiguration): + transportPayloadTypeConfiguration: Optional[TransportPayloadTypeConfiguration] = ( + None + ) + + +class DefaultDeviceConfiguration(DeviceConfiguration): + pass + + +class DefaultDeviceProfileConfiguration(DeviceProfileConfiguration): + pass + + +class DefaultDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): + pass + + +class DefaultDeviceTransportConfiguration(DeviceTransportConfiguration): + pass + + +class DefaultMenuItem(MenuItem): + id: Optional[str] = Field( + None, description='Unique identifier for predefined menu items', example='home' + ) + name: Optional[str] = Field( + None, description='Name of the menu item', example='My Custom Menu' + ) + icon: Optional[str] = Field( + None, + description="URL of the menu item icon. Overrides 'materialIcon'", + example='My Custom Menu', + ) + visible: Optional[bool] = Field( + None, description='Mark if menu item is visible for user' + ) + pages: Optional[List[DefaultMenuItem]] = Field( + None, description='List of child menu items' + ) + + +class DefaultMobilePage(MobilePage): + id: Optional[Id] = Field( + None, description='Identifier for default page', example='HOME' + ) + label: Optional[str] = Field(None, description='Page label', example='Air quality') + visible: bool = Field(..., description='Indicates if page is visible', example=True) + icon: Optional[str] = Field( + None, description='URL of the page icon', example='home_icon' + ) + + +class DefaultTenantProfileConfiguration(TenantProfileConfiguration): + maxDevices: Optional[int] = None + maxAssets: Optional[int] = None + maxCustomers: Optional[int] = None + maxUsers: Optional[int] = None + maxDashboards: Optional[int] = None + maxRuleChains: Optional[int] = None + maxEdges: Optional[int] = None + maxResourcesInBytes: Optional[int] = None + maxOtaPackagesInBytes: Optional[int] = None + maxResourceSize: Optional[int] = None + maxIntegrations: Optional[int] = None + maxConverters: Optional[int] = None + maxSchedulerEvents: Optional[int] = None + whiteLabelingEnabled: Optional[bool] = None + trendzEnabled: Optional[bool] = None + transportTenantMsgRateLimit: Optional[str] = Field(None, example='1000:1,20000:60') + transportTenantTelemetryMsgRateLimit: Optional[str] = Field( + None, example='1000:1,20000:60' + ) + transportTenantTelemetryDataPointsRateLimit: Optional[str] = Field( + None, example='1000:1,20000:60' + ) + transportDeviceMsgRateLimit: Optional[str] = Field(None, example='20:1,600:60') + transportDeviceTelemetryMsgRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + transportDeviceTelemetryDataPointsRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + transportGatewayMsgRateLimit: Optional[str] = Field(None, example='20:1,600:60') + transportGatewayTelemetryMsgRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + transportGatewayTelemetryDataPointsRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + transportGatewayDeviceMsgRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + transportGatewayDeviceTelemetryMsgRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + transportGatewayDeviceTelemetryDataPointsRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + integrationMsgsPerTenantRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + integrationMsgsPerDeviceRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + integrationMsgsPerAssetRateLimit: Optional[str] = None + tenantEntityExportRateLimit: Optional[str] = Field(None, example='20:1,600:60') + tenantEntityImportRateLimit: Optional[str] = Field(None, example='20:1,600:60') + tenantNotificationRequestsRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + tenantNotificationRequestsPerRuleRateLimit: Optional[str] = Field( + None, example='20:1,600:60' + ) + maxTransportMessages: Optional[int] = Field(None, example=10000000) + maxTransportDataPoints: Optional[int] = Field(None, example=10000000) + maxREExecutions: Optional[int] = Field(None, example=4000000) + maxJSExecutions: Optional[int] = Field(None, example=5000000) + maxTbelExecutions: Optional[int] = Field(None, example=5000000) + maxDPStorageDays: Optional[int] = Field(None, example=0) + maxRuleNodeExecutionsPerMessage: Optional[int] = Field(None, example=50) + maxDebugModeDurationMinutes: Optional[int] = Field(None, example=15) + maxEmails: Optional[int] = Field(None, example=0) + smsEnabled: Optional[bool] = Field(None, example=True) + maxSms: Optional[int] = Field(None, example=0) + maxCreatedAlarms: Optional[int] = Field(None, example=1000) + tenantServerRestLimitsConfiguration: Optional[str] = None + customerServerRestLimitsConfiguration: Optional[str] = None + maxWsSessionsPerTenant: Optional[int] = None + maxWsSessionsPerCustomer: Optional[int] = None + maxWsSessionsPerRegularUser: Optional[int] = None + maxWsSessionsPerPublicUser: Optional[int] = None + wsMsgQueueLimitPerSession: Optional[int] = None + maxWsSubscriptionsPerTenant: Optional[int] = None + maxWsSubscriptionsPerCustomer: Optional[int] = None + maxWsSubscriptionsPerRegularUser: Optional[int] = None + maxWsSubscriptionsPerPublicUser: Optional[int] = None + wsUpdatesPerSessionRateLimit: Optional[str] = None + cassandraQueryTenantRateLimitsConfiguration: Optional[str] = None + edgeEventRateLimits: Optional[str] = None + edgeEventRateLimitsPerEdge: Optional[str] = None + edgeUplinkMessagesRateLimits: Optional[str] = None + edgeUplinkMessagesRateLimitsPerEdge: Optional[str] = None + defaultStorageTtlDays: Optional[int] = None + alarmsTtlDays: Optional[int] = None + rpcTtlDays: Optional[int] = None + queueStatsTtlDays: Optional[int] = None + ruleEngineExceptionsTtlDays: Optional[int] = None + blobEntityTtlDays: Optional[int] = None + warnThreshold: Optional[float] = None + maxCalculatedFieldsPerEntity: Optional[int] = Field(None, example=5) + maxArgumentsPerCF: Optional[int] = Field(None, example=10) + maxDataPointsPerRollingArg: Optional[conint(ge=1)] = Field(None, example=1000) + maxStateSizeInKBytes: Optional[int] = Field(None, example=32) + maxSingleValueArgumentSizeInKBytes: Optional[int] = Field(None, example=2) + + +class DeviceActivityNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + devices: Optional[List[UUID]] = Field(None, Set=True) + deviceProfiles: Optional[List[UUID]] = Field(None, Set=True) + notifyOn: List[NotifyOnEnum3] = Field(..., Set=True) + + +class DeviceCredentials(BaseModel): + id: DeviceCredentialsId = Field( + ..., + description="The Id is automatically generated during device creation. Use 'getDeviceCredentialsByDeviceId' to obtain the id based on device id. Use 'updateDeviceCredentials' to update device credentials. ", + example='784f394c-42b6-435a-983c-b7beff2784f9', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the device credentials creation, in milliseconds', + example=1609459200000, + ) + deviceId: DeviceId = Field(..., description='JSON object with the device Id.') + credentialsType: Optional[CredentialsType] = Field( + None, description='Type of the credentials' + ) + credentialsId: str = Field( + ..., + description='Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials.', + example='Access token or other value that depends on the credentials type', + ) + credentialsValue: Optional[str] = Field( + None, + description='Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS', + example='Null in case of ACCESS_TOKEN. See model definition.', + ) + version: Optional[int] = None + + +class DeviceData(BaseModel): + configuration: Optional[DefaultDeviceConfiguration] = Field( + None, + description='Device configuration for device profile type. DEFAULT is only supported value for now', + ) + transportConfiguration: Optional[ + Union[ + CoapDeviceTransportConfiguration, + DefaultDeviceTransportConfiguration, + Lwm2mDeviceTransportConfiguration, + MqttDeviceTransportConfiguration, + SnmpDeviceTransportConfiguration, + ] + ] = Field( + None, description='Device transport configuration used to connect the device' + ) + + +class DeviceGroupOtaPackage(BaseModel): + id: Optional[UUID] = None + groupId: Optional[EntityGroupId] = None + otaPackageType: Optional[OtaPackageType] = None + otaPackageId: Optional[OtaPackageId] = None + otaPackageUpdateTime: Optional[int] = None + + +class DeviceInfo(BaseModel): + id: Optional[DeviceId] = Field( + None, + description='JSON object with the Device Id. Specify this field to update the Device. Referencing non-existing Device Id will cause error. Omit this field to create new Device.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the device creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", + ) + name: Optional[str] = Field( + None, + description='Unique Device Name in scope of Tenant', + example='A4B72CCDFF33', + ) + type: Optional[str] = Field( + None, description='Device Profile Name', example='Temperature Sensor' + ) + label: Optional[str] = Field( + None, description='Label that may be used in widgets', example='Room 234 Sensor' + ) + deviceProfileId: DeviceProfileId = Field( + ..., description='JSON object with Device Profile Id.' + ) + firmwareId: Optional[OtaPackageId] = Field( + None, description='JSON object with Ota Package Id.' + ) + softwareId: Optional[OtaPackageId] = Field( + None, description='JSON object with Ota Package Id.' + ) + version: Optional[int] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + active: Optional[bool] = Field(None, description='Device active flag.') + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + deviceData: Optional[DeviceData] = Field( + None, + description='JSON object with content specific to type of transport in the device profile.', + ) + + +class DeviceProfileInfo(BaseModel): + id: Optional[EntityId] = Field(None, description='JSON object with the entity Id. ') + tenantId: Optional[TenantId] = Field(None, description='Tenant id.') + name: Optional[str] = Field(None, description='Entity Name') + image: Optional[str] = Field( + 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. ', + ) + defaultDashboardId: Optional[DashboardId] = Field( + None, + description='Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.', + ) + type: Optional[Type8] = Field( + None, + description="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.", + ) + transportType: Optional[TransportType] = Field( + None, + description='Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.', + ) + + +class DeviceSearchQuery(BaseModel): + parameters: Optional[RelationsSearchParameters] = Field( + None, description='Main search parameters.' + ) + relationType: Optional[str] = Field( + None, + description="Type of the relation between root entity and device (e.g. 'Contains' or 'Manages').", + ) + deviceTypes: Optional[List[str]] = Field( + None, + description="Array of device types to filter the related entities (e.g. 'Temperature Sensor', 'Smoke Sensor').", + ) + + +class DeviceSearchQueryFilter(EntityFilter): + rootEntity: Optional[EntityId] = None + relationType: Optional[str] = None + direction: Optional[Direction] = None + maxLevel: Optional[int] = None + fetchLastLevelOnly: Optional[bool] = None + deviceTypes: Optional[List[str]] = None + + +class DeviceTypeFilter(EntityFilter): + deviceType: Optional[str] = None + deviceTypes: Optional[List[str]] = None + deviceNameFilter: Optional[str] = None + + +class Domain(BaseModel): + id: Optional[DomainId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + name: str = Field(..., description='Domain name. Cannot be empty') + oauth2Enabled: Optional[bool] = Field( + None, description='Whether OAuth2 settings are enabled or not' + ) + propagateToEdge: Optional[bool] = Field( + None, description='Whether OAuth2 settings are enabled on Edge or not' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class DomainInfo(BaseModel): + id: Optional[DomainId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + name: str = Field(..., description='Domain name. Cannot be empty') + oauth2Enabled: Optional[bool] = Field( + None, description='Whether OAuth2 settings are enabled or not' + ) + propagateToEdge: Optional[bool] = Field( + None, description='Whether OAuth2 settings are enabled on Edge or not' + ) + oauth2ClientInfos: Optional[List[OAuth2ClientInfo]] = Field( + None, description='List of available oauth2 clients' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class DurationAlarmConditionSpec(AlarmConditionSpec): + unit: Optional[Unit] = None + predicate: Optional[FilterPredicateValueLong] = None + + +class Edge(BaseModel): + id: Optional[EdgeId] = Field( + None, + description='JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the edge creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", + ) + rootRuleChainId: Optional[RuleChainId] = Field( + None, + description="JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id.", + ) + name: str = Field( + ..., description='Unique Edge Name in scope of Tenant', example='Silo_A_Edge' + ) + type: str = Field(..., description='Edge type', example='Silos') + label: Optional[str] = Field( + None, + description='Label that may be used in widgets', + example='Silo Edge on far field', + ) + routingKey: str = Field( + ..., description="Edge routing key ('username') to authorize on cloud" + ) + secret: str = Field( + ..., description="Edge secret ('password') to authorize on cloud" + ) + edgeLicenseKey: str = Field( + ..., + description='Edge license key obtained from license portal', + example='AgcnI24Z06XC&m6Sxsdgf', + ) + cloudEndpoint: str = Field( + ..., + description="Edge uses this cloud URL to activate and periodically check it's license", + example='https://thingsboard.cloud', + ) + version: Optional[int] = None + ownerId: Optional[EntityId] = None + additionalInfo: Optional[JsonNode] = None + + +class EdgeCommunicationFailureNotificationRuleTriggerConfig( + NotificationRuleTriggerConfig +): + edges: Optional[List[UUID]] = Field(None, Set=True) + + +class EdgeConnectionNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + edges: Optional[List[UUID]] = Field(None, Set=True) + notifyOn: Optional[List[NotifyOnEnum4]] = Field(None, Set=True) + + +class EdgeEvent(BaseModel): + id: Optional[EdgeEventId] = None + createdTime: Optional[int] = None + seqId: Optional[int] = None + tenantId: Optional[TenantId] = None + edgeId: Optional[EdgeId] = None + action: Optional[Action] = None + entityId: Optional[UUID] = None + uid: Optional[str] = None + type: Optional[Type10] = None + entityGroupId: Optional[UUID] = None + body: Optional[JsonNode] = None + + +class EdgeInfo(BaseModel): + id: Optional[EdgeId] = Field( + None, + description='JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the edge creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", + ) + rootRuleChainId: Optional[RuleChainId] = Field( + None, + description="JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id.", + ) + name: str = Field( + ..., description='Unique Edge Name in scope of Tenant', example='Silo_A_Edge' + ) + type: str = Field(..., description='Edge type', example='Silos') + label: Optional[str] = Field( + None, + description='Label that may be used in widgets', + example='Silo Edge on far field', + ) + routingKey: str = Field( + ..., description="Edge routing key ('username') to authorize on cloud" + ) + secret: str = Field( + ..., description="Edge secret ('password') to authorize on cloud" + ) + edgeLicenseKey: str = Field( + ..., + description='Edge license key obtained from license portal', + example='AgcnI24Z06XC&m6Sxsdgf', + ) + cloudEndpoint: str = Field( + ..., + description="Edge uses this cloud URL to activate and periodically check it's license", + example='https://thingsboard.cloud', + ) + version: Optional[int] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + ownerId: Optional[EntityId] = None + additionalInfo: Optional[JsonNode] = None + + +class EdgeSearchQuery(BaseModel): + parameters: Optional[RelationsSearchParameters] = Field( + None, description='Main search parameters.' + ) + relationType: Optional[str] = Field( + None, + description="Type of the relation between root entity and edge (e.g. 'Contains' or 'Manages').", + ) + edgeTypes: Optional[List[str]] = Field( + None, + description="Array of edge types to filter the related entities (e.g. 'Silos', 'Stores').", + ) + + +class EdgeSearchQueryFilter(EntityFilter): + rootEntity: Optional[EntityId] = None + relationType: Optional[str] = None + direction: Optional[Direction] = None + maxLevel: Optional[int] = None + fetchLastLevelOnly: Optional[bool] = None + edgeTypes: Optional[List[str]] = None + + +class EdgeTypeFilter(EntityFilter): + edgeType: Optional[str] = None + edgeTypes: Optional[List[str]] = None + edgeNameFilter: Optional[str] = None + + +class EmailTwoFaAccountConfig(TwoFaAccountConfig): + email: str + + +class EmailTwoFaProviderConfig(TwoFaProviderConfig): + verificationCodeLifetime: Optional[conint(ge=1)] = None + + +class EntitiesByGroupNameFilter(EntityFilter): + groupType: Optional[GroupType] = None + ownerId: Optional[EntityId] = None + entityGroupNameFilter: Optional[str] = None + + +class EntitiesLimitNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + entityTypes: Optional[List[EntityType13]] = Field(None, Set=True) + threshold: Optional[confloat(le=1.0)] = None + + +class EntityActionNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + entityTypes: Optional[List[EntityType13]] = Field(None, Set=True) + created: Optional[bool] = None + updated: Optional[bool] = None + deleted: Optional[bool] = None + + +class EntityData(BaseModel): + entityId: Optional[EntityId] = None + readAttrs: Optional[bool] = None + readTs: Optional[bool] = None + latest: Optional[Dict[str, Dict[str, TsValue]]] = None + timeseries: Optional[Dict[str, List[TsValue]]] = None + aggLatest: Optional[Dict[str, ComparisonTsValue]] = None + + +class EntityDataSortOrder(BaseModel): + key: Optional[EntityKey] = None + direction: Optional[Direction3] = None + + +class EntityGroup(BaseModel): + id: Optional[EntityGroupId] = Field( + None, + description='JSON object with the EntityGroupId Id. Specify this field to update the Entity Group. Referencing non-existing Entity Group Id will cause error. Omit this field to create new Entity Group.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the entity group creation, in milliseconds', + example=1609459200000, + ) + type: Type11 + name: str = Field( + ..., description='Name of the entity group', example='Water meters' + ) + ownerId: Optional[EntityId] = Field( + None, + description='JSON object with the owner of the group - Tenant or Customer Id.', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Arbitrary JSON with additional information about the group' + ) + configuration: Optional[JsonNode] = Field( + None, + description='JSON with the configuration for UI components: list of columns, settings, actions, etc ', + ) + version: Optional[int] = None + groupAll: Optional[bool] = Field( + None, + description="Indicates special group 'All' that contains all entities and can't be deleted.", + ) + edgeGroupAll: Optional[bool] = Field( + None, + description="Indicates special edge group 'All' that contains all entities and can't be deleted.", + ) + tenantId: Optional[TenantId] = None + + +class EntityGroupInfo(BaseModel): + id: Optional[EntityGroupId] = Field( + None, + description='JSON object with the EntityGroupId Id. Specify this field to update the Entity Group. Referencing non-existing Entity Group Id will cause error. Omit this field to create new Entity Group.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the entity group creation, in milliseconds', + example=1609459200000, + ) + type: Type11 + name: str = Field( + ..., description='Name of the entity group', example='Water meters' + ) + ownerId: Optional[EntityId] = Field( + None, + description='JSON object with the owner of the group - Tenant or Customer Id.', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Arbitrary JSON with additional information about the group' + ) + configuration: Optional[JsonNode] = Field( + None, + description='JSON with the configuration for UI components: list of columns, settings, actions, etc ', + ) + version: Optional[int] = None + ownerIds: List[EntityId] = Field( + ..., description='List of the entity group owners.', Set=True + ) + groupAll: Optional[bool] = Field( + None, + description="Indicates special group 'All' that contains all entities and can't be deleted.", + ) + edgeGroupAll: Optional[bool] = Field( + None, + description="Indicates special edge group 'All' that contains all entities and can't be deleted.", + ) + tenantId: Optional[TenantId] = None + + +class EntityRelation(BaseModel): + from_: Optional[EntityId] = Field( + None, alias='from', description='JSON object with [from] Entity Id.' + ) + to: Optional[EntityId] = Field(None, description='JSON object with [to] Entity Id.') + type: Optional[str] = Field( + None, description='String value of relation type.', example='Contains' + ) + typeGroup: Optional[TypeGroup] = Field( + None, description='Represents the type group of the relation.', example='COMMON' + ) + version: Optional[int] = None + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the relation' + ) + + +class EntityRelationInfo(BaseModel): + from_: Optional[EntityId] = Field( + None, alias='from', description='JSON object with [from] Entity Id.' + ) + to: Optional[EntityId] = Field(None, description='JSON object with [to] Entity Id.') + type: Optional[str] = Field( + None, description='String value of relation type.', example='Contains' + ) + typeGroup: Optional[TypeGroup] = Field( + None, description='Represents the type group of the relation.', example='COMMON' + ) + version: Optional[int] = None + fromName: Optional[str] = Field( + None, + description='Name of the entity for [from] direction.', + example='A4B72CCDFF33', + ) + toName: Optional[str] = Field( + None, + description='Name of the entity for [to] direction.', + example='A4B72CCDFF35', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the relation' + ) + + +class EntityRelationsQuery(BaseModel): + parameters: Optional[RelationsSearchParameters] = Field( + None, description='Main search parameters.' + ) + filters: Optional[List[RelationEntityTypeFilter]] = Field( + None, description='Main filters.' + ) + + +class EntitySubtype(BaseModel): + tenantId: Optional[TenantId] = None + entityType: Optional[EntityType17] = None + type: Optional[str] = None + + +class EntityTypeVersionLoadRequest(VersionLoadRequest): + entityTypes: Optional[Dict[str, EntityTypeVersionLoadConfig]] = None + rollbackOnError: Optional[bool] = None + + +class EntityView(BaseModel): + entityId: EntityId = Field( + ..., description='JSON object with the referenced Entity Id (Device or Asset).' + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", + ) + name: str = Field(..., description='Entity View name', example='A4B72CCDFF33') + type: str = Field( + ..., description='Device Profile Name', example='Temperature Sensor' + ) + keys: Optional[TelemetryEntityView] = Field( + None, + description='Set of telemetry and attribute keys to expose via Entity View.', + ) + startTimeMs: Optional[int] = Field( + None, + description='Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;', + ) + endTimeMs: Optional[int] = Field( + None, + description='Represents the end time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;', + ) + version: Optional[int] = None + id: Optional[EntityViewId] = Field( + None, + description='JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the Entity View creation, in milliseconds', + example=1609459200000, + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class EntityViewInfo(BaseModel): + id: Optional[EntityViewId] = Field( + None, + description='JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the Entity View creation, in milliseconds', + example=1609459200000, + ) + entityId: EntityId = Field( + ..., description='JSON object with the referenced Entity Id (Device or Asset).' + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", + ) + name: str = Field(..., description='Entity View name', example='A4B72CCDFF33') + type: str = Field( + ..., description='Device Profile Name', example='Temperature Sensor' + ) + keys: Optional[TelemetryEntityView] = Field( + None, + description='Set of telemetry and attribute keys to expose via Entity View.', + ) + startTimeMs: Optional[int] = Field( + None, + description='Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;', + ) + endTimeMs: Optional[int] = Field( + None, + description='Represents the end time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;', + ) + version: Optional[int] = None + ownerName: Optional[str] = Field(None, description='Owner name') + groups: Optional[List[EntityInfo]] = Field(None, description='Groups') + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class EntityViewSearchQuery(BaseModel): + parameters: Optional[RelationsSearchParameters] = Field( + None, description='Main search parameters.' + ) + relationType: Optional[str] = Field( + None, + description="Type of the relation between root entity and device (e.g. 'Contains' or 'Manages').", + ) + entityViewTypes: Optional[List[str]] = Field( + None, + description="Array of entity view types to filter the related entities (e.g. 'Temperature Sensor', 'Smoke Sensor').", + ) + + +class ErrorEventFilter(EventFilter): + server: Optional[str] = Field( + None, + description='String value representing the server name, identifier or ip address where the platform is running', + example='ip-172-31-24-152', + ) + method: Optional[str] = Field( + None, + description='String value representing the method name when the error happened', + example='onClusterEventMsg', + ) + errorStr: Optional[str] = Field( + None, + description="The case insensitive 'contains' filter based on error message", + example='not present in the DB', + ) + eventType: EventType = Field( + ..., description='String value representing the event type', example='STATS' + ) + + +class EscalatedNotificationRuleRecipientsConfig(NotificationRuleRecipientsConfig): + escalationTable: Dict[str, List[UUID]] + triggerType: TriggerType + + +class EventInfo(BaseModel): + id: Optional[EventId] = None + createdTime: Optional[int] = Field( + None, + description='Timestamp of the event creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + type: Optional[str] = Field(None, description='Event type', example='STATS') + uid: Optional[str] = Field( + None, description='string', example='784f394c-42b6-435a-983c-b7beff2784f9' + ) + entityId: Optional[EntityId] = Field( + None, description='JSON object with Entity Id for which event is created.' + ) + body: Optional[JsonNode] = None + + +class GroupPermission(BaseModel): + tenantId: Optional[TenantId] = Field( + None, description='JSON object with the Tenant Id.' + ) + userGroupId: Optional[EntityGroupId] = Field( + None, + description='JSON object with the User Group Id. Represent user group that will have permissions to perform operations against corresponding Entity Group.', + ) + roleId: Optional[RoleId] = Field( + None, description='JSON object with the Role Id. Represent set of permissions.' + ) + entityGroupId: Optional[EntityGroupId] = Field( + None, + description='JSON object with the Entity Group Id. Represent entity (device, asset, etc.) group.', + ) + entityGroupType: Optional[EntityGroupType] = Field( + None, + description='Type of the entities in the group: DEVICE, ASSET, CUSTOMER, etc.', + ) + isPublic: Optional[bool] = None + id: Optional[GroupPermissionId] = Field( + None, + description='JSON object with the Group Permission Id. Specify this field to update the Group Permission. Referencing non-existing Group Permission Id will cause error. Omit this field to create new Group Permission.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the group permission creation, in milliseconds', + example=1609459200000, + ) + name: Optional[str] = Field( + None, description='Name of the Group Permissions. Auto-generated' + ) + public: Optional[bool] = None + + +class HomeMenuItem(MenuItem): + id: Optional[str] = Field( + None, description='Unique identifier for predefined menu items', example='home' + ) + name: Optional[str] = Field( + None, description='Name of the menu item', example='My Custom Menu' + ) + icon: Optional[str] = Field( + None, + description="URL of the menu item icon. Overrides 'materialIcon'", + example='My Custom Menu', + ) + visible: Optional[bool] = Field( + None, description='Mark if menu item is visible for user' + ) + pages: Optional[List[DefaultMenuItem]] = Field( + None, description='List of child menu items' + ) + homeType: Optional[HomeType] = Field( + None, + description='DEFAULT or DASHBOARD. DASHBOARD means default home page presentation changed to refer to dashboard', + ) + dashboardId: Optional[str] = Field( + None, description='Id of the Dashboard to open, when user clicks the menu item' + ) + hideDashboardToolbar: Optional[bool] = Field( + None, description='Hide the dashboard toolbar' + ) + + +class Integration(BaseModel): + id: Optional[IntegrationId] = Field( + None, + description='JSON object with the Integration Id. Specify this field to update the Integration. Referencing non-existing Integration Id will cause error. Omit this field to create new Integration.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the integration creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + name: str = Field(..., description='Integration Name', example='Http Integration') + type: Type14 = Field(..., description='The type of the integration') + debugMode: Optional[bool] = Field( + None, description='Enable/disable debug. ', example=False + ) + debugSettings: Optional[DebugSettings] = Field( + None, description='Debug settings object.' + ) + enabled: Optional[bool] = Field( + None, description='Boolean flag to enable/disable the integration' + ) + allowCreateDevicesOrAssets: Optional[bool] = Field( + None, + description='Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet', + ) + version: Optional[int] = None + defaultConverterId: ConverterId = Field( + ..., description='JSON object with the Uplink Converter Id' + ) + downlinkConverterId: Optional[ConverterId] = Field( + None, description='JSON object with the Downlink Converter Id' + ) + routingKey: str = Field( + ..., + description="String value used by HTTP based integrations for the base URL construction and by the remote integrations. Remote integration uses this value along with the 'secret' for kind of security and validation to be able to connect to the platform using Grpc", + example='ca1a01b6-4ca1-3da5-54e4-a07090b65644', + ) + secret: Optional[str] = Field( + None, + description="String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc", + example='nl83m1ktpwpwwmww29sm', + ) + configuration: JsonNode = Field( + ..., + description="JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type", + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the integration' + ) + edgeTemplate: Optional[bool] = Field( + None, + description='Boolean flag that specifies that is regular or edge template integration', + ) + remote: Optional[bool] = Field( + None, + description='Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core', + ) + + +class IntegrationInfo(BaseModel): + id: Optional[IntegrationId] = Field( + None, + description='JSON object with the Integration Id. Specify this field to update the Integration. Referencing non-existing Integration Id will cause error. Omit this field to create new Integration.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the integration creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + name: str = Field(..., description='Integration Name', example='Http Integration') + type: Type14 = Field(..., description='The type of the integration') + debugMode: Optional[bool] = Field( + None, description='Enable/disable debug. ', example=False + ) + debugSettings: Optional[DebugSettings] = Field( + None, description='Debug settings object.' + ) + enabled: Optional[bool] = Field( + None, description='Boolean flag to enable/disable the integration' + ) + allowCreateDevicesOrAssets: Optional[bool] = Field( + None, + description='Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet', + ) + version: Optional[int] = None + status: Optional[Dict[str, Any]] = None + stats: Optional[ArrayNode] = None + edgeTemplate: Optional[bool] = Field( + None, + description='Boolean flag that specifies that is regular or edge template integration', + ) + remote: Optional[bool] = Field( + None, + description='Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core', + ) + + +class IntegrationLifecycleEventNotificationRuleTriggerConfig( + NotificationRuleTriggerConfig +): + integrationTypes: Optional[List[IntegrationType]] = Field(None, Set=True) + integrations: Optional[List[UUID]] = Field(None, Set=True) + notifyOn: Optional[List[NotifyOnEnum5]] = Field(None, Set=True) + onlyOnError: Optional[bool] = None + + +class JsonTransportPayloadConfiguration(TransportPayloadTypeConfiguration): + pass + + +class KeyFilter(BaseModel): + key: Optional[EntityKey] = None + valueType: Optional[ValueType] = None + predicate: Optional[ + Union[ + BooleanFilterPredicate, + ComplexFilterPredicate, + NumericFilterPredicate, + StringFilterPredicate, + ] + ] = None + + +class LoginWhiteLabelingParams(BaseModel): + logoImageUrl: Optional[str] = Field( + None, + description='Logo image URL', + example='https://company.com/images/logo.png', + ) + logoImageHeight: Optional[int] = Field( + None, + description='The height of a logo container. Logo image will be automatically scaled.', + ) + appTitle: Optional[str] = Field( + None, + description='White-labeled name of the platform', + example='My Company IoT Platform', + ) + favicon: Optional[Favicon] = Field( + None, description='JSON object that contains website icon url and type' + ) + paletteSettings: Optional[PaletteSettings] = Field( + None, + description='Complex JSON that describes structure of the Angular Material Palette. See [theming](https://material.angular.io/guide/theming) for more details', + ) + helpLinkBaseUrl: Optional[str] = Field(None, description='Base URL for help link') + uiHelpBaseUrl: Optional[str] = Field( + None, + description='Base URL for the repository with the UI help components (markdown)', + ) + enableHelpLinks: Optional[bool] = Field( + None, description='Enable or Disable help links' + ) + whiteLabelingEnabled: Optional[bool] = Field( + None, description='Enable white-labeling' + ) + showNameVersion: Optional[bool] = Field( + None, description='Show platform name and version on UI and login screen' + ) + platformName: Optional[str] = Field(None, description='White-labeled platform name') + platformVersion: Optional[str] = Field( + None, description='White-labeled platform version' + ) + customCss: Optional[str] = Field(None, description='Custom CSS content') + hideConnectivityDialog: Optional[bool] = Field( + None, description='Hide device connectivity dialog' + ) + pageBackgroundColor: Optional[str] = Field( + None, description='Login page background color', example='#d90f0f' + ) + darkForeground: Optional[bool] = Field( + None, description='Enable/Disable dark foreground' + ) + domainId: Optional[DomainId] = Field(None, description='Domain id') + baseUrl: Optional[str] = Field( + None, + description='Base URL for the activation link, etc', + example='https://iot.mycompany.com', + ) + prohibitDifferentUrl: Optional[bool] = Field( + None, + description='Prohibit use of other URLs. It is recommended to enable this setting', + example=True, + ) + adminSettingsId: Optional[str] = Field( + None, description='Id of the settings object that store this parameters' + ) + showNameBottom: Optional[bool] = Field( + None, description='Show platform name and version on login page' + ) + + +class LwM2mInstance(BaseModel): + id: Optional[int] = Field(None, description='LwM2M Instance id.', example=0) + resources: Optional[List[LwM2mResourceObserve]] = Field( + None, description='LwM2M Resource observe.' + ) + + +class LwM2mObject(BaseModel): + id: Optional[int] = Field(None, description='LwM2M Object id.', example=19) + keyId: Optional[str] = Field( + None, description='LwM2M Object key id.', example='19_1.0' + ) + name: Optional[str] = Field( + None, description='LwM2M Object name.', example='BinaryAppDataContainer' + ) + multiple: Optional[bool] = Field( + None, description='LwM2M Object multiple.', example=True + ) + mandatory: Optional[bool] = Field( + None, description='LwM2M Object mandatory.', example=False + ) + instances: Optional[List[LwM2mInstance]] = Field( + None, description='LwM2M Object instances.' + ) + + +class Lwm2mDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): + observeAttr: Optional[TelemetryMappingConfiguration] = None + bootstrapServerUpdateEnable: Optional[bool] = None + bootstrap: Optional[List[LwM2MBootstrapServerCredential]] = None + clientLwM2mSettings: Optional[OtherConfiguration] = None + + +class MicrosoftTeamsNotificationTargetConfig(NotificationTargetConfig): + webhookUrl: str + channelName: str + useOldApi: Optional[bool] = None + id: Optional[Any] = None + title: Optional[str] = None + firstName: Optional[str] = None + lastName: Optional[str] = None + email: Optional[str] = None + + +class MobileApp(BaseModel): + id: Optional[MobileAppId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + pkgName: str = Field(..., description='Application package name. Cannot be empty') + appSecret: str = Field( + ..., description='Application secret. The length must be at least 16 characters' + ) + platformType: PlatformType = Field( + ..., description='Application platform type: ANDROID or IOS' + ) + status: Status5 = Field( + ..., description='Application status: PUBLISHED, DEPRECATED, SUSPENDED, DRAFT' + ) + versionInfo: Optional[MobileAppVersionInfo] = Field( + None, description='Application version info' + ) + storeInfo: Optional[StoreInfo] = Field( + None, description='Application store information' + ) + name: Optional[str] = Field( + None, description='Mobile app package name', example='my.mobile.app' + ) + + +class MobileAppNotificationDeliveryMethodConfig(NotificationDeliveryMethodConfig): + firebaseServiceAccountCredentialsFileName: Optional[str] = None + firebaseServiceAccountCredentials: Optional[str] = None + useSystemSettings: Optional[bool] = None + + +class MobileLayoutConfig(BaseModel): + pages: Optional[ + List[Union[CustomMobilePage, DashboardPage, DefaultMobilePage, WebViewPage]] + ] = Field(None, description='List of pages') + + +class MqttDeviceProfileTransportConfiguration(DeviceProfileTransportConfiguration): + deviceTelemetryTopic: Optional[str] = None + deviceAttributesTopic: Optional[str] = None + deviceAttributesSubscribeTopic: Optional[str] = None + transportPayloadTypeConfiguration: Optional[TransportPayloadTypeConfiguration] = ( + None + ) + sparkplug: Optional[bool] = None + sparkplugAttributesMetricNames: Optional[List[str]] = Field(None, Set=True) + sendAckOnValidationException: Optional[bool] = None + + +class NewPlatformVersionNotificationRuleTriggerConfig(NotificationRuleTriggerConfig): + pass + + +class Notification(BaseModel): + requestId: Optional[NotificationRequestId] = None + recipientId: Optional[UserId] = None + type: Optional[Type18] = None + deliveryMethod: Optional[DeliveryMethod] = None + subject: Optional[str] = None + text: Optional[str] = None + additionalConfig: Optional[JsonNode] = None + info: Optional[NotificationInfo] = None + status: Optional[Status6] = None + id: Optional[NotificationId] = None + createdTime: Optional[int] = None + + +class NotificationRequestPreview(BaseModel): + processedTemplates: Optional[ + Dict[ + str, + Union[ + EmailDeliveryMethodNotificationTemplate, + MicrosoftTeamsDeliveryMethodNotificationTemplate, + MobileAppDeliveryMethodNotificationTemplate, + SlackDeliveryMethodNotificationTemplate, + SmsDeliveryMethodNotificationTemplate, + WebDeliveryMethodNotificationTemplate, + ], + ] + ] = None + totalRecipientsCount: Optional[int] = None + recipientsCountByTarget: Optional[Dict[str, int]] = None + recipientsPreview: Optional[List[str]] = None + + +class NotificationRule(BaseModel): + id: Optional[NotificationRuleId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + name: str + enabled: Optional[bool] = None + templateId: NotificationTemplateId + triggerType: TriggerType + triggerConfig: Union[ + AlarmAssignmentNotificationRuleTriggerConfig, + AlarmCommentNotificationRuleTriggerConfig, + AlarmNotificationRuleTriggerConfig, + ApiUsageLimitNotificationRuleTriggerConfig, + DeviceActivityNotificationRuleTriggerConfig, + EdgeCommunicationFailureNotificationRuleTriggerConfig, + EdgeConnectionNotificationRuleTriggerConfig, + EntitiesLimitNotificationRuleTriggerConfig, + EntityActionNotificationRuleTriggerConfig, + IntegrationLifecycleEventNotificationRuleTriggerConfig, + NewPlatformVersionNotificationRuleTriggerConfig, + RateLimitsNotificationRuleTriggerConfig, + RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig, + TaskProcessingFailureNotificationRuleTriggerConfig, + ] + recipientsConfig: EscalatedNotificationRuleRecipientsConfig + additionalConfig: Optional[NotificationRuleConfig] = None + + +class NotificationRuleInfo(BaseModel): + id: Optional[NotificationRuleId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + name: str + enabled: Optional[bool] = None + templateId: NotificationTemplateId + triggerType: TriggerType + triggerConfig: Union[ + AlarmAssignmentNotificationRuleTriggerConfig, + AlarmCommentNotificationRuleTriggerConfig, + AlarmNotificationRuleTriggerConfig, + ApiUsageLimitNotificationRuleTriggerConfig, + DeviceActivityNotificationRuleTriggerConfig, + EdgeCommunicationFailureNotificationRuleTriggerConfig, + EdgeConnectionNotificationRuleTriggerConfig, + EntitiesLimitNotificationRuleTriggerConfig, + EntityActionNotificationRuleTriggerConfig, + IntegrationLifecycleEventNotificationRuleTriggerConfig, + NewPlatformVersionNotificationRuleTriggerConfig, + RateLimitsNotificationRuleTriggerConfig, + RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig, + TaskProcessingFailureNotificationRuleTriggerConfig, + ] + recipientsConfig: EscalatedNotificationRuleRecipientsConfig + additionalConfig: Optional[NotificationRuleConfig] = None + templateName: Optional[str] = None + deliveryMethods: Optional[List[DeliveryMethod]] = None + + +class NotificationSettings(BaseModel): + deliveryMethodsConfigs: Dict[ + str, + Union[ + MobileAppNotificationDeliveryMethodConfig, + SlackNotificationDeliveryMethodConfig, + ], + ] + + +class NotificationTemplateConfig(BaseModel): + deliveryMethodsTemplates: Dict[ + str, + Union[ + EmailDeliveryMethodNotificationTemplate, + MicrosoftTeamsDeliveryMethodNotificationTemplate, + MobileAppDeliveryMethodNotificationTemplate, + SlackDeliveryMethodNotificationTemplate, + SmsDeliveryMethodNotificationTemplate, + WebDeliveryMethodNotificationTemplate, + ], + ] + + +class OAuth2Client(BaseModel): + id: Optional[OAuth2ClientId] = None + createdTime: Optional[int] = None + additionalInfo: JsonNode = Field( + ..., description='Additional info of OAuth2 client (e.g. providerName)' + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + title: str = Field(..., description='Oauth2 client title') + mapperConfig: OAuth2MapperConfig = Field( + ..., + description='Config for mapping OAuth2 log in response to platform entities', + ) + clientId: str = Field(..., description='OAuth2 client ID. Cannot be empty') + clientSecret: str = Field(..., description='OAuth2 client secret. Cannot be empty') + authorizationUri: str = Field( + ..., description='Authorization URI of the OAuth2 provider. Cannot be empty' + ) + accessTokenUri: str = Field( + ..., description='Access token URI of the OAuth2 provider. Cannot be empty' + ) + scope: List[str] = Field( + ..., + description='OAuth scopes that will be requested from OAuth2 platform. Cannot be empty', + ) + userInfoUri: Optional[str] = Field( + None, description='User info URI of the OAuth2 provider' + ) + userNameAttributeName: str = Field( + ..., + description='Name of the username attribute in OAuth2 provider response. Cannot be empty', + ) + jwkSetUri: Optional[str] = Field( + None, description='JSON Web Key URI of the OAuth2 provider' + ) + clientAuthenticationMethod: str = Field( + ..., + description="Client authentication method to use: 'BASIC' or 'POST'. Cannot be empty", + ) + loginButtonLabel: str = Field( + ..., description='OAuth2 provider label. Cannot be empty' + ) + loginButtonIcon: Optional[str] = Field( + None, description='Log in button icon for OAuth2 provider' + ) + platforms: Optional[List[Platform]] = Field( + None, + description='List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed)', + ) + name: Optional[str] = None + ownerId: Optional[EntityId] = None + + +class OAuth2ClientRegistrationTemplate(BaseModel): + id: Optional[OAuth2ClientRegistrationTemplateId] = None + createdTime: Optional[int] = None + providerId: str = Field( + ..., description='OAuth2 provider identifier (e.g. its name)' + ) + mapperConfig: Optional[OAuth2MapperConfig] = Field( + None, + description='Default config for mapping OAuth2 log in response to platform entities', + ) + authorizationUri: Optional[str] = Field( + None, description='Default authorization URI of the OAuth2 provider' + ) + accessTokenUri: Optional[str] = Field( + None, description='Default access token URI of the OAuth2 provider' + ) + scope: Optional[List[str]] = Field( + None, + description='Default OAuth scopes that will be requested from OAuth2 platform', + ) + userInfoUri: Optional[str] = Field( + None, description='Default user info URI of the OAuth2 provider' + ) + userNameAttributeName: Optional[str] = Field( + None, + description='Default name of the username attribute in OAuth2 provider log in response', + ) + jwkSetUri: Optional[str] = Field( + None, description='Default JSON Web Key URI of the OAuth2 provider' + ) + clientAuthenticationMethod: Optional[str] = Field( + None, + description="Default client authentication method to use: 'BASIC' or 'POST'", + ) + comment: Optional[str] = Field(None, description='Comment for OAuth2 provider') + loginButtonIcon: Optional[str] = Field( + None, description='Default log in button icon for OAuth2 provider' + ) + loginButtonLabel: Optional[str] = Field( + None, description='Default OAuth2 provider label' + ) + helpLink: Optional[str] = Field(None, description='Help link for OAuth2 provider') + name: Optional[str] = None + additionalInfo: Optional[JsonNode] = None + + +class OriginatorEntityOwnerUsersFilter(UsersFilter): + pass + + +class OtaPackage(BaseModel): + id: Optional[OtaPackageId] = Field( + None, + description='JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the ota package creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the ota package can't be changed.", + ) + deviceProfileId: Optional[DeviceProfileId] = Field( + None, + description="JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.", + ) + type: Optional[Type20] = Field( + None, description='OTA Package type.', example='FIRMWARE' + ) + title: Optional[str] = Field(None, description='OTA Package title.', example='fw') + version: Optional[str] = Field( + None, description='OTA Package version.', example=1.0 + ) + tag: Optional[str] = Field(None, description='OTA Package tag.', example='fw_1.0') + url: Optional[str] = Field( + None, description='OTA Package url.', example='http://thingsboard.org/fw/1' + ) + hasData: Optional[bool] = Field( + None, + description="Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.", + example=True, + ) + fileName: Optional[str] = Field( + None, description='OTA Package file name.', example='fw_1.0' + ) + contentType: Optional[str] = Field( + None, + description='OTA Package content type.', + example='APPLICATION_OCTET_STREAM', + ) + checksumAlgorithm: Optional[ChecksumAlgorithm] = Field( + None, description='OTA Package checksum algorithm.', example='CRC32' + ) + checksum: Optional[str] = Field( + None, description='OTA Package checksum.', example='0xd87f7e0c' + ) + dataSize: Optional[int] = Field( + None, description='OTA Package data size.', example=8 + ) + data: Optional[Data] = None + additionalInfo: Optional[JsonNode] = Field( + None, + description='OTA Package description.', + example='Description for the OTA Package fw_1.0', + ) + + +class OtaPackageInfo(BaseModel): + id: Optional[OtaPackageId] = Field( + None, + description='JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the ota package creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the ota package can't be changed.", + ) + deviceProfileId: Optional[DeviceProfileId] = Field( + None, + description="JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.", + ) + type: Optional[Type20] = Field( + None, description='OTA Package type.', example='FIRMWARE' + ) + title: Optional[str] = Field(None, description='OTA Package title.', example='fw') + version: Optional[str] = Field( + None, description='OTA Package version.', example=1.0 + ) + tag: Optional[str] = Field(None, description='OTA Package tag.', example='fw_1.0') + url: Optional[str] = Field( + None, description='OTA Package url.', example='http://thingsboard.org/fw/1' + ) + hasData: Optional[bool] = Field( + None, + description="Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.", + example=True, + ) + fileName: Optional[str] = Field( + None, description='OTA Package file name.', example='fw_1.0' + ) + contentType: Optional[str] = Field( + None, + description='OTA Package content type.', + example='APPLICATION_OCTET_STREAM', + ) + checksumAlgorithm: Optional[ChecksumAlgorithm] = Field( + None, description='OTA Package checksum algorithm.', example='CRC32' + ) + checksum: Optional[str] = Field( + None, description='OTA Package checksum.', example='0xd87f7e0c' + ) + dataSize: Optional[int] = Field( + None, description='OTA Package data size.', example=8 + ) + additionalInfo: Optional[JsonNode] = Field( + None, + description='OTA Package description.', + example='Description for the OTA Package fw_1.0', + ) + + +class PageDataAlarmCommentInfo(BaseModel): + data: Optional[List[AlarmCommentInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAlarmData(BaseModel): + data: Optional[List[AlarmData]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAlarmInfo(BaseModel): + data: Optional[List[AlarmInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAsset(BaseModel): + data: Optional[List[Asset]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAssetInfo(BaseModel): + data: Optional[List[AssetInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAssetProfile(BaseModel): + data: Optional[List[AssetProfile]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAssetProfileInfo(BaseModel): + data: Optional[List[AssetProfileInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataAuditLog(BaseModel): + data: Optional[List[AuditLog]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataBlobEntityWithCustomerInfo(BaseModel): + data: Optional[List[BlobEntityWithCustomerInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataContactBasedObject(BaseModel): + data: Optional[List[ContactBasedObject]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataConverter(BaseModel): + data: Optional[List[Converter]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataCustomMenuInfo(BaseModel): + data: Optional[List[CustomMenuInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataCustomer(BaseModel): + data: Optional[List[Customer]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataCustomerInfo(BaseModel): + data: Optional[List[CustomerInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataDashboardInfo(BaseModel): + data: Optional[List[DashboardInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataDeviceInfo(BaseModel): + data: Optional[List[DeviceInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataDeviceProfileInfo(BaseModel): + data: Optional[List[DeviceProfileInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataDomainInfo(BaseModel): + data: Optional[List[DomainInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEdge(BaseModel): + data: Optional[List[Edge]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEdgeEvent(BaseModel): + data: Optional[List[EdgeEvent]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEdgeInfo(BaseModel): + data: Optional[List[EdgeInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEntityData(BaseModel): + data: Optional[List[EntityData]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEntityGroupInfo(BaseModel): + data: Optional[List[EntityGroupInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEntitySubtype(BaseModel): + data: Optional[List[EntitySubtype]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEntityView(BaseModel): + data: Optional[List[EntityView]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEntityViewInfo(BaseModel): + data: Optional[List[EntityViewInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataEventInfo(BaseModel): + data: Optional[List[EventInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataIntegration(BaseModel): + data: Optional[List[Integration]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataIntegrationInfo(BaseModel): + data: Optional[List[IntegrationInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataMobileApp(BaseModel): + data: Optional[List[MobileApp]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataNotification(BaseModel): + data: Optional[List[Notification]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataNotificationRuleInfo(BaseModel): + data: Optional[List[NotificationRuleInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataOtaPackageInfo(BaseModel): + data: Optional[List[OtaPackageInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataShortEntityView(BaseModel): + data: Optional[List[ShortEntityView]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataUserInfo(BaseModel): + data: Optional[List[UserInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataWidgetTypeInfo(BaseModel): + data: Optional[List[WidgetTypeInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PlatformUsersNotificationTargetConfig(NotificationTargetConfig): + usersFilter: UsersFilter + + +class ProtoTransportPayloadConfiguration(TransportPayloadTypeConfiguration): + deviceTelemetryProtoSchema: Optional[str] = None + deviceAttributesProtoSchema: Optional[str] = None + deviceRpcRequestProtoSchema: Optional[str] = None + deviceRpcResponseProtoSchema: Optional[str] = None + enableCompatibilityWithJsonPayloadFormat: Optional[bool] = None + useJsonPayloadFormatForDefaultDownlinkTopics: Optional[bool] = None + + +class QrCodeSettings(BaseModel): + id: Optional[QrCodeSettingsId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + useSystemSettings: Optional[bool] = Field( + None, description='Use settings from system level', example=True + ) + useDefaultApp: Optional[bool] = Field( + None, + description='Type of application: true means use default Thingsboard app', + example=True, + ) + mobileAppBundleId: Optional[MobileAppBundleId] = Field( + None, description='Mobile app bundle.' + ) + qrCodeConfig: QRCodeConfig = Field(..., description='QR code config configuration.') + androidEnabled: Optional[bool] = Field( + None, description='Indicates if google play link is available', example=True + ) + iosEnabled: Optional[bool] = Field( + None, description='Indicates if apple store link is available', example=True + ) + googlePlayLink: Optional[str] = None + appStoreLink: Optional[str] = None + + +class Queue(BaseModel): + id: Optional[QueueId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + name: Optional[str] = None + topic: Optional[str] = None + pollInterval: Optional[int] = None + partitions: Optional[int] = None + consumerPerPartition: Optional[bool] = None + packProcessingTimeout: Optional[int] = None + submitStrategy: Optional[SubmitStrategy] = None + processingStrategy: Optional[ProcessingStrategy] = None + additionalInfo: Optional[JsonNode] = None + + +class QueueStats(BaseModel): + id: Optional[QueueStatsId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + queueName: Optional[str] = None + serviceId: Optional[str] = None + + +class Role(BaseModel): + tenantId: TenantId = Field(..., description='JSON object with Tenant Id.') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id. ' + ) + name: str = Field(..., description='Role Name', example='Read-Only') + type: Type26 = Field( + ..., description='Type of the role: generic or group', example='GROUP' + ) + permissions: Optional[JsonNode] = None + version: Optional[int] = None + id: Optional[RoleId] = Field( + 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.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the role creation, in milliseconds', + example=1609459200000, + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the role' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class Rpc(BaseModel): + id: Optional[RpcId] = Field( + None, + description='JSON object with the rpc Id. Referencing non-existing rpc Id will cause error.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the rpc creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + deviceId: Optional[DeviceId] = Field( + None, description='JSON object with Device Id.' + ) + expirationTime: Optional[int] = Field( + None, description='Expiration time of the request.' + ) + request: Optional[JsonNode] = Field( + None, + description='The request body that will be used to send message to device.', + ) + response: Optional[JsonNode] = Field( + None, description='The response from the device.' + ) + status: Optional[Status9] = Field( + None, description='The current status of the RPC call.' + ) + additionalInfo: Optional[JsonNode] = Field( + None, + description='Additional info used in the rule engine to process the updates to the RPC state.', + ) + + +class RuleChain(BaseModel): + id: Optional[RuleChainId] = Field( + 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.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the rule chain creation, in milliseconds', + example=1609459200000, + ) + tenantId: TenantId = Field(..., description='JSON object with Tenant Id.') + name: str = Field( + ..., description='Rule Chain name', example='Humidity data processing' + ) + type: Optional[Type27] = Field( + None, + description="Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only.", + example='A4B72CCDFF33', + ) + firstRuleNodeId: Optional[RuleNodeId] = Field( + None, + description='JSON object with Rule Chain Id. Pointer to the first rule node that should receive all messages pushed to this rule chain.', + ) + root: Optional[bool] = Field( + None, + description='Indicates root rule chain. The root rule chain process messages from all devices and entities by default. User may configure default rule chain per device profile.', + ) + debugMode: Optional[bool] = Field(None, description='Reserved for future usage.') + version: Optional[int] = None + configuration: Optional[JsonNode] = None + additionalInfo: Optional[JsonNode] = None + + +class RuleChainConnectionInfo(BaseModel): + fromIndex: int = Field( + ..., + description="Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection.", + ) + targetRuleChainId: RuleChainId = Field( + ..., description='JSON object with the Rule Chain Id.' + ) + additionalInfo: JsonNode = Field( + ..., + description='JSON object with the additional information about the connection.', + ) + type: str = Field( + ..., + description="Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'", + ) + + +class RuleChainOutputLabelsUsage(BaseModel): + ruleChainId: RuleChainId = Field(..., description='Rule Chain Id') + ruleNodeId: RuleNodeId = Field(..., description='Rule Node Id') + ruleChainName: str = Field(..., description='Rule Chain Name') + ruleNodeName: str = Field(..., description='Rule Node Name') + labels: List[str] = Field(..., description='Output labels', Set=True) + + +class RuleNode(BaseModel): + id: Optional[RuleNodeId] = Field( + None, + description='JSON object with the Rule Node Id. Specify this field to update the Rule Node. Referencing non-existing Rule Node Id will cause error. Omit this field to create new rule node.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the rule node creation, in milliseconds', + example=1609459200000, + ) + ruleChainId: Optional[RuleChainId] = Field( + None, description='JSON object with the Rule Chain Id. ' + ) + type: Optional[str] = Field( + None, + description='Full Java Class Name of the rule node implementation. ', + example='com.mycompany.iot.rule.engine.ProcessingNode', + ) + name: Optional[str] = Field( + None, + description='User defined name of the rule node. Used on UI and for logging. ', + example='Process sensor reading', + ) + debugMode: Optional[bool] = None + debugSettings: Optional[DebugSettings] = Field( + None, description='Debug settings object.' + ) + singletonMode: Optional[bool] = Field( + None, description='Enable/disable singleton mode. ', example=False + ) + queueName: Optional[str] = Field(None, description='Queue name. ', example='Main') + configurationVersion: Optional[int] = Field( + None, description='Version of rule node configuration. ', example=0 + ) + externalId: Optional[RuleNodeId] = None + configuration: Optional[JsonNode] = None + additionalInfo: Optional[JsonNode] = Field( + None, + description="Additional parameters of the rule node. Contains 'layoutX' and 'layoutY' properties for visualization.", + ) + + +class SaveOtaPackageInfoRequest(BaseModel): + id: Optional[OtaPackageId] = Field( + None, + description='JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the ota package creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the ota package can't be changed.", + ) + deviceProfileId: Optional[DeviceProfileId] = Field( + None, + description="JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.", + ) + type: Optional[Type28] = Field( + None, description='OTA Package type.', example='FIRMWARE' + ) + title: Optional[str] = Field(None, description='OTA Package title.', example='fw') + version: Optional[str] = Field( + None, description='OTA Package version.', example=1.0 + ) + tag: Optional[str] = Field(None, description='OTA Package tag.', example='fw_1.0') + url: Optional[str] = Field( + None, description='OTA Package url.', example='http://thingsboard.org/fw/1' + ) + hasData: Optional[bool] = Field( + None, + description="Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.", + example=True, + ) + fileName: Optional[str] = Field( + None, description='OTA Package file name.', example='fw_1.0' + ) + contentType: Optional[str] = Field( + None, + description='OTA Package content type.', + example='APPLICATION_OCTET_STREAM', + ) + checksumAlgorithm: Optional[ChecksumAlgorithm] = Field( + None, description='OTA Package checksum algorithm.', example='CRC32' + ) + checksum: Optional[str] = Field( + None, description='OTA Package checksum.', example='0xd87f7e0c' + ) + dataSize: Optional[int] = Field( + None, description='OTA Package data size.', example=8 + ) + usesUrl: Optional[bool] = Field( + None, + description="Indicates OTA Package uses url. Should be 'true' if uses url or 'false' if will be used data.", + example=True, + ) + additionalInfo: Optional[JsonNode] = Field( + None, + description='OTA Package description.', + example='Description for the OTA Package fw_1.0', + ) + + +class SchedulerEvent(BaseModel): + id: Optional[SchedulerEventId] = Field( + None, + description='JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the scheduler event creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + originatorId: Optional[EntityId] = Field( + None, description='JSON object with Originator Id' + ) + name: Optional[str] = Field( + None, description='scheduler event name', example='Weekly Dashboard Report' + ) + type: Optional[str] = Field( + None, description='scheduler event type', example='generateReport' + ) + enabled: Optional[bool] = Field( + None, description='Enable/disable scheduler', example=True + ) + version: Optional[int] = None + configuration: Optional[JsonNode] = None + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the scheduler event' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + schedule: Optional[JsonNode] = None + + +class SchedulerEventInfo(BaseModel): + id: Optional[SchedulerEventId] = Field( + None, + description='JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the scheduler event creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + originatorId: Optional[EntityId] = Field( + None, description='JSON object with Originator Id' + ) + name: Optional[str] = Field( + None, description='scheduler event name', example='Weekly Dashboard Report' + ) + type: Optional[str] = Field( + None, description='scheduler event type', example='generateReport' + ) + enabled: Optional[bool] = Field( + None, description='Enable/disable scheduler', example=True + ) + version: Optional[int] = None + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the scheduler event' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + schedule: Optional[JsonNode] = None + + +class SchedulerEventWithCustomerInfo(BaseModel): + id: Optional[SchedulerEventId] = Field( + None, + description='JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the scheduler event creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id' + ) + originatorId: Optional[EntityId] = Field( + None, description='JSON object with Originator Id' + ) + name: Optional[str] = Field( + None, description='scheduler event name', example='Weekly Dashboard Report' + ) + type: Optional[str] = Field( + None, description='scheduler event type', example='generateReport' + ) + enabled: Optional[bool] = Field( + None, description='Enable/disable scheduler', example=True + ) + version: Optional[int] = None + customerTitle: Optional[str] = Field( + None, description='Title of the customer', example='Company A' + ) + customerIsPublic: Optional[bool] = Field( + None, description='Parameter that specifies if customer is public' + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the scheduler event' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + schedule: Optional[JsonNode] = None + + +class ScriptCalculatedFieldConfiguration(CalculatedFieldConfiguration): + pass + + +class SecuritySettings(BaseModel): + passwordPolicy: Optional[UserPasswordPolicy] = Field( + None, description='The user password policy object.' + ) + maxFailedLoginAttempts: Optional[int] = Field( + None, + description='Maximum number of failed login attempts allowed before user account is locked.', + ) + userLockoutNotificationEmail: Optional[str] = Field( + None, description='Email to use for notifications about locked users.' + ) + mobileSecretKeyLength: Optional[int] = Field( + None, description='Mobile secret key length' + ) + userActivationTokenTtl: conint(ge=1, le=24) = Field( + ..., description='TTL in hours for user activation link' + ) + passwordResetTokenTtl: conint(ge=1, le=24) = Field( + ..., description='TTL in hours for password reset link' + ) + + +class SelfRegistrationParams(BaseModel): + permissions: Optional[List[GroupPermission]] = None + type: Optional[Type29] = None + showPrivacyPolicy: Optional[bool] = None + showTermsOfUse: Optional[bool] = None + title: Optional[str] = None + enabled: Optional[bool] = None + homeDashboard: Optional[HomeDashboardParams] = None + customMenuId: Optional[CustomMenuId] = None + notificationRecipient: Optional[NotificationTargetId] = None + captcha: Optional[ + Union[EnterpriseCaptchaParams, V2CaptchaParams, V3CaptchaParams] + ] = None + signUpFields: Optional[List[SignUpField]] = None + defaultDashboard: Optional[DefaultDashboardParams] = None + customerTitlePrefix: Optional[str] = None + customerGroupId: Optional[EntityGroupId] = None + + +class SharedAttributesSettingSnmpCommunicationConfig(SnmpCommunicationConfig): + mappings: Optional[List[SnmpMapping]] = None + + +class SignUpSelfRegistrationParams(BaseModel): + title: Optional[str] = None + captcha: Optional[ + Union[EnterpriseCaptchaParams, V2CaptchaParams, V3CaptchaParams] + ] = None + fields: Optional[List[SignUpField]] = None + showPrivacyPolicy: Optional[bool] = None + showTermsOfUse: Optional[bool] = None + + +class SimpleCalculatedFieldConfiguration(CalculatedFieldConfiguration): + pass + + +class SingleEntityVersionCreateRequest(VersionCreateRequest): + entityId: Optional[EntityId] = None + config: Optional[VersionCreateConfig] = None + + +class SingleEntityVersionLoadRequest(VersionLoadRequest): + internalEntityId: Optional[EntityId] = None + externalEntityId: Optional[EntityId] = None + config: Optional[VersionLoadConfig] = None + + +class SmppSmsProviderConfiguration(SmsProviderConfiguration): + protocolVersion: ProtocolVersion = Field(..., description='SMPP version') + host: str = Field(..., description='SMPP host') + port: int = Field(..., description='SMPP port') + systemId: str = Field(..., description='System ID') + password: str = Field(..., description='Password') + systemType: Optional[str] = Field(None, description='System type') + bindType: Optional[BindType] = Field( + None, + description='TX - Transmitter, RX - Receiver, TRX - Transciever. By default TX is used', + ) + serviceType: Optional[str] = Field(None, description='Service type') + sourceAddress: Optional[str] = Field(None, description='Source address') + sourceTon: Optional[str] = Field( + None, + description='Source TON (Type of Number). Needed is source address is set. 5 by default.\n0 - Unknown\n1 - International\n2 - National\n3 - Network Specific\n4 - Subscriber Number\n5 - Alphanumeric\n6 - Abbreviated', + ) + sourceNpi: Optional[str] = Field( + None, + description='Source NPI (Numbering Plan Identification). Needed is source address is set. 0 by default.\n0 - Unknown\n1 - ISDN/telephone numbering plan (E163/E164)\n3 - Data numbering plan (X.121)\n4 - Telex numbering plan (F.69)\n6 - Land Mobile (E.212) =6\n8 - National numbering plan\n9 - Private numbering plan\n10 - ERMES numbering plan (ETSI DE/PS 3 01-3)\n13 - Internet (IP)\n18 - WAP Client Id (to be defined by WAP Forum)', + ) + destinationTon: Optional[str] = Field( + None, + description='Destination TON (Type of Number). 5 by default.\n0 - Unknown\n1 - International\n2 - National\n3 - Network Specific\n4 - Subscriber Number\n5 - Alphanumeric\n6 - Abbreviated', + ) + destinationNpi: Optional[str] = Field( + None, + description='Destination NPI (Numbering Plan Identification). 0 by default.\n0 - Unknown\n1 - ISDN/telephone numbering plan (E163/E164)\n3 - Data numbering plan (X.121)\n4 - Telex numbering plan (F.69)\n6 - Land Mobile (E.212) =6\n8 - National numbering plan\n9 - Private numbering plan\n10 - ERMES numbering plan (ETSI DE/PS 3 01-3)\n13 - Internet (IP)\n18 - WAP Client Id (to be defined by WAP Forum)', + ) + addressRange: Optional[str] = Field(None, description='Address range') + codingScheme: Optional[CodingScheme] = Field( + None, + description='0 - SMSC Default Alphabet (ASCII for short and long code and to GSM for toll-free, used as default)\n1 - IA5 (ASCII for short and long code, Latin 9 for toll-free (ISO-8859-9))\n2 - Octet Unspecified (8-bit binary)\n3 - Latin 1 (ISO-8859-1)\n4 - Octet Unspecified (8-bit binary)\n5 - JIS (X 0208-1990)\n6 - Cyrillic (ISO-8859-5)\n7 - Latin/Hebrew (ISO-8859-8)\n8 - UCS2/UTF-16 (ISO/IEC-10646)\n9 - Pictogram Encoding\n10 - Music Codes (ISO-2022-JP)\n13 - Extended Kanji JIS (X 0212-1990)\n14 - Korean Graphic Character Set (KS C 5601/KS X 1001)', + ) + + +class SmsTwoFaAccountConfig(TwoFaAccountConfig): + phoneNumber: constr(pattern=r'^\+[1-9]\d{1,14}$') + + +class SmsTwoFaProviderConfig(TwoFaProviderConfig): + verificationCodeLifetime: Optional[conint(ge=1)] = None + smsVerificationMessageTemplate: constr(pattern=r'.*\$\{code}.*') + + +class SpecificTimeSchedule(AlarmSchedule): + timezone: Optional[str] = None + daysOfWeek: Optional[List[int]] = Field(None, Set=True) + startsOn: Optional[int] = None + endsOn: Optional[int] = None + + +class SystemAdministratorsFilter(UsersFilter): + pass + + +class SystemInfo(BaseModel): + systemData: Optional[List[SystemInfoData]] = Field(None, description='System data.') + monolith: Optional[bool] = None + + +class TbImageDeleteResult(BaseModel): + success: Optional[bool] = None + whiteLabelingList: Optional[List[WhiteLabeling]] = None + references: Optional[Dict[str, List[HasIdObject]]] = None + + +class TbResource(BaseModel): + id: Optional[TbResourceId] = Field( + None, + description='JSON object with the Resource Id. Specify this field to update the Resource. Referencing non-existing Resource Id will cause error. Omit this field to create new Resource.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the resource creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the resource can't be changed.", + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Customer Id of the resource can't be changed.", + ) + title: Optional[str] = Field( + None, description='Resource title.', example='BinaryAppDataContainer id=19 v1.0' + ) + resourceType: Optional[ResourceType] = Field( + None, description='Resource type.', example='LWM2M_MODEL' + ) + resourceSubType: Optional[ResourceSubType] = Field( + None, description='Resource sub type.', example='IOT_SVG' + ) + resourceKey: Optional[str] = Field( + None, description='Resource key.', example='19_1.0' + ) + publicResourceKey: Optional[str] = None + etag: Optional[str] = Field( + None, + description='Resource etag.', + example='33a64df551425fcc55e4d42a148795d9f25f89d4', + ) + fileName: Optional[str] = Field( + None, description='Resource file name.', example='19.xml' + ) + descriptor: Optional[JsonNode] = None + data: Optional[str] = Field( + None, + description='Resource data.', + example='77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLQpGSUxFIElORk9STUFUSU9OCgpPTUEgUGVybWFuZW50IERvY3VtZW50CiAgIEZpbGU6IE9NQS1TVVAtTHdNMk1fQmluYXJ5QXBwRGF0YUNvbnRhaW5lci1WMV8wXzEtMjAxOTAyMjEtQQogICBUeXBlOiB4bWwKClB1YmxpYyBSZWFjaGFibGUgSW5mb3JtYXRpb24KICAgUGF0aDogaHR0cDovL3d3dy5vcGVubW9iaWxlYWxsaWFuY2Uub3JnL3RlY2gvcHJvZmlsZXMKICAgTmFtZTogTHdNMk1fQmluYXJ5QXBwRGF0YUNvbnRhaW5lci12MV8wXzEueG1sCgpOT1JNQVRJVkUgSU5GT1JNQVRJT04KCiAgSW5mb3JtYXRpb24gYWJvdXQgdGhpcyBmaWxlIGNhbiBiZSBmb3VuZCBpbiB0aGUgbGF0ZXN0IHJldmlzaW9uIG9mCgogIE9NQS1UUy1MV00yTV9CaW5hcnlBcHBEYXRhQ29udGFpbmVyLVYxXzBfMQoKICBUaGlzIGlzIGF2YWlsYWJsZSBhdCBodHRwOi8vd3d3Lm9wZW5tb2JpbGVhbGxpYW5jZS5vcmcvCgogIFNlbmQgY29tbWVudHMgdG8gaHR0cHM6Ly9naXRodWIuY29tL09wZW5Nb2JpbGVBbGxpYW5jZS9PTUFfTHdNMk1fZm9yX0RldmVsb3BlcnMvaXNzdWVzCgpDSEFOR0UgSElTVE9SWQoKMTUwNjIwMTggU3RhdHVzIGNoYW5nZWQgdG8gQXBwcm92ZWQgYnkgRE0sIERvYyBSZWYgIyBPTUEtRE0mU0UtMjAxOC0wMDYxLUlOUF9MV00yTV9BUFBEQVRBX1YxXzBfRVJQX2Zvcl9maW5hbF9BcHByb3ZhbAoyMTAyMjAxOSBTdGF0dXMgY2hhbmdlZCB0byBBcHByb3ZlZCBieSBJUFNPLCBEb2MgUmVmICMgT01BLUlQU08tMjAxOS0wMDI1LUlOUF9Md00yTV9PYmplY3RfQXBwX0RhdGFfQ29udGFpbmVyXzFfMF8xX2Zvcl9GaW5hbF9BcHByb3ZhbAoKTEVHQUwgRElTQ0xBSU1FUgoKQ29weXJpZ2h0IDIwMTkgT3BlbiBNb2JpbGUgQWxsaWFuY2UuCgpSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCmFyZSBtZXQ6CgoxLiBSZWRpc3RyaWJ1dGlvbnMgb2Ygc291cmNlIGNvZGUgbXVzdCByZXRhaW4gdGhlIGFib3ZlIGNvcHlyaWdodApub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuCjIuIFJlZGlzdHJpYnV0aW9ucyBpbiBiaW5hcnkgZm9ybSBtdXN0IHJlcHJvZHVjZSB0aGUgYWJvdmUgY29weXJpZ2h0Cm5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lciBpbiB0aGUKZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkIHdpdGggdGhlIGRpc3RyaWJ1dGlvbi4KMy4gTmVpdGhlciB0aGUgbmFtZSBvZiB0aGUgY29weXJpZ2h0IGhvbGRlciBub3IgdGhlIG5hbWVzIG9mIGl0cwpjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWQKZnJvbSB0aGlzIHNvZnR3YXJlIHdpdGhvdXQgc3BlY2lmaWMgcHJpb3Igd3JpdHRlbiBwZXJtaXNzaW9uLgoKVEhJUyBTT0ZUV0FSRSBJUyBQUk9WSURFRCBCWSBUSEUgQ09QWVJJR0hUIEhPTERFUlMgQU5EIENPTlRSSUJVVE9SUwoiQVMgSVMiIEFORCBBTlkgRVhQUkVTUyBPUiBJTVBMSUVEIFdBUlJBTlRJRVMsIElOQ0xVRElORywgQlVUIE5PVApMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUwpGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQVJFIERJU0NMQUlNRUQuIElOIE5PIEVWRU5UIFNIQUxMIFRIRQpDT1BZUklHSFQgSE9MREVSIE9SIENPTlRSSUJVVE9SUyBCRSBMSUFCTEUgRk9SIEFOWSBESVJFQ1QsIElORElSRUNULApJTkNJREVOVEFMLCBTUEVDSUFMLCBFWEVNUExBUlksIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyAoSU5DTFVESU5HLApCVVQgTk9UIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7CkxPU1MgT0YgVVNFLCBEQVRBLCBPUiBQUk9GSVRTOyBPUiBCVVNJTkVTUyBJTlRFUlJVUFRJT04pIEhPV0VWRVIKQ0FVU0VEIEFORCBPTiBBTlkgVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTiBDT05UUkFDVCwgU1RSSUNUCkxJQUJJTElUWSwgT1IgVE9SVCAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOCkFOWSBXQVkgT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRQpQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS4KClRoZSBhYm92ZSBsaWNlbnNlIGlzIHVzZWQgYXMgYSBsaWNlbnNlIHVuZGVyIGNvcHlyaWdodCBvbmx5LiBQbGVhc2UKcmVmZXJlbmNlIHRoZSBPTUEgSVBSIFBvbGljeSBmb3IgcGF0ZW50IGxpY2Vuc2luZyB0ZXJtczoKaHR0cHM6Ly93d3cub21hc3BlY3dvcmtzLm9yZy9hYm91dC9pbnRlbGxlY3R1YWwtcHJvcGVydHktcmlnaHRzLwoKLS0+CjxMV00yTSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iaHR0cDovL29wZW5tb2JpbGVhbGxpYW5jZS5vcmcvdGVjaC9wcm9maWxlcy9MV00yTS54c2QiPgoJPE9iamVjdCBPYmplY3RUeXBlPSJNT0RlZmluaXRpb24iPgoJCTxOYW1lPkJpbmFyeUFwcERhdGFDb250YWluZXI8L05hbWU+CgkJPERlc2NyaXB0aW9uMT48IVtDREFUQVtUaGlzIEx3TTJNIE9iamVjdHMgcHJvdmlkZXMgdGhlIGFwcGxpY2F0aW9uIHNlcnZpY2UgZGF0YSByZWxhdGVkIHRvIGEgTHdNMk0gU2VydmVyLCBlZy4gV2F0ZXIgbWV0ZXIgZGF0YS4gClRoZXJlIGFyZSBzZXZlcmFsIG1ldGhvZHMgdG8gY3JlYXRlIGluc3RhbmNlIHRvIGluZGljYXRlIHRoZSBtZXNzYWdlIGRpcmVjdGlvbiBiYXNlZCBvbiB0aGUgbmVnb3RpYXRpb24gYmV0d2VlbiBBcHBsaWNhdGlvbiBhbmQgTHdNMk0uIFRoZSBDbGllbnQgYW5kIFNlcnZlciBzaG91bGQgbmVnb3RpYXRlIHRoZSBpbnN0YW5jZShzKSB1c2VkIHRvIGV4Y2hhbmdlIHRoZSBkYXRhLiBGb3IgZXhhbXBsZToKIC0gVXNpbmcgYSBzaW5nbGUgaW5zdGFuY2UgZm9yIGJvdGggZGlyZWN0aW9ucyBjb21tdW5pY2F0aW9uLCBmcm9tIENsaWVudCB0byBTZXJ2ZXIgYW5kIGZyb20gU2VydmVyIHRvIENsaWVudC4KIC0gVXNpbmcgYW4gaW5zdGFuY2UgZm9yIGNvbW11bmljYXRpb24gZnJvbSBDbGllbnQgdG8gU2VydmVyIGFuZCBhbm90aGVyIG9uZSBmb3IgY29tbXVuaWNhdGlvbiBmcm9tIFNlcnZlciB0byBDbGllbnQKIC0gVXNpbmcgc2V2ZXJhbCBpbnN0YW5jZXMKXV0+PC9EZXNjcmlwdGlvbjE+CgkJPE9iamVjdElEPjE5PC9PYmplY3RJRD4KCQk8T2JqZWN0VVJOPnVybjpvbWE6bHdtMm06b21hOjE5PC9PYmplY3RVUk4+CgkJPExXTTJNVmVyc2lvbj4xLjA8L0xXTTJNVmVyc2lvbj4KCQk8T2JqZWN0VmVyc2lvbj4xLjA8L09iamVjdFZlcnNpb24+CgkJPE11bHRpcGxlSW5zdGFuY2VzPk11bHRpcGxlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQk8TWFuZGF0b3J5Pk9wdGlvbmFsPC9NYW5kYXRvcnk+CgkJPFJlc291cmNlcz4KCQkJPEl0ZW0gSUQ9IjAiPjxOYW1lPkRhdGE8L05hbWU+CgkJCQk8T3BlcmF0aW9ucz5SVzwvT3BlcmF0aW9ucz4KCQkJCTxNdWx0aXBsZUluc3RhbmNlcz5NdWx0aXBsZTwvTXVsdGlwbGVJbnN0YW5jZXM+CgkJCQk8TWFuZGF0b3J5Pk1hbmRhdG9yeTwvTWFuZGF0b3J5PgoJCQkJPFR5cGU+T3BhcXVlPC9UeXBlPgoJCQkJPFJhbmdlRW51bWVyYXRpb24gLz4KCQkJCTxVbml0cyAvPgoJCQkJPERlc2NyaXB0aW9uPjwhW0NEQVRBW0luZGljYXRlcyB0aGUgYXBwbGljYXRpb24gZGF0YSBjb250ZW50Ll1dPjwvRGVzY3JpcHRpb24+CgkJCTwvSXRlbT4KCQkJPEl0ZW0gSUQ9IjEiPjxOYW1lPkRhdGEgUHJpb3JpdHk8L05hbWU+CgkJCQk8T3BlcmF0aW9ucz5SVzwvT3BlcmF0aW9ucz4KCQkJCTxNdWx0aXBsZUluc3RhbmNlcz5TaW5nbGU8L011bHRpcGxlSW5zdGFuY2VzPgoJCQkJPE1hbmRhdG9yeT5PcHRpb25hbDwvTWFuZGF0b3J5PgoJCQkJPFR5cGU+SW50ZWdlcjwvVHlwZT4KCQkJCTxSYW5nZUVudW1lcmF0aW9uPjEgYnl0ZXM8L1JhbmdlRW51bWVyYXRpb24+CgkJCQk8VW5pdHMgLz4KCQkJCTxEZXNjcmlwdGlvbj48IVtDREFUQVtJbmRpY2F0ZXMgdGhlIEFwcGxpY2F0aW9uIGRhdGEgcHJpb3JpdHk6CjA6SW1tZWRpYXRlCjE6QmVzdEVmZm9ydAoyOkxhdGVzdAozLTEwMDogUmVzZXJ2ZWQgZm9yIGZ1dHVyZSB1c2UuCjEwMS0yNTQ6IFByb3ByaWV0YXJ5IG1vZGUuXV0+PC9EZXNjcmlwdGlvbj4KCQkJPC9JdGVtPgoJCQk8SXRlbSBJRD0iMiI+PE5hbWU+RGF0YSBDcmVhdGlvbiBUaW1lPC9OYW1lPgoJCQkJPE9wZXJhdGlvbnM+Ulc8L09wZXJhdGlvbnM+CgkJCQk8TXVsdGlwbGVJbnN0YW5jZXM+U2luZ2xlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQkJCTxNYW5kYXRvcnk+T3B0aW9uYWw8L01hbmRhdG9yeT4KCQkJCTxUeXBlPlRpbWU8L1R5cGU+CgkJCQk8UmFuZ2VFbnVtZXJhdGlvbiAvPgoJCQkJPFVuaXRzIC8+CgkJCQk8RGVzY3JpcHRpb24+PCFbQ0RBVEFbSW5kaWNhdGVzIHRoZSBEYXRhIGluc3RhbmNlIGNyZWF0aW9uIHRpbWVzdGFtcC5dXT48L0Rlc2NyaXB0aW9uPgoJCQk8L0l0ZW0+CgkJCTxJdGVtIElEPSIzIj48TmFtZT5EYXRhIERlc2NyaXB0aW9uPC9OYW1lPgoJCQkJPE9wZXJhdGlvbnM+Ulc8L09wZXJhdGlvbnM+CgkJCQk8TXVsdGlwbGVJbnN0YW5jZXM+U2luZ2xlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQkJCTxNYW5kYXRvcnk+T3B0aW9uYWw8L01hbmRhdG9yeT4KCQkJCTxUeXBlPlN0cmluZzwvVHlwZT4KCQkJCTxSYW5nZUVudW1lcmF0aW9uPjMyIGJ5dGVzPC9SYW5nZUVudW1lcmF0aW9uPgoJCQkJPFVuaXRzIC8+CgkJCQk8RGVzY3JpcHRpb24+PCFbQ0RBVEFbSW5kaWNhdGVzIHRoZSBkYXRhIGRlc2NyaXB0aW9uLgplLmcuICJtZXRlciByZWFkaW5nIi5dXT48L0Rlc2NyaXB0aW9uPgoJCQk8L0l0ZW0+CgkJCTxJdGVtIElEPSI0Ij48TmFtZT5EYXRhIEZvcm1hdDwvTmFtZT4KCQkJCTxPcGVyYXRpb25zPlJXPC9PcGVyYXRpb25zPgoJCQkJPE11bHRpcGxlSW5zdGFuY2VzPlNpbmdsZTwvTXVsdGlwbGVJbnN0YW5jZXM+CgkJCQk8TWFuZGF0b3J5Pk9wdGlvbmFsPC9NYW5kYXRvcnk+CgkJCQk8VHlwZT5TdHJpbmc8L1R5cGU+CgkJCQk8UmFuZ2VFbnVtZXJhdGlvbj4zMiBieXRlczwvUmFuZ2VFbnVtZXJhdGlvbj4KCQkJCTxVbml0cyAvPgoJCQkJPERlc2NyaXB0aW9uPjwhW0NEQVRBW0luZGljYXRlcyB0aGUgZm9ybWF0IG9mIHRoZSBBcHBsaWNhdGlvbiBEYXRhLgplLmcuIFlHLU1ldGVyLVdhdGVyLVJlYWRpbmcKVVRGOC1zdHJpbmcKXV0+PC9EZXNjcmlwdGlvbj4KCQkJPC9JdGVtPgoJCQk8SXRlbSBJRD0iNSI+PE5hbWU+QXBwIElEPC9OYW1lPgoJCQkJPE9wZXJhdGlvbnM+Ulc8L09wZXJhdGlvbnM+CgkJCQk8TXVsdGlwbGVJbnN0YW5jZXM+U2luZ2xlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQkJCTxNYW5kYXRvcnk+T3B0aW9uYWw8L01hbmRhdG9yeT4KCQkJCTxUeXBlPkludGVnZXI8L1R5cGU+CgkJCQk8UmFuZ2VFbnVtZXJhdGlvbj4yIGJ5dGVzPC9SYW5nZUVudW1lcmF0aW9uPgoJCQkJPFVuaXRzIC8+CgkJCQk8RGVzY3JpcHRpb24+PCFbQ0RBVEFbSW5kaWNhdGVzIHRoZSBkZXN0aW5hdGlvbiBBcHBsaWNhdGlvbiBJRC5dXT48L0Rlc2NyaXB0aW9uPgoJCQk8L0l0ZW0+PC9SZXNvdXJjZXM+CgkJPERlc2NyaXB0aW9uMj48IVtDREFUQVtdXT48L0Rlc2NyaXB0aW9uMj4KCTwvT2JqZWN0Pgo8L0xXTTJNPgo=', + ) + preview: Optional[str] = None + name: Optional[str] = None + public: Optional[bool] = None + link: Optional[str] = None + publicLink: Optional[str] = None + + +class TbResourceInfo(BaseModel): + id: Optional[TbResourceId] = Field( + None, + description='JSON object with the Resource Id. Specify this field to update the Resource. Referencing non-existing Resource Id will cause error. Omit this field to create new Resource.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the resource creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Tenant Id of the resource can't be changed.", + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Customer Id of the resource can't be changed.", + ) + title: Optional[str] = Field( + None, description='Resource title.', example='BinaryAppDataContainer id=19 v1.0' + ) + resourceType: Optional[ResourceType] = Field( + None, description='Resource type.', example='LWM2M_MODEL' + ) + resourceSubType: Optional[ResourceSubType] = Field( + None, description='Resource sub type.', example='IOT_SVG' + ) + resourceKey: Optional[str] = Field( + None, description='Resource key.', example='19_1.0' + ) + publicResourceKey: Optional[str] = None + etag: Optional[str] = Field( + None, + description='Resource etag.', + example='33a64df551425fcc55e4d42a148795d9f25f89d4', + ) + fileName: Optional[str] = Field( + None, description='Resource file name.', example='19.xml' + ) + descriptor: Optional[JsonNode] = None + name: Optional[str] = None + public: Optional[bool] = None + link: Optional[str] = None + publicLink: Optional[str] = None + + +class Tenant(BaseModel): + id: Optional[TenantId] = Field( + None, + description='JSON object with the tenant Id. Specify this field to update the tenant. Referencing non-existing tenant Id will cause error. Omit this field to create new tenant.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the tenant creation, in milliseconds', + example=1609459200000, + ) + country: Optional[str] = Field(None, description='Country', example='US') + state: Optional[str] = Field(None, description='State', example='NY') + city: Optional[str] = Field(None, description='City', example='New York') + address: Optional[str] = Field(None, description='Address Line 1', example=42) + address2: Optional[str] = Field(None, description='Address Line 2') + zip: Optional[str] = Field(None, description='Zip code', example=10004) + phone: Optional[str] = Field( + None, description='Phone number', example='+1(415)777-7777' + ) + email: Optional[str] = Field( + None, description='Email', example='example@company.com' + ) + title: str = Field(..., description='Title of the tenant', example='Company A') + region: Optional[str] = Field( + None, description='Geo region of the tenant', example='North America' + ) + tenantProfileId: Optional[TenantProfileId] = Field( + None, description='JSON object with Tenant Profile Id' + ) + version: Optional[int] = None + active: Optional[bool] = None + lastInactiveTs: Optional[int] = None + currentPeriodStartTs: Optional[int] = None + name: Optional[str] = Field( + None, + description='Name of the tenant. Read-only, duplicated from title for backward compatibility', + example='Company A', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + + +class TenantAdministratorsFilter(UsersFilter): + tenantsIds: Optional[List[UUID]] = Field(None, Set=True) + tenantProfilesIds: Optional[List[UUID]] = Field(None, Set=True) + + +class TenantInfo(BaseModel): + id: Optional[TenantId] = Field( + None, + description='JSON object with the tenant Id. Specify this field to update the tenant. Referencing non-existing tenant Id will cause error. Omit this field to create new tenant.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the tenant creation, in milliseconds', + example=1609459200000, + ) + country: Optional[str] = Field(None, description='Country', example='US') + state: Optional[str] = Field(None, description='State', example='NY') + city: Optional[str] = Field(None, description='City', example='New York') + address: Optional[str] = Field(None, description='Address Line 1', example=42) + address2: Optional[str] = Field(None, description='Address Line 2') + zip: Optional[str] = Field(None, description='Zip code', example=10004) + phone: Optional[str] = Field( + None, description='Phone number', example='+1(415)777-7777' + ) + email: Optional[str] = Field( + None, description='Email', example='example@company.com' + ) + title: str = Field(..., description='Title of the tenant', example='Company A') + region: Optional[str] = Field( + None, description='Geo region of the tenant', example='North America' + ) + tenantProfileId: Optional[TenantProfileId] = Field( + None, description='JSON object with Tenant Profile Id' + ) + version: Optional[int] = None + active: Optional[bool] = None + lastInactiveTs: Optional[int] = None + currentPeriodStartTs: Optional[int] = None + tenantProfileName: Optional[str] = Field( + None, description='Tenant Profile name', example='Default' + ) + name: Optional[str] = Field( + None, + description='Name of the tenant. Read-only, duplicated from title for backward compatibility', + example='Company A', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + + +class TenantProfileData(BaseModel): + configuration: Optional[DefaultTenantProfileConfiguration] = Field( + None, + description='Complex JSON object that contains profile settings: max devices, max assets, rate limits, etc.', + ) + queueConfiguration: Optional[List[TenantProfileQueueConfiguration]] = Field( + None, description='JSON array of queue configuration per tenant profile' + ) + + +class TestSmsRequest(BaseModel): + providerConfiguration: Optional[ + Union[ + AwsSnsSmsProviderConfiguration, + SmppSmsProviderConfiguration, + TwilioSmsProviderConfiguration, + ] + ] = Field(None, description='The SMS provider configuration') + numberTo: Optional[str] = Field( + None, + description='The phone number or other identifier to specify as a recipient of the SMS.', + ) + message: Optional[str] = Field(None, description='The test message') + + +class TotpTwoFaAccountConfig(TwoFaAccountConfig): + authUrl: constr(pattern=r'otpauth://totp/(\S+?):(\S+?)\?issuer=(\S+?)&secret=(\w+?)') + + +class TotpTwoFaProviderConfig(TwoFaProviderConfig): + issuerName: str + + +class User(BaseModel): + id: Optional[UserId] = Field( + None, + description='JSON object with the User Id. Specify this field to update the device. Referencing non-existing User Id will cause error. Omit this field to create new customer.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the user creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with the Tenant Id.' + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with the Customer Id.' + ) + email: str = Field(..., description='Email of the user', example='user@example.com') + authority: Authority = Field( + ..., description='Authority', example='SYS_ADMIN, TENANT_ADMIN or CUSTOMER_USER' + ) + firstName: Optional[str] = Field( + None, description='First name of the user', example='John' + ) + lastName: Optional[str] = Field( + None, description='Last name of the user', example='Doe' + ) + phone: Optional[str] = Field( + None, description='Phone number of the user', example=38012345123 + ) + customMenuId: Optional[CustomMenuId] = None + version: Optional[int] = None + name: Optional[str] = Field( + None, + description='Duplicates the email of the user, readonly', + example='user@example.com', + ) + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the user' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + + +class UserEmailInfo(BaseModel): + id: Optional[UserId] = Field(None, description='User id') + email: Optional[str] = Field( + None, description='User email', example='john@gmail.com' + ) + firstName: Optional[str] = Field( + None, description='User first name', example='John' + ) + lastName: Optional[str] = Field(None, description='User last name', example='Brown') + + +class UserGroupListFilter(UsersFilter): + groupsIds: List[UUID] + + +class UserListFilter(UsersFilter): + usersIds: List[UUID] + + +class UserMobileInfo(BaseModel): + user: Optional[User] = None + storeInfo: Optional[StoreInfo] = None + versionInfo: Optional[MobileAppVersionInfo] = None + homeDashboardInfo: Optional[HomeDashboardInfo] = None + pages: Optional[JsonNode] = None + + +class UserRoleFilter(UsersFilter): + rolesIds: List[UUID] + + +class WebSelfRegistrationParams(SelfRegistrationParams): + enabled: Optional[bool] = Field( + None, description='Indicates if self-registration is allowed via sign-up form' + ) + title: str = Field(..., description='The text message to appear on login form') + captcha: CaptchaParams = Field( + ..., description="Captcha site key for 'I'm not a robot' validation" + ) + signUpFields: List[SignUpField] = Field( + ..., description='List of sign-up form fields' + ) + showPrivacyPolicy: Optional[bool] = Field( + None, description="Show or hide 'Privacy Policy'" + ) + showTermsOfUse: Optional[bool] = Field( + None, description="Show or hide 'Terms of Use'" + ) + notificationRecipient: Optional[NotificationTargetId] = Field( + None, + description='Recipient to use for notifications when new user self-registered.', + ) + customerTitlePrefix: Optional[str] = Field( + None, description='Prefix to add to created customer' + ) + customerGroupId: Optional[EntityGroupId] = Field( + None, description='Id of the customer group customer wil be added to.' + ) + permissions: List[GroupPermission] = Field( + ..., description='Group Permissions to assign for the new customer user.' + ) + defaultDashboard: Optional[DefaultDashboardParams] = Field( + None, description='Default dashboard params' + ) + homeDashboard: Optional[HomeDashboardParams] = Field( + None, description='Home dashboard params' + ) + customMenuId: Optional[CustomMenuId] = Field(None, description='Custom menu id') + privacyPolicy: Optional[str] = Field( + None, description='Privacy policy text. Supports HTML.' + ) + termsOfUse: Optional[str] = Field( + None, description='Terms of User text. Supports HTML.' + ) + domainId: DomainId = Field( + ..., + description='Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page.', + ) + + +class WidgetType(BaseModel): + id: Optional[WidgetTypeId] = Field( + None, + description='JSON object with the Widget Type Id. Specify this field to update the Widget Type. Referencing non-existing Widget Type Id will cause error. Omit this field to create new Widget Type.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the Widget Type creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + fqn: Optional[str] = Field( + None, + description='Unique FQN that is used in dashboards as a reference widget type', + ) + name: Optional[str] = Field(None, description='Widget name used in search and UI') + deprecated: Optional[bool] = Field( + None, description='Whether widget type is deprecated.', example=True + ) + scada: Optional[bool] = Field( + None, description='Whether widget type is SCADA symbol.', example=True + ) + version: Optional[int] = None + descriptor: Optional[JsonNode] = None + + +class WidgetTypeDetails(BaseModel): + fqn: Optional[str] = Field( + None, + description='Unique FQN that is used in dashboards as a reference widget type', + ) + name: Optional[str] = Field(None, description='Widget name used in search and UI') + deprecated: Optional[bool] = Field( + None, description='Whether widget type is deprecated.', example=True + ) + image: Optional[str] = Field( + None, + description="Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled.", + ) + description: Optional[str] = Field(None, description='Description of the widget') + descriptor: Optional[JsonNode] = None + resources: Optional[List[ResourceExportData]] = None + id: Optional[WidgetTypeId] = Field( + None, + description='JSON object with the Widget Type Id. Specify this field to update the Widget Type. Referencing non-existing Widget Type Id will cause error. Omit this field to create new Widget Type.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the Widget Type creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + scada: Optional[bool] = Field( + None, description='Whether widget type is SCADA symbol.', example=True + ) + version: Optional[int] = None + tags: Optional[List[str]] = Field(None, description='Tags of the widget type') + + +class WidgetsBundle(BaseModel): + id: Optional[WidgetsBundleId] = Field( + None, + description='JSON object with the Widget Bundle Id. Specify this field to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause error. Omit this field to create new Widget Bundle.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the Widget Bundle creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id.' + ) + alias: Optional[str] = Field( + None, + description='Unique alias that is used in widget types as a reference widget bundle', + ) + title: Optional[str] = Field(None, description='Title used in search and UI') + image: Optional[str] = Field( + None, + description="Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled.", + ) + scada: Optional[bool] = Field( + None, description='Whether widgets bundle contains SCADA symbol widget types.' + ) + description: Optional[str] = Field(None, description='Description') + order: Optional[int] = Field(None, description='Order') + version: Optional[int] = None + name: Optional[str] = Field( + None, + description="Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle.", + ) + + +class AccountTwoFaSettings(BaseModel): + configs: Optional[ + Dict[ + str, + Union[ + BackupCodeTwoFaAccountConfig, + EmailTwoFaAccountConfig, + SmsTwoFaAccountConfig, + TotpTwoFaAccountConfig, + ], + ] + ] = None + + +class AlarmConditionFilter(BaseModel): + key: Optional[AlarmConditionFilterKey] = Field( + None, description='JSON object for specifying alarm condition by specific key' + ) + valueType: Optional[ValueType] = Field( + None, + description='String representation of the type of the value', + example='NUMERIC', + ) + value: Optional[Any] = Field( + None, + description='Value used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is used', + ) + predicate: Optional[ + Union[ + BooleanFilterPredicate, + ComplexFilterPredicate, + NumericFilterPredicate, + StringFilterPredicate, + ] + ] = Field(None, description='JSON object representing filter condition') + + +class AlarmCountQuery(BaseModel): + startTs: Optional[int] = None + endTs: Optional[int] = None + timeWindow: Optional[int] = None + typeList: Optional[List[str]] = None + statusList: Optional[List[StatusListEnum]] = None + severityList: Optional[List[SeverityListEnum]] = None + searchPropagatedAlarms: Optional[bool] = None + assigneeId: Optional[UserId] = None + entityFilter: Optional[ + Union[ + ApiUsageStateFilter, + AssetSearchQueryFilter, + AssetTypeFilter, + DeviceSearchQueryFilter, + DeviceTypeFilter, + EdgeSearchQueryFilter, + EdgeTypeFilter, + EntitiesByGroupNameFilter, + EntityGroupFilter, + EntityGroupListFilter, + EntityGroupNameFilter, + EntityListFilter, + EntityNameFilter, + EntityTypeFilter, + EntityViewSearchQueryFilter, + EntityViewTypeFilter, + RelationsQueryFilter, + SchedulerEventFilter, + SingleEntityFilter, + StateEntityOwnerFilter, + ] + ] = None + keyFilters: Optional[List[KeyFilter]] = None + + +class AlarmDataPageLink(BaseModel): + startTs: Optional[int] = None + endTs: Optional[int] = None + timeWindow: Optional[int] = None + typeList: Optional[List[str]] = None + statusList: Optional[List[StatusListEnum]] = None + severityList: Optional[List[SeverityListEnum]] = None + searchPropagatedAlarms: Optional[bool] = None + assigneeId: Optional[UserId] = None + pageSize: Optional[int] = None + page: Optional[int] = None + textSearch: Optional[str] = None + sortOrder: Optional[EntityDataSortOrder] = None + dynamic: Optional[bool] = None + + +class AlarmDataQuery(BaseModel): + entityFilter: Optional[ + Union[ + ApiUsageStateFilter, + AssetSearchQueryFilter, + AssetTypeFilter, + DeviceSearchQueryFilter, + DeviceTypeFilter, + EdgeSearchQueryFilter, + EdgeTypeFilter, + EntitiesByGroupNameFilter, + EntityGroupFilter, + EntityGroupListFilter, + EntityGroupNameFilter, + EntityListFilter, + EntityNameFilter, + EntityTypeFilter, + EntityViewSearchQueryFilter, + EntityViewTypeFilter, + RelationsQueryFilter, + SchedulerEventFilter, + SingleEntityFilter, + StateEntityOwnerFilter, + ] + ] = None + keyFilters: Optional[List[KeyFilter]] = None + pageLink: Optional[AlarmDataPageLink] = None + entityFields: Optional[List[EntityKey]] = None + latestValues: Optional[List[EntityKey]] = None + alarmFields: Optional[List[EntityKey]] = None + + +class CalculatedField(BaseModel): + id: Optional[CalculatedFieldId] = Field( + None, + description='JSON object with the Calculated Field Id. Referencing non-existing Calculated Field Id will cause error.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the calculated field creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = None + entityId: Optional[EntityId] = None + type: Optional[Type4] = None + name: Optional[str] = Field( + None, description='User defined name of the calculated field.' + ) + debugMode: Optional[bool] = None + debugSettings: Optional[DebugSettings] = Field( + None, description='Debug settings object.' + ) + configurationVersion: Optional[int] = Field( + None, description='Version of calculated field configuration.', example=0 + ) + configuration: Optional[ + Union[ScriptCalculatedFieldConfiguration, SimpleCalculatedFieldConfiguration] + ] = None + version: Optional[int] = None + + +class CustomMenuConfig(BaseModel): + items: List[Union[CustomMenuItem, DefaultMenuItem, HomeMenuItem]] = Field( + ..., description='List of custom menu items' + ) + + +class Device(BaseModel): + id: Optional[DeviceId] = Field( + None, + description='JSON object with the Device Id. Specify this field to update the Device. Referencing non-existing Device Id will cause error. Omit this field to create new Device.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the device creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, + description="JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + ) + customerId: Optional[CustomerId] = Field( + None, + description="JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", + ) + name: Optional[str] = Field( + None, + description='Unique Device Name in scope of Tenant', + example='A4B72CCDFF33', + ) + type: Optional[str] = Field( + None, description='Device Profile Name', example='Temperature Sensor' + ) + label: Optional[str] = Field( + None, description='Label that may be used in widgets', example='Room 234 Sensor' + ) + deviceProfileId: DeviceProfileId = Field( + ..., description='JSON object with Device Profile Id.' + ) + firmwareId: Optional[OtaPackageId] = Field( + None, description='JSON object with Ota Package Id.' + ) + softwareId: Optional[OtaPackageId] = Field( + None, description='JSON object with Ota Package Id.' + ) + version: Optional[int] = None + additionalInfo: Optional[JsonNode] = Field( + None, description='Additional parameters of the device' + ) + ownerId: Optional[EntityId] = Field( + None, description='JSON object with Customer or Tenant Id' + ) + deviceData: Optional[DeviceData] = Field( + None, + description='JSON object with content specific to type of transport in the device profile.', + ) + + +class EntityCountQuery(BaseModel): + entityFilter: Optional[ + Union[ + ApiUsageStateFilter, + AssetSearchQueryFilter, + AssetTypeFilter, + DeviceSearchQueryFilter, + DeviceTypeFilter, + EdgeSearchQueryFilter, + EdgeTypeFilter, + EntitiesByGroupNameFilter, + EntityGroupFilter, + EntityGroupListFilter, + EntityGroupNameFilter, + EntityListFilter, + EntityNameFilter, + EntityTypeFilter, + EntityViewSearchQueryFilter, + EntityViewTypeFilter, + RelationsQueryFilter, + SchedulerEventFilter, + SingleEntityFilter, + StateEntityOwnerFilter, + ] + ] = None + keyFilters: Optional[List[KeyFilter]] = None + + +class EntityDataPageLink(BaseModel): + pageSize: Optional[int] = None + page: Optional[int] = None + textSearch: Optional[str] = None + sortOrder: Optional[EntityDataSortOrder] = None + dynamic: Optional[bool] = None + + +class EntityDataQuery(BaseModel): + entityFilter: Optional[ + Union[ + ApiUsageStateFilter, + AssetSearchQueryFilter, + AssetTypeFilter, + DeviceSearchQueryFilter, + DeviceTypeFilter, + EdgeSearchQueryFilter, + EdgeTypeFilter, + EntitiesByGroupNameFilter, + EntityGroupFilter, + EntityGroupListFilter, + EntityGroupNameFilter, + EntityListFilter, + EntityNameFilter, + EntityTypeFilter, + EntityViewSearchQueryFilter, + EntityViewTypeFilter, + RelationsQueryFilter, + SchedulerEventFilter, + SingleEntityFilter, + StateEntityOwnerFilter, + ] + ] = None + keyFilters: Optional[List[KeyFilter]] = None + pageLink: Optional[EntityDataPageLink] = None + entityFields: Optional[List[EntityKey]] = None + latestValues: Optional[List[EntityKey]] = None + + +class EntityExportDataObject(BaseModel): + entityType: Optional[EntityType13] = None + entity: Optional[Any] = None + relations: Optional[List[EntityRelation]] = None + attributes: Optional[Dict[str, List[AttributeExportData]]] = None + calculatedFields: Optional[List[CalculatedField]] = None + + +class EntityGroupExportData(EntityExportDataObject): + entity: Optional[EntityGroup] = None + permissions: Optional[List[GroupPermission]] = None + groupEntities: Optional[bool] = None + + +class GroupEntityExportData(EntityExportDataObject): + entity: Optional[ExportableEntityEntityId] = None + + +class GroupPermissionInfo(BaseModel): + id: Optional[GroupPermissionId] = Field( + None, + description='JSON object with the Group Permission Id. Specify this field to update the Group Permission. Referencing non-existing Group Permission Id will cause error. Omit this field to create new Group Permission.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the group permission creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with the Tenant Id.' + ) + userGroupId: Optional[EntityGroupId] = Field( + None, + description='JSON object with the User Group Id. Represent user group that will have permissions to perform operations against corresponding Entity Group.', + ) + roleId: Optional[RoleId] = Field( + None, description='JSON object with the Role Id. Represent set of permissions.' + ) + entityGroupId: Optional[EntityGroupId] = Field( + None, + description='JSON object with the Entity Group Id. Represent entity (device, asset, etc.) group.', + ) + entityGroupType: Optional[EntityGroupType] = Field( + None, + description='Type of the entities in the group: DEVICE, ASSET, CUSTOMER, etc.', + ) + role: Optional[Role] = Field(None, description='Represent set of permissions.') + entityGroupName: Optional[str] = Field(None, description='Entity Group Name.') + entityGroupOwnerId: Optional[EntityId] = Field( + None, description='Entity Group Owner Id (Tenant or Customer).' + ) + entityGroupOwnerName: Optional[str] = Field( + None, description='Name of the entity group owner (Tenant or Customer title).' + ) + userGroupName: Optional[str] = Field(None, description='User Group Name.') + userGroupOwnerId: Optional[EntityId] = Field( + None, description='User Group Owner Id (Tenant or Customer).' + ) + userGroupOwnerName: Optional[str] = Field( + None, description='Name of the user group owner (Tenant or Customer title).' + ) + readOnly: Optional[bool] = None + name: Optional[str] = Field( + None, description='Name of the Group Permissions. Auto-generated' + ) + public: Optional[bool] = None + + +class LoginMobileInfo(BaseModel): + oAuth2ClientLoginInfos: Optional[List[OAuth2ClientLoginInfo]] = None + selfRegistrationParams: Optional[SignUpSelfRegistrationParams] = None + storeInfo: Optional[StoreInfo] = None + versionInfo: Optional[MobileAppVersionInfo] = None + + +class MobileSelfRegistrationParams(SelfRegistrationParams): + enabled: Optional[bool] = Field( + None, description='Indicates if self-registration is allowed via sign-up form' + ) + title: str = Field(..., description='The text message to appear on login form') + captcha: CaptchaParams = Field( + ..., description="Captcha site key for 'I'm not a robot' validation" + ) + signUpFields: List[SignUpField] = Field( + ..., description='List of sign-up form fields' + ) + showPrivacyPolicy: Optional[bool] = Field( + None, description="Show or hide 'Privacy Policy'" + ) + showTermsOfUse: Optional[bool] = Field( + None, description="Show or hide 'Terms of Use'" + ) + notificationRecipient: Optional[NotificationTargetId] = Field( + None, + description='Recipient to use for notifications when new user self-registered.', + ) + customerTitlePrefix: Optional[str] = Field( + None, description='Prefix to add to created customer' + ) + customerGroupId: Optional[EntityGroupId] = Field( + None, description='Id of the customer group customer wil be added to.' + ) + permissions: List[GroupPermission] = Field( + ..., description='Group Permissions to assign for the new customer user.' + ) + defaultDashboard: Optional[DefaultDashboardParams] = Field( + None, description='Default dashboard params' + ) + homeDashboard: Optional[HomeDashboardParams] = Field( + None, description='Home dashboard params' + ) + customMenuId: Optional[CustomMenuId] = Field(None, description='Custom menu id') + privacyPolicy: Optional[str] = Field( + None, description='Privacy policy text. Supports HTML.' + ) + termsOfUse: Optional[str] = Field( + None, description='Terms of User text. Supports HTML.' + ) + redirect: MobileRedirectParams = Field(..., description='Mobile redirect params.') + + +class NotificationTarget(BaseModel): + id: Optional[NotificationTargetId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + name: str + configuration: Union[ + MicrosoftTeamsNotificationTargetConfig, + PlatformUsersNotificationTargetConfig, + SlackNotificationTargetConfig, + ] + + +class NotificationTemplate(BaseModel): + id: Optional[NotificationTemplateId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + name: str + notificationType: NotificationType + configuration: NotificationTemplateConfig + + +class PageDataCalculatedField(BaseModel): + data: Optional[List[CalculatedField]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataDevice(BaseModel): + data: Optional[List[Device]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataNotificationTarget(BaseModel): + data: Optional[List[NotificationTarget]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataNotificationTemplate(BaseModel): + data: Optional[List[NotificationTemplate]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataQueue(BaseModel): + data: Optional[List[Queue]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataQueueStats(BaseModel): + data: Optional[List[QueueStats]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataRole(BaseModel): + data: Optional[List[Role]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataRuleChain(BaseModel): + data: Optional[List[RuleChain]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataSchedulerEventInfo(BaseModel): + data: Optional[List[SchedulerEventInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataTbResourceInfo(BaseModel): + data: Optional[List[TbResourceInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataTenant(BaseModel): + data: Optional[List[Tenant]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataTenantInfo(BaseModel): + data: Optional[List[TenantInfo]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataUser(BaseModel): + data: Optional[List[User]] = Field(None, description='Array of the entities') + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataUserEmailInfo(BaseModel): + data: Optional[List[UserEmailInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataWidgetsBundle(BaseModel): + data: Optional[List[WidgetsBundle]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PlatformTwoFaSettings(BaseModel): + useSystemTwoFactorAuthSettings: Optional[bool] = None + providers: List[ + Union[ + BackupCodeTwoFaProviderConfig, + EmailTwoFaProviderConfig, + SmsTwoFaProviderConfig, + TotpTwoFaProviderConfig, + ] + ] + minVerificationCodeSendPeriod: conint(ge=5) + verificationCodeCheckRateLimit: Optional[constr(pattern=r'[1-9]\d*:[1-9]\d*')] = None + maxVerificationFailuresBeforeUserLockout: Optional[conint(ge=0)] = None + totalAllowedTimeForVerification: conint(ge=60) + + +class RuleChainMetaData(BaseModel): + ruleChainId: RuleChainId = Field(..., description='JSON object with Rule Chain Id.') + version: Optional[int] = Field( + None, description='Version of the Rule Chain' + ) + firstNodeIndex: int = Field( + ..., description="Index of the first rule node in the 'nodes' list" + ) + 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', + ) + ruleChainConnections: List[RuleChainConnectionInfo] = Field( + ..., + description='List of JSON objects that represent connections between rule nodes and other rule chains.', + ) + + +class SaveDeviceWithCredentialsRequest(BaseModel): + device: Device = Field(..., description='The JSON with device entity.') + credentials: DeviceCredentials = Field( + ..., description='The JSON with credentials entity.' + ) + + +class TenantProfile(BaseModel): + id: Optional[TenantProfileId] = Field( + None, + description='JSON object with the tenant profile Id. Specify this field to update the tenant profile. Referencing non-existing tenant profile Id will cause error. Omit this field to create new tenant profile.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the tenant profile creation, in milliseconds', + example=1609459200000, + ) + name: Optional[str] = Field( + None, description='Name of the tenant profile', example='High Priority Tenants' + ) + description: Optional[str] = Field( + None, description='Description of the tenant profile', example='Any text' + ) + isolatedTbRuleEngine: Optional[bool] = Field( + None, + description='If enabled, will push all messages related to this tenant and processed by the rule engine into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants', + example=False, + ) + profileData: Optional[TenantProfileData] = None + default: Optional[bool] = Field( + None, description='Default Tenant profile to be used.', example=False + ) + + +class WidgetTypeExportData(EntityExportDataObject): + entity: Optional[WidgetTypeDetails] = None + + +class WidgetsBundleExportData(EntityExportDataObject): + entity: Optional[WidgetsBundle] = None + widgets: Optional[List[Dict[str, Any]]] = None + fqns: Optional[List[str]] = None + + +class AlarmCondition(BaseModel): + condition: Optional[List[AlarmConditionFilter]] = Field( + None, description='JSON array of alarm condition filters' + ) + spec: Optional[ + Union[ + DurationAlarmConditionSpec, + RepeatingAlarmConditionSpec, + SimpleAlarmConditionSpec, + ] + ] = Field(None, description='JSON object representing alarm condition type') + + +class AlarmRule(BaseModel): + condition: Optional[AlarmCondition] = Field( + None, description='JSON object representing the alarm rule condition' + ) + schedule: Optional[ + Union[AnyTimeSchedule, CustomTimeSchedule, SpecificTimeSchedule] + ] = Field( + None, + description='JSON object representing time interval during which the rule is active', + ) + alarmDetails: Optional[str] = Field( + None, + description='String value representing the additional details for an alarm rule', + ) + dashboardId: Optional[DashboardId] = Field( + None, + description='JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application', + ) + + +class CustomMenu(BaseModel): + id: Optional[CustomMenuId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id that owns the menu.' + ) + customerId: Optional[CustomerId] = Field( + None, description='JSON object with Customer Id that owns the menu.' + ) + name: str = Field( + ..., description='Custom menu name', example='Customer A custom menu' + ) + scope: Scope1 = Field( + ..., + description='Custom menu scope. Possible values: SYSTEM, TENANT, CUSTOMER', + example='TENANT', + ) + assigneeType: AssigneeType = Field( + ..., + description='Custom menu assignee type. Possible values are: All (all users of specified scope), CUSTOMERS (specified customers), USERS (specified list of users), NO_ASSIGN (no assignees)', + example='ALL', + ) + config: Optional[CustomMenuConfig] = Field( + None, description='Custom menu configuration' + ) + + +class DeviceExportData(EntityExportDataObject): + entity: Optional[Device] = None + credentials: Optional[DeviceCredentials] = None + + +class DeviceProfileAlarm(BaseModel): + id: Optional[str] = Field( + None, + description='String value representing the alarm rule id', + example='highTemperatureAlarmID', + ) + alarmType: Optional[str] = Field( + None, + description='String value representing type of the alarm', + example='High Temperature Alarm', + ) + createRules: Optional[Dict[str, AlarmRule]] = Field( + 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', + ) + clearRule: Optional[AlarmRule] = Field( + None, description='JSON object representing clear alarm rule' + ) + propagate: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to parent entities of alarm originator', + example=True, + ) + propagateToOwner: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator', + example=True, + ) + propagateToOwnerHierarchy: Optional[bool] = Field( + 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', + example=True, + ) + propagateToTenant: Optional[bool] = Field( + None, + description='Propagation flag to specify if alarm should be propagated to the tenant entity', + example=True, + ) + propagateRelationTypes: Optional[List[str]] = Field( + 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.", + ) + + +class DeviceProfileData(BaseModel): + configuration: Optional[DefaultDeviceProfileConfiguration] = Field( + None, description='JSON object of device profile configuration' + ) + transportConfiguration: Optional[ + Union[ + CoapDeviceProfileTransportConfiguration, + DefaultDeviceProfileTransportConfiguration, + Lwm2mDeviceProfileTransportConfiguration, + MqttDeviceProfileTransportConfiguration, + SnmpDeviceProfileTransportConfiguration, + ] + ] = Field(None, description='JSON object of device profile transport configuration') + provisionConfiguration: Optional[ + Union[ + AllowCreateNewDevicesDeviceProfileProvisionConfiguration, + CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration, + DisabledDeviceProfileProvisionConfiguration, + X509CertificateChainProvisionConfiguration, + ] + ] = Field( + None, description='JSON object of provisioning strategy type per device profile' + ) + alarms: Optional[List[DeviceProfileAlarm]] = Field( + None, description='JSON array of alarm rules configuration per device profile' + ) + + +class MobileAppBundle(BaseModel): + id: Optional[MobileAppBundleId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + title: str = Field(..., description='Application bundle title. Cannot be empty') + description: Optional[str] = Field( + None, description='Application bundle description.' + ) + androidAppId: Optional[MobileAppId] = Field( + None, description='Android application id' + ) + iosAppId: Optional[MobileAppId] = Field(None, description='IOS application id') + layoutConfig: Optional[MobileLayoutConfig] = Field( + None, description='Application layout configuration' + ) + selfRegistrationParams: Optional[MobileSelfRegistrationParams] = Field( + None, description='Application self registration configuration' + ) + oauth2Enabled: Optional[bool] = Field( + None, description='Whether OAuth2 settings are enabled or not' + ) + name: Optional[str] = Field( + None, description='Mobile app bundle title', example='My main application' + ) + + +class MobileAppBundleInfo(BaseModel): + id: Optional[MobileAppBundleId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = Field(None, description='JSON object with Tenant Id') + title: str = Field(..., description='Application bundle title. Cannot be empty') + description: Optional[str] = Field( + None, description='Application bundle description.' + ) + androidAppId: Optional[MobileAppId] = Field( + None, description='Android application id' + ) + iosAppId: Optional[MobileAppId] = Field(None, description='IOS application id') + layoutConfig: Optional[MobileLayoutConfig] = Field( + None, description='Application layout configuration' + ) + selfRegistrationParams: Optional[MobileSelfRegistrationParams] = Field( + None, description='Application self registration configuration' + ) + oauth2Enabled: Optional[bool] = Field( + None, description='Whether OAuth2 settings are enabled or not' + ) + androidPkgName: Optional[str] = Field(None, description='Android package name') + iosPkgName: Optional[str] = Field(None, description='IOS package name') + oauth2ClientInfos: Optional[List[OAuth2ClientInfo]] = Field( + None, description='List of available oauth2 clients' + ) + qrCodeEnabled: Optional[bool] = Field( + None, description='Indicates if qr code is available for bundle' + ) + name: Optional[str] = Field( + None, description='Mobile app bundle title', example='My main application' + ) + + +class NotificationRequest(BaseModel): + tenantId: Optional[TenantId] = None + targets: List[UUID] + templateId: Optional[NotificationTemplateId] = None + template: Optional[NotificationTemplate] = None + info: Optional[NotificationInfo] = None + additionalConfig: Optional[NotificationRequestConfig] = None + originatorEntityId: Optional[EntityId] = None + ruleId: Optional[NotificationRuleId] = None + status: Optional[Status7] = None + stats: Optional[NotificationRequestStats] = None + id: Optional[NotificationRequestId] = None + createdTime: Optional[int] = None + + +class NotificationRequestInfo(BaseModel): + id: Optional[NotificationRequestId] = None + createdTime: Optional[int] = None + tenantId: Optional[TenantId] = None + targets: List[UUID] + templateId: Optional[NotificationTemplateId] = None + template: Optional[NotificationTemplate] = None + info: Optional[NotificationInfo] = None + additionalConfig: Optional[NotificationRequestConfig] = None + originatorEntityId: Optional[EntityId] = None + ruleId: Optional[NotificationRuleId] = None + status: Optional[Status7] = None + stats: Optional[NotificationRequestStats] = None + templateName: Optional[str] = None + deliveryMethods: Optional[List[DeliveryMethod]] = None + + +class PageDataMobileAppBundleInfo(BaseModel): + data: Optional[List[MobileAppBundleInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataNotificationRequestInfo(BaseModel): + data: Optional[List[NotificationRequestInfo]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class PageDataTenantProfile(BaseModel): + data: Optional[List[TenantProfile]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +class RuleChainData(BaseModel): + ruleChains: List[RuleChain] = Field( + ..., description='List of the Rule Chain objects.' + ) + metadata: List[RuleChainMetaData] = Field( + ..., description='List of the Rule Chain metadata objects.' + ) + + +class RuleChainExportData(EntityExportDataObject): + entity: Optional[RuleChain] = None + metaData: Optional[RuleChainMetaData] = None + + +class DeviceProfile(BaseModel): + id: Optional[DeviceProfileId] = Field( + None, + description='JSON object with the device profile Id. Specify this field to update the device profile. Referencing non-existing device profile Id will cause error. Omit this field to create new device profile.', + ) + createdTime: Optional[int] = Field( + None, + description='Timestamp of the profile creation, in milliseconds', + example=1609459200000, + ) + tenantId: Optional[TenantId] = Field( + None, description='JSON object with Tenant Id that owns the profile.' + ) + name: Optional[str] = Field( + None, + description='Unique Device Profile Name in scope of Tenant.', + example='Moisture Sensor', + ) + description: Optional[str] = Field(None, description='Device Profile description. ') + image: Optional[str] = Field( + 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. ', + ) + type: Optional[Type8] = Field( + None, + description="Type of the profile. Always 'DEFAULT' for now. Reserved for future use.", + ) + transportType: Optional[TransportType] = Field( + None, + description='Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.', + ) + provisionType: Optional[ProvisionType] = Field( + None, description='Provisioning strategy.' + ) + defaultRuleChainId: Optional[RuleChainId] = Field( + None, + description='Reference to the rule chain. If present, the specified rule chain will be used to process all messages related to device, including telemetry, attribute updates, etc. Otherwise, the root rule chain will be used to process those messages.', + ) + defaultDashboardId: Optional[DashboardId] = Field( + None, + description='Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details.', + ) + defaultQueueName: Optional[str] = Field( + None, + description="Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to device, including telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages.", + ) + provisionDeviceKey: Optional[str] = Field( + None, + description="Unique provisioning key used by 'Device Provisioning' feature.", + ) + firmwareId: Optional[OtaPackageId] = Field( + None, + description='Reference to the firmware OTA package. If present, the specified package will be used as default device firmware. ', + ) + softwareId: Optional[OtaPackageId] = Field( + None, + description='Reference to the software OTA package. If present, the specified package will be used as default device software. ', + ) + defaultEdgeRuleChainId: Optional[RuleChainId] = Field( + None, + description='Reference to the edge rule chain. If present, the specified edge rule chain will be used on the edge to process all messages related to device, including telemetry, attribute updates, etc. Otherwise, the edge root rule chain will be used to process those messages.', + ) + version: Optional[int] = None + default: Optional[bool] = Field( + None, + description='Used to mark the default profile. Default profile is used when the device profile is not specified during device creation.', + ) + profileData: Optional[DeviceProfileData] = Field( + None, + description='Complex JSON object that includes addition device profile configuration (transport, alarm rules, etc).', + ) + + +class EntityDataDiff(BaseModel): + currentVersion: Optional[ + Union[ + EntityExportDataObject, + DeviceExportData, + EntityGroupExportData, + GroupEntityExportData, + RuleChainExportData, + WidgetTypeExportData, + WidgetsBundleExportData, + ] + ] = None + otherVersion: Optional[ + Union[ + EntityExportDataObject, + DeviceExportData, + EntityGroupExportData, + GroupEntityExportData, + RuleChainExportData, + WidgetTypeExportData, + WidgetsBundleExportData, + ] + ] = None + + +class PageDataDeviceProfile(BaseModel): + data: Optional[List[DeviceProfile]] = Field( + None, description='Array of the entities' + ) + totalPages: Optional[int] = Field( + None, + description="Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria", + ) + totalElements: Optional[int] = Field( + None, description='Total number of elements in all available pages' + ) + hasNext: Optional[bool] = Field( + None, description="'false' value indicates the end of the result set" + ) + + +CustomMenuItem.update_forward_refs() +DefaultMenuItem.update_forward_refs() diff --git a/LLM Integration/thingsboard.py b/LLM Integration/thingsboard.py new file mode 100644 index 0000000..a26a937 --- /dev/null +++ b/LLM Integration/thingsboard.py @@ -0,0 +1,113 @@ +from model import * +from fastapi import FastAPI, HTTPException, Body +from fastapi.middleware.cors import CORSMiddleware +from typing import Literal +import requests, json +from datetime import datetime as dt +from datetime import timedelta as td +app = FastAPI( + title="Thingsboard API", + version="1.0.0", + description="Provides secure access to Thingsboard API", +) + + +origins = ["*"] + +app.add_middleware( + CORSMiddleware, + allow_origins=origins, + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +def getJWT(): + response = requests.post(url_base + 'auth/login', headers=headers,data=credentials) + token = response.json() + headers["X-Authorization"] = "Bearer " + token['token'] + +@app.get("/customers", response_model=List[Customer]) +def getCustomers(page: int = 0, pageSize: int = 10): + """ + Returns a list of customers from Thingsboard API. + """ + response = requests.get( + url_base + f"customers?page={page}&pageSize={pageSize}", headers=headers) + #print(json.dumps(response.json(), indent=4)) + customers = [] + customers = response.json()['data'] + while(response.json()["hasNext"]): + page += 1 + response = requests.get(url_base + f"customers?page={page}&pageSize={pageSize}", headers=headers) + customers += response.json()['data'] + #print(customers) + return customers + +@app.get("/customerNames", response_model=List[str]) +def getCustomerNames(page=0, pageSize=10): + """ + Returns a list of customer names from Thingsboard API. + """ + customers = getCustomers(page=0, pageSize=10) + names = [] + for c in customers: + names.append(c['name']) + #print(names) + return names + + +@app.get("/telemetry", response_model=dict) +def getTelemetry(startTs, endTs, keys, eType, deviceId): + """ + Returns a list of telemetry data from Thingsboard API. + parameters: + startTs: Timestamp of the start time for the data in milliseconds. + endTs: Timestamp of the end time for the data in milliseconds. + keys: List of attribute keys to retrieve (e.g., temperature,humidity,etc.). + eType: Type of entity (e.g., 'ASSET', 'DEVICE'). + deviceId: ID of the device as a UUID + """ + if(not keys): + keys = ["temperature", "humidity"] + if(not startTs): + #set startTs to time from 1 hour ago and put it in timestamp format with milliseconds + startTs = dt.timestamp(dt.now() - td(hours=1)) * 1000 + if(not endTs): + #set endTs to time from now and put it in timestamp format with milliseconds + endTs = dt.timestamp(dt.now()) * 1000 + telemetry = requests.get( + url_base + f"plugins/telemetry/{eType}/{deviceId}/values/timeseries?startTs={startTs}&endTs={endTs}&keys={keys}", headers=headers) + print(telemetry.json()) + return telemetry.json() + +@app.get("/deviceIdByName", response_model=dict) +def getDeviceByName(textSearch: str, deviceType: str = None, sortProperty: str = None, sortOrder: str = "ASC",page: int = 0, pageSize: int = 10): + """ + Returns a dictionary with the device ID (as a UUID) of a device with a given name in the textSearch param + parameters: + deviceType: optional parameter to specify the device type for search + textSearch: the string or substring of the name of the device being searched for + sortProperty: optional parameter to specify the property to sort by can be one of the following [createdTime, name, deviceProfileName, label, customerTitle] + sortOrder: optional parameter to specify is ascending or descending order [ASC, DESC] + page: the page of results to acquire default is set to 0 to get the first page + pageSize: the number of results per page + """ + response = requests.get(url_base + f"user/devices?page={page}&pageSize={pageSize}&textSearch={textSearch}", headers=headers) + #print(response.url) + #print(response.request) + #print(json.dumps(response.json(),indent=4)) + devices = response.json()["data"] + device = {textSearch: devices[0]["id"]["id"]} + return device +headers = {"Content-Type": "application/json", + "Accept": "application/json"} +username = "nmelone@henry-pump.com" +password = "gzU6$26v42mU%3jDzTJf" +domain = "thingsboard.cloud" +credentials = json.dumps( + {"username": f"{username}", "password": f"{password}"}) +url_base = f"https://{domain}/api/" +getJWT() +#print(headers) diff --git a/LLM Integration/thingsboardAPI.json b/LLM Integration/thingsboardAPI.json new file mode 100644 index 0000000..134bf4f --- /dev/null +++ b/LLM Integration/thingsboardAPI.json @@ -0,0 +1,129301 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "ThingsBoard REST API", + "description": " ThingsBoard Professional Edition IoT platform REST API documentation.", + "contact": { + "name": "ThingsBoard, Inc.", + "url": "https://thingsboard.io", + "email": "info@thingsboard.io" + }, + "license": { + "name": "Apache License Version 2.0", + "url": "https://github.com/thingsboard/thingsboard/blob/master/LICENSE" + }, + "version": "4.0.1.4PAAS" + }, + "servers": [ + { + "url": "https://thingsboard.cloud", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "admin-controller", + "description": "Admin Controller" + }, + { + "name": "alarm-comment-controller", + "description": "Alarm Comment Controller" + }, + { + "name": "alarm-controller", + "description": "Alarm Controller" + }, + { + "name": "asset-controller", + "description": "Asset Controller" + }, + { + "name": "asset-profile-controller", + "description": "Asset Profile Controller" + }, + { + "name": "audit-log-controller", + "description": "Audit Log Controller" + }, + { + "name": "auth-controller", + "description": "Auth Controller" + }, + { + "name": "billing-endpoint-controller", + "description": "Billing Endpoint Controller" + }, + { + "name": "blob-entity-controller", + "description": "Blob Entity Controller" + }, + { + "name": "calculated-field-controller", + "description": "Calculated Field Controller" + }, + { + "name": "cloud-endpoint-controller", + "description": "Cloud Endpoint Controller" + }, + { + "name": "component-descriptor-controller", + "description": "Component Descriptor Controller" + }, + { + "name": "converter-controller", + "description": "Converter Controller" + }, + { + "name": "converter-library-controller", + "description": "Converter Library Controller" + }, + { + "name": "custom-menu-controller", + "description": "Custom Menu Controller" + }, + { + "name": "custom-translation-controller", + "description": "Custom Translation Controller" + }, + { + "name": "customer-controller", + "description": "Customer Controller" + }, + { + "name": "dashboard-controller", + "description": "Dashboard Controller" + }, + { + "name": "device-connectivity-controller", + "description": "Device Connectivity Controller" + }, + { + "name": "device-controller", + "description": "Device Controller" + }, + { + "name": "device-group-ota-package-controller", + "description": "Device Group Ota Package Controller" + }, + { + "name": "device-profile-controller", + "description": "Device Profile Controller" + }, + { + "name": "domain-controller", + "description": "Domain Controller" + }, + { + "name": "edge-controller", + "description": "Edge Controller" + }, + { + "name": "edge-event-controller", + "description": "Edge Event Controller" + }, + { + "name": "entities-version-control-controller", + "description": "Entities Version Control Controller" + }, + { + "name": "entity-group-controller", + "description": "Entity Group Controller" + }, + { + "name": "entity-query-controller", + "description": "Entity Query Controller" + }, + { + "name": "entity-relation-controller", + "description": "Entity Relation Controller" + }, + { + "name": "entity-view-controller", + "description": "Entity View Controller" + }, + { + "name": "event-controller", + "description": "Event Controller" + }, + { + "name": "group-permission-controller", + "description": "Group Permission Controller" + }, + { + "name": "image-controller", + "description": "Image Controller" + }, + { + "name": "integration-controller", + "description": "Integration Controller" + }, + { + "name": "login-endpoint", + "description": "Login Endpoint" + }, + { + "name": "lwm-2m-controller", + "description": "Lwm 2m Controller" + }, + { + "name": "mail-config-template-controller", + "description": "Mail Config Template Controller" + }, + { + "name": "mobile-app-bundle-controller", + "description": "Mobile App Bundle Controller" + }, + { + "name": "mobile-app-controller", + "description": "Mobile App Controller" + }, + { + "name": "notification-controller", + "description": "Notification Controller" + }, + { + "name": "notification-rule-controller", + "description": "Notification Rule Controller" + }, + { + "name": "notification-target-controller", + "description": "Notification Target Controller" + }, + { + "name": "notification-template-controller", + "description": "Notification Template Controller" + }, + { + "name": "o-auth-2-config-template-controller", + "description": "O Auth 2 Config Template Controller" + }, + { + "name": "o-auth-2-controller", + "description": "O Auth 2 Controller" + }, + { + "name": "ota-package-controller", + "description": "Ota Package Controller" + }, + { + "name": "owner-controller", + "description": "Owner Controller" + }, + { + "name": "qr-code-settings-controller", + "description": "Qr Code Settings Controller" + }, + { + "name": "queue-controller", + "description": "Queue Controller" + }, + { + "name": "queue-stats-controller", + "description": "Queue Stats Controller" + }, + { + "name": "report-controller", + "description": "Report Controller" + }, + { + "name": "role-controller", + "description": "Role Controller" + }, + { + "name": "rpc-v-1-controller", + "description": "Rpc V 1 Controller" + }, + { + "name": "rpc-v-2-controller", + "description": "Rpc V 2 Controller" + }, + { + "name": "rule-chain-controller", + "description": "Rule Chain Controller" + }, + { + "name": "rule-engine-controller", + "description": "Rule Engine Controller" + }, + { + "name": "scheduler-event-controller", + "description": "Scheduler Event Controller" + }, + { + "name": "self-registration-controller", + "description": "Self Registration Controller" + }, + { + "name": "sign-up-controller", + "description": "Sign Up Controller" + }, + { + "name": "solution-controller", + "description": "Solution Controller" + }, + { + "name": "subscription-controller", + "description": "Subscription Controller" + }, + { + "name": "tb-resource-controller", + "description": "Tb Resource Controller" + }, + { + "name": "telemetry-controller", + "description": "Telemetry Controller" + }, + { + "name": "tenant-controller", + "description": "Tenant Controller" + }, + { + "name": "tenant-profile-controller", + "description": "Tenant Profile Controller" + }, + { + "name": "translation-controller", + "description": "Translation Controller" + }, + { + "name": "trendz-controller", + "description": "Trendz Controller" + }, + { + "name": "two-factor-auth-config-controller", + "description": "Two Factor Auth Config Controller" + }, + { + "name": "two-factor-auth-controller", + "description": "Two Factor Auth Controller" + }, + { + "name": "ui-settings-controller", + "description": "Ui Settings Controller" + }, + { + "name": "usage-info-controller", + "description": "Usage Info Controller" + }, + { + "name": "user-controller", + "description": "User Controller" + }, + { + "name": "user-permissions-controller", + "description": "User Permissions Controller" + }, + { + "name": "white-labeling-controller", + "description": "White Labeling Controller" + }, + { + "name": "widget-type-controller", + "description": "Widget Type Controller" + }, + { + "name": "widgets-bundle-controller", + "description": "Widgets Bundle Controller" + } + ], + "paths": { + "/api/admin/autoCommitSettings": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get auto commit settings (getAutoCommitSettings)", + "description": "Get the auto commit settings object. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAutoCommitSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoCommitSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Creates or Updates the auto commit settings (saveAutoCommitSettings)", + "description": "Creates or Updates the auto commit settings object. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveAutoCommitSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoCommitSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AutoCommitSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "admin-controller" + ], + "summary": "Delete auto commit settings (deleteAutoCommitSettings)", + "description": "Deletes the auto commit settings.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteAutoCommitSettings", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/autoCommitSettings/exists": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Check auto commit settings exists (autoCommitSettingsExists)", + "description": "Check whether the auto commit settings exists. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "autoCommitSettingsExists", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/featuresInfo": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get features info (getFeaturesInfo)", + "description": "Get information about enabled/disabled features. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getFeaturesInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeaturesInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/jwtSettings": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get the JWT Settings object (getJwtSettings)", + "description": "Get the JWT Settings object that contains JWT token policy, etc. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getJwtSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Update JWT Settings (saveJwtSettings)", + "description": "Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string.\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveJwtSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/licenseUsageInfo": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get license usage info (getLicenseUsageInfo)", + "description": "Get license usage info. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getLicenseUsageInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LicenseUsageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/mail/oauth2/authorize": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Redirect user to mail provider login page. ", + "description": "After user logged in and provided accessprovider sends authorization code to specified redirect uri.)", + "operationId": "getAuthorizationUrl", + "responses": { + "200": { + "description": "OK", + "content": { + "application/text": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/mail/oauth2/code{?code,state}": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "codeProcessingUrl", + "operationId": "codeProcessingUrl", + "parameters": [ + { + "name": "code", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/mail/oauth2/loginProcessingUrl": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get OAuth2 log in processing URL (getMailProcessingUrl)", + "description": "Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider and user consent for requested scope, it makes a redirect to this path so that the platform can do further log in processing and generating access tokens. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getMailProcessingUrl", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/repositorySettings": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get repository settings (getRepositorySettings)", + "description": "Get the repository settings object. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRepositorySettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositorySettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Creates or Updates the repository settings (saveRepositorySettings)", + "description": "Creates or Updates the repository settings object. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRepositorySettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositorySettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositorySettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "admin-controller" + ], + "summary": "Delete repository settings (deleteRepositorySettings)", + "description": "Deletes the repository settings.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRepositorySettings", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/repositorySettings/checkAccess": { + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Check repository access (checkRepositoryAccess)", + "description": "Attempts to check repository access. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "checkRepositoryAccess", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositorySettings" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/repositorySettings/exists": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Check repository settings exists (repositorySettingsExists)", + "description": "Check whether the repository settings exists. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "repositorySettingsExists", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/repositorySettings/info": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "getRepositorySettingsInfo", + "operationId": "getRepositorySettingsInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepositorySettingsInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/securitySettings": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get the Security Settings object (getSecuritySettings)", + "description": "Get the Security Settings object that contains password policy, etc.\n\nAvailable for users with 'SYS_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource.", + "operationId": "getSecuritySettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecuritySettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Update Security Settings (saveSecuritySettings)", + "description": "Updates the Security Settings object that contains password policy, etc.\n\nAvailable for users with 'SYS_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource.", + "operationId": "saveSecuritySettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecuritySettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SecuritySettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/settings": { + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Creates or Updates the Administration Settings (saveAdminSettings)", + "description": "Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource.", + "operationId": "saveAdminSettings", + "requestBody": { + "description": "A JSON value representing the Administration Settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/settings/testMail": { + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Send test email (sendTestMail)", + "description": "Attempts to send test email using Mail Settings provided as a parameter. Email is sent to the address specified in the profile of user who is performing the requestYou may change the 'To' email in the user profile of the System/Tenant Administrator. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource.", + "operationId": "sendTestMail", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminSettings" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/settings/testSms": { + "post": { + "tags": [ + "admin-controller" + ], + "summary": "Send test sms (sendTestSms)", + "description": "Attempts to send test sms to the System Administrator User using SMS Settings and phone number provided as a parameters of the request. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource.", + "operationId": "sendTestSms", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TestSmsRequest" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/settings/{key}{?systemByDefault}": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get the Administration Settings object using key (getAdminSettings)", + "description": "Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource.", + "operationId": "getAdminSettings", + "parameters": [ + { + "name": "key", + "in": "path", + "description": "A string value of the key (e.g. 'general' or 'mail').", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "systemByDefault", + "in": "query", + "description": "Use system settings if settings are not defined on tenant level.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AdminSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/systemInfo": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Get system info (getSystemInfo)", + "description": "Get main information about system. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getSystemInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SystemInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/admin/updates": { + "get": { + "tags": [ + "admin-controller" + ], + "summary": "Check for new Platform Releases (checkUpdates)", + "description": "Check notifications about new platform releases. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "checkUpdates", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMessage" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{alarmId}/comment": { + "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" + } + } + ], + "requestBody": { + "description": "A JSON value representing the comment.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmComment" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmComment" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{alarmId}/comment/{commentId}": { + "delete": { + "tags": [ + "alarm-comment-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" + } + }, + { + "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" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{alarmId}/comment{?pageSize,page,sortProperty,sortOrder}": { + "get": { + "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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAlarmComments", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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": { + "enum": [ + "createdTime", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAlarmCommentInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm": { + "post": { + "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" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/highestSeverity/{entityType}/{entityId}{?searchStatus,status,assigneeId}": { + "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", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": { + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "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", + "content": { + "application/json": { + "schema": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/info/{alarmId}": { + "get": { + "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", + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/types{?pageSize,page,textSearch,sortOrder}": { + "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": { + "enum": [ + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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", + "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": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{alarmId}/ack": { + "post": { + "tags": [ + "alarm-controller" + ], + "summary": "Acknowledge Alarm (ackAlarm)", + "description": "Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "ackAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AlarmInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{alarmId}/assign": { + "delete": { + "tags": [ + "alarm-controller" + ], + "summary": "Unassign Alarm (unassignAlarm)", + "description": "Unassign the Alarm. Once unassigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_UNASSIGNED' will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "unassignAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{alarmId}/assign/{assigneeId}": { + "post": { + "tags": [ + "alarm-controller" + ], + "summary": "Assign/Reassign Alarm (assignAlarm)", + "description": "Assign the Alarm. Once assigned, the 'assign_ts' field will be set to current timestamp and special rule chain event 'ALARM_ASSIGNED' (or ALARM_REASSIGNED in case of assigning already assigned alarm) will be generated. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "assignAlarm", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "assigneeId", + "in": "path", + "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Alarm" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarm/{entityType}/{entityId}{?searchStatus,status,assigneeId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,fetchOriginator}": { + "get": { + "tags": [ + "alarm-controller" + ], + "summary": "Get Alarms (getAlarms)", + "description": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAlarms", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": { + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "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", + "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": { + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAlarmInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/alarms{?searchStatus,status,assigneeId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,fetchOriginator}": { + "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 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": "getAllAlarms", + "parameters": [ + { + "name": "searchStatus", + "in": "query", + "description": "A string value representing one of the AlarmSearchStatus enumeration value", + "required": false, + "schema": { + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + { + "name": "status", + "in": "query", + "description": "A string value representing one of the AlarmStatus enumeration value", + "required": false, + "schema": { + "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", + "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": { + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAlarmInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/v2/alarm/{entityType}/{entityId}{?statusList,severityList,typeList,assigneeId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}": { + "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 the 'Model' tab of the Response Class 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": { + "default": "DEVICE" + } + }, + { + "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": { + "items": { + "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": { + "items": { + "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": { + "items": {} + } + }, + { + "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": { + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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/PageDataAlarmInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/v2/alarms{?statusList,severityList,typeList,assigneeId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}": { + "get": { + "tags": [ + "alarm-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 the 'Model' tab of the Response Class 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": { + "items": { + "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": { + "items": { + "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": { + "items": {} + } + }, + { + "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": { + "enum": [ + "createdTime", + "startTs", + "endTs", + "type", + "ackTs", + "clearTs", + "severity", + "status" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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/PageDataAlarmInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/asset/bulk_import": { + "post": { + "tags": [ + "asset-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" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportResultAsset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/asset/info/{assetId}": { + "get": { + "tags": [ + "asset-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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/asset/types": { + "get": { + "tags": [ + "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": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/asset/{assetId}": { + "get": { + "tags": [ + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Asset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "asset-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", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetInfos/all{?pageSize,page,includeCustomers,assetProfileId,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "asset-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 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": "getAllAssetInfos", + "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": "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAssetInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assets": { + "post": { + "tags": [ + "asset-controller" + ], + "summary": "Find related assets (findByQuery)", + "description": "Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findByQuery_4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assets{?assetIds}": { + "get": { + "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", + "parameters": [ + { + "name": "assetIds", + "in": "query", + "description": "A list of asset ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Asset" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/asset{?entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "asset-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", + "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", + "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": { + "items": {} + } + } + ], + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/assetInfos{?pageSize,page,includeCustomers,assetProfileId,textSearch,sortProperty,sortOrder}": { + "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 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": "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", + "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": "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAssetInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/assets{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAsset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/assets{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAsset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/assets{?assetName}": { + "get": { + "tags": [ + "asset-controller" + ], + "summary": "Get Tenant Asset (getTenantAsset)", + "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": "getTenantAsset", + "parameters": [ + { + "name": "assetName", + "in": "query", + "description": "A string value representing the Asset name.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Asset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/assets{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAsset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/assets{?pageSize,page,type,assetProfileId,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAsset" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfile": { + "post": { + "tags": [ + "asset-profile-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" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfile/names{?activeOnly}": { + "get": { + "tags": [ + "asset-profile-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", + "parameters": [ + { + "name": "activeOnly", + "in": "query", + "description": "Flag indicating whether to retrieve exclusively the names of asset profiles that are referenced by tenant's assets.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfile/{assetProfileId}": { + "delete": { + "tags": [ + "asset-profile-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", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfile/{assetProfileId}/default": { + "post": { + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfile/{assetProfileId}{?inlineImages}": { + "get": { + "tags": [ + "asset-profile-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" + } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfileInfo/default": { + "get": { + "tags": [ + "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/AssetProfileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfileInfo/{assetProfileId}": { + "get": { + "tags": [ + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssetProfileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfileInfos{?assetProfileIds}": { + "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", + "parameters": [ + { + "name": "assetProfileIds", + "in": "query", + "description": "A list of asset profile ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetProfileInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfileInfos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAssetProfileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/assetProfiles{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataAssetProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/audit/logs/customer/{customerId}{?pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes}": { + "get": { + "tags": [ + "audit-log-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 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 audit logs.", + "operationId": "getAuditLogsByCustomerId", + "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": "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": { + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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/PageDataAuditLog" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/audit/logs/entity/{entityType}/{entityId}{?pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes}": { + "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 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 audit logs.", + "operationId": "getAuditLogsByEntityId", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": { + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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/PageDataAuditLog" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/audit/logs/user/{userId}{?pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes}": { + "get": { + "tags": [ + "audit-log-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 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 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" + } + }, + { + "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": { + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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/PageDataAuditLog" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/audit/logs{?pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime,actionTypes}": { + "get": { + "tags": [ + "audit-log-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 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 audit logs.", + "operationId": "getAuditLogs", + "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 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": { + "enum": [ + "createdTime", + "entityType", + "entityName", + "userName", + "actionType", + "actionStatus" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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/PageDataAuditLog" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/auth/changePassword": { + "post": { + "tags": [ + "auth-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" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/auth/logout": { + "post": { + "tags": [ + "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" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/activate{?activateToken}": { + "get": { + "tags": [ + "auth-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", + "parameters": [ + { + "name": "activateToken", + "in": "query", + "description": "The activate token string.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/activate{?sendActivationMail}": { + "post": { + "tags": [ + "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 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivateUserRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/resetPassword": { + "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", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResetPasswordRequest" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/resetPasswordByEmail": { + "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" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/resetPassword{?resetToken}": { + "get": { + "tags": [ + "auth-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", + "parameters": [ + { + "name": "resetToken", + "in": "query", + "description": "The reset token string.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/userPasswordPolicy": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserPasswordPolicy" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/sendActivation": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "sendActivationEmail_1", + "operationId": "sendActivationEmail_1", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/sendPasswordWasReset": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "sendPasswordWasResetEmail", + "operationId": "sendPasswordWasResetEmail", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/sendResetPassword": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "sendResetPasswordEmail", + "operationId": "sendResetPasswordEmail", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/tenant/permission/billing/hiddenPlans": { + "get": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "tenantHasHiddenPlansAccess", + "operationId": "tenantHasHiddenPlansAccess", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/tenant/permission/billing/read": { + "get": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "tenantHasBillingRead", + "operationId": "tenantHasBillingRead", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/tenant/permission/billing/write": { + "get": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "tenantHasBillingWrite", + "operationId": "tenantHasBillingWrite", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/tenantCanUpdatePlan": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "checkTenantCanUpdatePlan", + "operationId": "checkTenantCanUpdatePlan", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/tenantPlanChanged": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "notifyTenantPlanChanged", + "operationId": "notifyTenantPlanChanged", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/billingEndpoint/tenantStateChanged": { + "post": { + "tags": [ + "billing-endpoint-controller" + ], + "summary": "notifyTenantStateChanged", + "operationId": "notifyTenantStateChanged", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/blobEntities{?blobEntityIds}": { + "get": { + "tags": [ + "blob-entity-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": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/BlobEntityInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/blobEntities{?pageSize,page,type,textSearch,sortProperty,sortOrder,startTime,endTime}": { + "get": { + "tags": [ + "blob-entity-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 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": "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": { + "enum": [ + "createdTime", + "name", + "type", + "contentType", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataBlobEntityWithCustomerInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/blobEntity/info/{blobEntityId}": { + "get": { + "tags": [ + "blob-entity-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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlobEntityWithCustomerInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/blobEntity/{blobEntityId}": { + "delete": { + "tags": [ + "blob-entity-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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/blobEntity/{blobEntityId}/download": { + "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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/calculatedField": { + "post": { + "tags": [ + "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 calculated field.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CalculatedField" + } + } + }, + "required": true + }, + "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 request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/calculatedField/testScript": { + "post": { + "tags": [ + "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": "testScript_1", + "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/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/calculatedField/{calculatedFieldId}/debug": { + "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" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/{entityType}/{entityId}/calculatedFields{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": { + "enum": [ + "createdTime", + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCalculatedField" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/cloudEndpoint/permission/domain/read": { + "get": { + "tags": [ + "cloud-endpoint-controller" + ], + "summary": "hasDomainReadPermission", + "operationId": "hasDomainReadPermission", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/cloudEndpoint/permission/domain/write": { + "get": { + "tags": [ + "cloud-endpoint-controller" + ], + "summary": "hasDomainWritePermission", + "operationId": "hasDomainWritePermission", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/cloudEndpoint/tenant/permission/whiteLabel/read": { + "get": { + "tags": [ + "cloud-endpoint-controller" + ], + "summary": "tenantHasWhiteLabelRead", + "operationId": "tenantHasWhiteLabelRead", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/cloudEndpoint/tenant/permission/whiteLabelingAllowed": { + "get": { + "tags": [ + "cloud-endpoint-controller" + ], + "summary": "tenantWhiteLabelingAllowed_1", + "operationId": "tenantWhiteLabelingAllowed_1", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/component/{componentDescriptorClazz}": { + "get": { + "tags": [ + "component-descriptor-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", + "parameters": [ + { + "name": "componentDescriptorClazz", + "in": "path", + "description": "Component Descriptor class name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ComponentDescriptor" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/components/{componentType}{?ruleChainType}": { + "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": { + "enum": [ + "ENRICHMENT", + "FILTER", + "TRANSFORMATION", + "ACTION", + "EXTERNAL" + ] + } + }, + { + "name": "ruleChainType", + "in": "query", + "description": "Type of the Rule Chain", + "required": false, + "schema": { + "enum": [ + "CORE", + "EDGE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentDescriptor" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/components{?componentTypes,ruleChainType}": { + "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": { + "items": {} + } + }, + { + "name": "ruleChainType", + "in": "query", + "description": "Type of the Rule Chain", + "required": false, + "schema": { + "enum": [ + "CORE", + "EDGE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ComponentDescriptor" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter": { + "post": { + "tags": [ + "converter-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 + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Converter" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/testDownLink{?scriptLang}": { + "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": { + "type": "string", + "enum": [ + "JS", + "TBEL" + ] + } + } + ], + "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/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/testUpLink{?scriptLang}": { + "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": { + "type": "string", + "enum": [ + "JS", + "TBEL" + ] + } + } + ], + "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/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/unwrap/{integrationType}": { + "post": { + "tags": [ + "converter-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", + "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": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + } + ], + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/{converterId}": { + "get": { + "tags": [ + "converter-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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Converter" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "converter-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", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/{converterId}/debugIn{?converterType,integrationType,integrationName,converterVersion}": { + "get": { + "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" + } + }, + { + "name": "converterVersion", + "in": "query", + "description": "Converter version.", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converters{?converterIds}": { + "get": { + "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", + "parameters": [ + { + "name": "converterIds", + "in": "query", + "description": "A list of converter ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Converter" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converters{?isEdgeTemplate,pageSize,page,textSearch,sortProperty,sortOrder,integrationType}": { + "get": { + "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 the 'Model' tab of the Response Class 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": "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "type", + "debugMode" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataConverter" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/vendors{?converterType}": { + "get": { + "tags": [ + "converter-library-controller" + ], + "summary": "Get vendors (getVendors)", + "description": "Returns a list of vendors for the integration type", + "operationId": "getVendors", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "converterType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Vendor" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/models{?converterType}": { + "get": { + "tags": [ + "converter-library-controller" + ], + "summary": "Get vendor models (getVendorModels)", + "description": "Returns a list of models for the vendor, integration type and converter type", + "operationId": "getVendorModels", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "converterType", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Model" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink": { + "get": { + "tags": [ + "converter-library-controller" + ], + "summary": "Get downlink converter (getDownlinkConverter)", + "description": "Returns downlink converter body for the vendor, integration type and model", + "operationId": "getDownlinkConverter", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/metadata": { + "get": { + "tags": [ + "converter-library-controller" + ], + "summary": "Get downlink converter metadata (getDownlinkConverterMetadata)", + "description": "Returns downlink converter metadata for the vendor, integration type and model", + "operationId": "getDownlinkConverterMetadata", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/downlink/payload": { + "get": { + "tags": [ + "converter-library-controller" + ], + "summary": "Get downlink payload (getDownlinkPayload)", + "description": "Returns payload example for the downlink converter for the vendor, integration type and model", + "operationId": "getDownlinkPayload", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink": { + "get": { + "tags": [ + "converter-library-controller" + ], + "summary": "Get uplink converter (getUplinkConverter)", + "description": "Returns uplink converter body for the vendor, integration type and model", + "operationId": "getUplinkConverter", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/metadata": { + "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", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/converter/library/{integrationType}/{vendorName}/{model}/uplink/payload": { + "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", + "parameters": [ + { + "name": "integrationType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + } + }, + { + "name": "vendorName", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu": { + "get": { + "tags": [ + "custom-menu-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 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 is assigned to specific user, it overrides all other configuration.", + "operationId": "getCustomMenu", + "parameters": [ + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/infos{?scope,assigneeType,pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "custom-menu-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", + "parameters": [ + { + "name": "scope", + "in": "query", + "description": "Custom menu scope.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "SYSTEM", + "TENANT", + "CUSTOMER" + ] + } + }, + { + "name": "assigneeType", + "in": "query", + "description": "Custom menu assignee type.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "NO_ASSIGN", + "ALL", + "CUSTOMERS", + "USERS" + ] + } + }, + { + "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomMenuInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/{customMenuId}/assigneeList": { + "get": { + "tags": [ + "custom-menu-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", + "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", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/{customMenuId}/config": { + "get": { + "tags": [ + "custom-menu-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", + "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", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuConfig" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "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", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuConfig" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenu" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/{customMenuId}/info": { + "get": { + "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", + "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", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/{customMenuId}/name": { + "put": { + "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", + "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", + "format": "uuid" + } + } + ], + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/{customMenuId}{?force}": { + "delete": { + "tags": [ + "custom-menu-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", + "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", + "format": "uuid" + } + }, + { + "name": "force", + "in": "query", + "description": "Force set to true will unassign menu before deletion", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomMenuDeleteResult" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu/{id}/assign/{assigneeType}{?force}": { + "put": { + "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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "name": "assigneeType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "NO_ASSIGN", + "ALL", + "CUSTOMERS", + "USERS" + ] + } + }, + { + "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", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customMenu{?assignToList,force}": { + "post": { + "tags": [ + "custom-menu-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", + "parameters": [ + { + "name": "assignToList", + "in": "query", + "description": "A list of entity ids, separated by comma ','", + "required": false, + "schema": { + "items": {} + } + }, + { + "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/CustomMenu" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/custom/merged/{localeCode}": { + "get": { + "tags": [ + "custom-translation-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", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/custom/{localeCode}": { + "get": { + "tags": [ + "custom-translation-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", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "custom-translation-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", + "parameters": [ + { + "name": "localeCode", + "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" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "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", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "patch": { + "tags": [ + "custom-translation-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", + "parameters": [ + { + "name": "localeCode", + "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" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/custom/{localeCode}/upload": { + "post": { + "tags": [ + "custom-translation-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", + "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", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/custom/{localeCode}/{keyPath}": { + "delete": { + "tags": [ + "custom-translation-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", + "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, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/info/{customerId}": { + "get": { + "tags": [ + "customer-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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}": { + "get": { + "tags": [ + "customer-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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/customerInfos{?pageSize,page,includeCustomers,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "customer-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 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": "getCustomerCustomerInfos", + "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": "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": { + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomerInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/shortInfo": { + "get": { + "tags": [ + "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" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/title": { + "get": { + "tags": [ + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/text": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customerInfos/all{?pageSize,page,includeCustomers,textSearch,sortProperty,sortOrder}": { + "get": { + "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 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": "getAllCustomerInfos", + "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 customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomerInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customers{?customerIds}": { + "get": { + "tags": [ + "customer-controller" + ], + "summary": "Get customers by Customer Ids (getCustomersByEntityGroupId)", + "description": "Returns a list of Customer 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": "getCustomersByIds", + "parameters": [ + { + "name": "customerIds", + "in": "query", + "description": "A list of customer ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Customer" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customers{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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", + "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 customer title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomer" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer{?entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "customer-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", + "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", + "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": { + "items": {} + } + } + ], + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/customers{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "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 the 'Model' tab of the Response Class 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", + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomer" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/customers{?customerTitle}": { + "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", + "parameters": [ + { + "name": "customerTitle", + "in": "query", + "description": "A string value representing the Customer title.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/customers{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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": "getUserCustomers", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "title", + "email", + "country", + "city" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataCustomer" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/dashboard/home/info": { + "get": { + "tags": [ + "dashboard-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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "dashboard-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" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/dashboards{?pageSize,page,includeCustomers,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "dashboard-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 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": "getCustomerDashboards", + "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": "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboard/home": { + "get": { + "tags": [ + "dashboard-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", + "parameters": [ + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboard/home/info": { + "get": { + "tags": [ + "dashboard-controller" + ], + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboard/info/{dashboardId}": { + "get": { + "tags": [ + "dashboard-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", + "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" + } + } + ], + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "example": 5000 + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "example": 1636023857137 + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboard/{dashboardId}": { + "delete": { + "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", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboard/{dashboardId}{?includeResources}": { + "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", + "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" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboards/all{?pageSize,page,includeCustomers,textSearch,sortProperty,sortOrder}": { + "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 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": "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboards{?dashboardIds}": { + "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", + "in": "query", + "description": "A list of dashboard ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DashboardInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/dashboard{?entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "dashboard-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", + "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": { + "items": {} + } + }, + { + "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" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/dashboards/export{?limit}": { + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/dashboards/import{?overwrite}": { + "post": { + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/dashboards{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 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", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/dashboard/home/info": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HomeDashboardInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "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 + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/dashboards{?pageSize,page,mobile,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantDashboards_1", + "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/{tenantId}/dashboards{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "dashboard-controller" + ], + "summary": "Get Tenant Dashboards by System Administrator (getTenantDashboards)", + "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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantDashboards", + "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/dashboards{?pageSize,page,mobile,textSearch,sortProperty,sortOrder,operation,userId}": { + "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 the 'Model' tab of the Response Class 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": "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": { + "enum": [ + "createdTime", + "title" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device-connectivity/gateway-launch/{deviceId}/docker-compose/download": { + "get": { + "tags": [ + "device-connectivity-controller" + ], + "summary": "Download generated docker-compose.yml file for gateway (downloadGatewayDockerCompose)", + "description": "Download generated docker-compose.yml for gateway.", + "operationId": "downloadGatewayDockerCompose", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device-connectivity/{deviceId}": { + "get": { + "tags": [ + "device-connectivity-controller" + ], + "summary": "Get commands to publish device telemetry (getDevicePublishTelemetryCommands)", + "description": "Fetch the list of commands to publish device telemetry based on device profile If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDevicePublishTelemetryCommands", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "examples": { + "http": { + "description": "http", + "value": "curl -v -X POST http://localhost:8080/api/v1/0ySs4FTOn5WU15XLmal8/telemetry --header Content-Type:application/json --data {temperature:25}" + }, + "mqtt": { + "description": "mqtt", + "value": "mosquitto_pub -d -q 1 -h localhost -t v1/devices/me/telemetry -i myClient1 -u myUsername1 -P myPassword -m {temperature:25}" + }, + "coap": { + "description": "coap", + "value": "coap-client -m POST coap://localhost:5683/api/v1/0ySs4FTOn5WU15XLmal8/telemetry -t json -e {temperature:25}" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device-connectivity/{protocol}/certificate/download": { + "get": { + "tags": [ + "device-connectivity-controller" + ], + "summary": "Download server certificate using file path defined in device.connectivity properties (downloadServerCertificate)", + "description": "Download server certificate.", + "operationId": "downloadServerCertificate", + "parameters": [ + { + "name": "protocol", + "in": "path", + "description": "A string value representing the device connectivity protocol. Possible values: 'mqtt', 'mqtts', 'http', 'https', 'coap', 'coaps'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/device/{deviceName}/claim": { + "delete": { + "tags": [ + "device-controller" + ], + "summary": "Reclaim device (reClaimDevice)", + "description": "Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "reClaimDevice", + "parameters": [ + { + "name": "deviceName", + "in": "path", + "description": "Unique name of the device which is going to be reclaimed", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/device/{deviceName}/claim{?subCustomerId}": { + "post": { + "tags": [ + "device-controller" + ], + "summary": "Claim device (claimDevice)", + "description": "Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. \nIn order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. \nSee official documentation for more details regarding claiming.\n\nAvailable for users with 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'CLAIM_DEVICES' permission for the entity (entities).", + "operationId": "claimDevice", + "parameters": [ + { + "name": "deviceName", + "in": "path", + "description": "Unique name of the device which is going to be claimed", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "subCustomerId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ClaimRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/deviceInfos{?pageSize,page,includeCustomers,deviceProfileId,active,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Customer Device Infos (getCustomerDeviceInfos)", + "description": "Returns a page of device info objects owned by the specified customer. Device Info is an extension of the default Device object that contains information about the owner name. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See 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": "getCustomerDeviceInfos", + "parameters": [ + { + "name": "customerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeCustomers", + "in": "query", + "description": "Include customer or sub-customer entities", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "active", + "in": "query", + "description": "A boolean value representing the device active flag.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDeviceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/devices{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Customer Devices (getCustomerDevices)", + "description": "Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See 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": "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": { + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDevice" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device-with-credentials{?entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "device-controller" + ], + "summary": "Create Device (saveDevice) with credentials ", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Requires to provide the Device Credentials object as well as an existing device profile ID or use \"default\".\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"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_1", + "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": { + "items": {} + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveDeviceWithCredentialsRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device/bulk_import": { + "post": { + "tags": [ + "device-controller" + ], + "summary": "Import the bulk of devices (processDevicesBulkImport)", + "description": "There's an ability to import the bulk of devices using the only .csv file. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "processDevicesBulkImport", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkImportResultDevice" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device/credentials": { + "post": { + "tags": [ + "device-controller" + ], + "summary": "Update device credentials (updateDeviceCredentials)", + "description": "During device creation, platform generates random 'ACCESS_TOKEN' credentials.\nUse this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value.\nThen use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device.\nThe structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\nYou may find the example of device with different type of credentials below: \n\n- Credentials type: \"Access token\" with device ID and with device ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"c886a090-168d-11ee-87c9-6f157dbc816a\"\n },\n \"deviceId\": {\n \"id\":\"c5fb3ac0-168d-11ee-87c9-6f157dbc816a\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"ACCESS_TOKEN\",\n \"credentialsId\": \"6hmxew8pmmzng4e3une4\"\n}\n```\n\n- Credentials type: \"X509\" with device profile ID below: \n\nNote: credentialsId - format Sha3Hash, certificateValue - format PEM (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n```json\n{\n \"id\": {\n \"id\":\"309bd9c0-14f4-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"3092b200-14f4-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"X509_CERTIFICATE\",\n \"credentialsId\": \"6b8adb49015500e51a527acd332b51684ab9b49b4ade03a9582a44c455e2e9b6\",\n \"credentialsValue\": \"-----BEGIN CERTIFICATE----- MIICMTCCAdegAwIBAgIUUEKxS9hTz4l+oLUMF0LV6TC/gCIwCgYIKoZIzj0EAwIwbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MB4XDTIzMDMyOTE0NTczNloXDTI0MDMyODE0NTczNlowbjELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRowGAYDVQQKDBFUaGluZ3NCb2FyZCwgSW5jLjEwMC4GA1UEAwwnZGV2aWNlUHJvZmlsZUNlcnRAWDUwOVByb3Zpc2lvblN0cmF0ZWd5MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECMlWO72krDoUL9FQjUmSCetkhaEGJUfQkdSfkLSNa0GyAEIMbfmzI4zITeapunu4rGet3EMyLydQzuQanBicp6NTMFEwHQYDVR0OBBYEFHpZ78tPnztNii4Da/yCw6mhEIL3MB8GA1UdIwQYMBaAFHpZ78tPnztNii4Da/yCw6mhEIL3MA8GA1UdEwEB/wQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIgJ7qyMFqNcwSYkH6o+UlQXzLWfwZbNjVk+aR7foAZNGsCIQDsd7v3WQIGHiArfZeDs1DLEDuV/2h6L+ZNoGNhEKL+1A== -----END CERTIFICATE-----\"\n}\n```\n\n- Credentials type: \"MQTT_BASIC\" with device profile ID below: \n\n```json\n{\n \"id\": {\n \"id\":\"d877ffb0-14f5-11ee-9fc9-d9b7463abb63\"\n },\n \"deviceId\": {\n \"id\":\"d875dcd0-14f5-11ee-9fc9-d9b7463abb63\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"MQTT_BASIC\",\n \"credentialsValue\": \"{\\\"clientId\\\":\\\"juy03yv4owqxcmqhqtvk\\\",\\\"userName\\\":\\\"ov19fxca0cyjn7lm7w7u\\\",\\\"password\\\":\\\"twy94he114dfi9usyk1o\\\"}\"\n}\n```\n\n- You may find the example of LwM2M device and RPK credentials below: \n\nNote: LwM2M device - only existing device profile ID (Transport configuration -> Transport type: \"LWM2M\".\n\n```json\n{\n \"id\": {\n \"id\":\"e238d4d0-1689-11ee-98c6-1713c1be5a8e\"\n },\n \"deviceId\": {\n \"id\":\"e232e160-1689-11ee-98c6-1713c1be5a8e\",\n \"entityType\":\"DEVICE\"\n },\n \"credentialsType\": \"LWM2M_CREDENTIALS\",\n \"credentialsId\": \"LwRpk00000000\",\n \"credentialsValue\":\n \"{\\\"client\\\":{ \\\"endpoint\\\":\\\"LwRpk00000000\\\", \\\"securityConfigClientMode\\\":\\\"RPK\\\", \\\"key\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdvBZZ2vQRK9wgDhctj6B1c7bxR3Z0wYg1+YdoYFnVUKWb+rIfTTyYK9tmQJx5Vlb5fxdLnVv1RJOPiwsLIQbAA==\\\" }, \\\"bootstrap\\\":{ \\\"bootstrapServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}, \\\"lwm2mServer\\\":{ \\\"securityMode\\\":\\\"RPK\\\", \\\"clientPublicKeyOrId\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==\\\", \\\"clientSecretKey\\\":\\\"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V\\\"}} }\"\n}\n```\n\nUpdate to real value:\n - 'id' (this is id of Device Credentials -> \"Get Device Credentials (getDeviceCredentialsByDeviceId)\",\n - 'deviceId.id' (this is id of Device).\nRemove 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "updateDeviceCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device/info/{deviceId}": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Device (getDeviceInfoById)", + "description": "Fetch the Device info object based on the provided Device Id. Device Info is an extension of the default Device object that contains information about the owner name. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceInfoById", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device/types": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Device Types (getDeviceTypes)", + "description": "Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceTypes", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device/{deviceId}": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Get Device (getDeviceById)", + "description": "Fetch the Device object based on the provided Device Id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getDeviceById", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "device-controller" + ], + "summary": "Delete device (deleteDevice)", + "description": "Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteDevice", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceCredentials" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceInfos/all{?pageSize,page,includeCustomers,deviceProfileId,active,textSearch,sortProperty,sortOrder}": { + "get": { + "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 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": "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": { + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDeviceInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/devices": { + "post": { + "tags": [ + "device-controller" + ], + "summary": "Find related devices (findByQuery)", + "description": "Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "findByQuery_3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "deviceProfileId", + "in": "path", + "description": "Device Profile Id. I.g. '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/devices/count/{otaPackageType}/{otaPackageId}/{entityGroupId}": { + "get": { + "tags": [ + "device-controller" + ], + "summary": "Count devices by device profile (countByDeviceProfileAndEmptyOtaPackage)", + "description": "The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "countByDeviceGroupAndEmptyOtaPackage", + "parameters": [ + { + "name": "otaPackageType", + "in": "path", + "description": "OTA package type", + "required": true, + "schema": { + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "name": "otaPackageId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityGroupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/devices{?deviceIds}": { + "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", + "parameters": [ + { + "name": "deviceIds", + "in": "query", + "description": "A list of devices ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Device" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/device{?accessToken,entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "device-controller" + ], + "summary": "Create Or Update Device (saveDevice)", + "description": "Create or update the Device. When creating device, platform generates Device Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.\n\nDevice name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Device entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveDevice", + "parameters": [ + { + "name": "accessToken", + "in": "query", + "description": "Optional value of the device credentials to be used during device creation. If omitted, access token will be auto-generated.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "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": { + "items": {} + } + } + ], + "requestBody": { + "description": "A JSON value representing the device.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/devices{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the device name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDevice" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/devices{?deviceName}": { + "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": "getTenantDevice", + "parameters": [ + { + "name": "deviceName", + "in": "query", + "description": "A string value representing the Device name.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/devices{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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" + } + }, + { + "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": { + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDevice" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/{tenantId}/device/{deviceId}": { + "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", + "parameters": [ + { + "name": "tenantId", + "in": "path", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/devices{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 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": "getUserDevices", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "deviceProfileName", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDevice" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceGroupOtaPackage": { + "post": { + "tags": [ + "device-group-ota-package-controller" + ], + "summary": "saveDeviceGroupOtaPackage", + "operationId": "saveDeviceGroupOtaPackage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceGroupOtaPackage/{groupId}/{firmwareType}": { + "get": { + "tags": [ + "device-group-ota-package-controller" + ], + "summary": "getFirmwareById", + "operationId": "getFirmwareById", + "parameters": [ + { + "name": "groupId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "firmwareType", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceGroupOtaPackage" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceGroupOtaPackage/{id}": { + "delete": { + "tags": [ + "device-group-ota-package-controller" + ], + "summary": "deleteDeviceGroupOtaPackage", + "operationId": "deleteDeviceGroupOtaPackage", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfile": { + "post": { + "tags": [ + "device-profile-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" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfile/devices/keys/attributes{?deviceProfileId}": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get attribute keys (getAttributesKeys)", + "description": "Get a set of unique attribute keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getAttributesKeys", + "parameters": [ + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfile/devices/keys/timeseries{?deviceProfileId}": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get time series keys (getTimeseriesKeys)", + "description": "Get a set of unique time series keys used by devices that belong to specified profile. If profile is not set returns a list of unique keys among all profiles. The call is used for auto-complete in the UI forms. The implementation limits the number of devices that participate in search to 100 as a trade of between accurate results and time-consuming queries. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTimeseriesKeys_1", + "parameters": [ + { + "name": "deviceProfileId", + "in": "query", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfile/names{?activeOnly}": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get Device Profile names (getDeviceProfileNames)", + "description": "Returns a set of unique device profile names owned by the tenant.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileNames", + "parameters": [ + { + "name": "activeOnly", + "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": { + "type": "array", + "items": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfile/{deviceProfileId}": { + "delete": { + "tags": [ + "device-profile-controller" + ], + "summary": "Delete device profile (deleteDeviceProfile)", + "description": "Deletes the device profile. Referencing non-existing device profile Id will cause an error. Can't delete the device profile if it is referenced by existing devices.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteDeviceProfile", + "parameters": [ + { + "name": "deviceProfileId", + "in": "path", + "description": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": "A string value representing the device profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfile/{deviceProfileId}{?inlineImages}": { + "get": { + "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" + } + }, + { + "name": "inlineImages", + "in": "query", + "description": "Inline images as a data URL (Base64)", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfileInfo/default": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfileInfo/{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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfileInfos{?deviceProfileIds}": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get Device Profiles By Ids (getDeviceProfilesByIds)", + "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": "getDeviceProfilesByIds", + "parameters": [ + { + "name": "deviceProfileIds", + "in": "query", + "description": "A list of device profile ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfileInfos{?pageSize,page,textSearch,sortProperty,sortOrder,transportType}": { + "get": { + "tags": [ + "device-profile-controller" + ], + "summary": "Get Device Profiles for transport type (getDeviceProfileInfos)", + "description": "Returns a page of devices profile info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Device Profile Info is a lightweight object that includes main information about Device Profile excluding the heavyweight configuration object. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDeviceProfileInfos", + "parameters": [ + { + "name": "pageSize", + "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": { + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "transportType", + "in": "query", + "description": "Type of the transport", + "required": false, + "schema": { + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDeviceProfileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/deviceProfiles{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "transportType", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDeviceProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/domain/cloud/info/{id}": { + "get": { + "tags": [ + "domain-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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/domain/info/{id}": { + "get": { + "tags": [ + "domain-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", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/domain/infos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "domain-controller" + ], + "summary": "Get Domain infos (getDomainInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getDomainInfos", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "Case-insensitive 'substring' filter based on domain's name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataDomainInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/domain/{id}": { + "delete": { + "tags": [ + "domain-controller" + ], + "summary": "Delete Domain by ID (deleteDomain)", + "description": "Deletes Domain by ID. Referencing non-existing domain Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDomain", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/domain/{id}/oauth2Clients": { + "put": { + "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_1", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/domain{?oauth2ClientIds}": { + "post": { + "tags": [ + "domain-controller" + ], + "summary": "Save or Update Domain (saveDomain)", + "description": "Create or update the Domain. When creating domain, platform generates Domain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Domain Id will be present in the response. Specify existing Domain Id to update the domain. Referencing non-existing Domain Id will cause 'Not Found' error.\n\nDomain name is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDomain", + "parameters": [ + { + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client registration ids, separated by comma ','", + "required": false, + "schema": { + "items": {} + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Domain" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/edgeInfos{?pageSize,page,includeCustomers,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "edge-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 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": "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdgeInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/edges{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "edge-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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/bulk_import": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Import the bulk of edges (processEdgesBulkImport)", + "description": "There's an ability to import the bulk of edges using the only .csv file.\n\nAvailable for users with 'TENANT_ADMIN' 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": { + "$ref": "#/components/schemas/BulkImportResultEdge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/info/{edgeId}": { + "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", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/instructions/install/{edgeId}/{method}": { + "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", + "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": { + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "enum": [ + "docker", + "ubuntu", + "centos" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/missingToRelatedRuleChains/{edgeId}": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Find missing rule chains (findMissingToRelatedRuleChains)", + "description": "Returns list of rule chains ids that are not assigned to particular edge, but these rule chains are present in the already assigned rule chains to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findMissingToRelatedRuleChains", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/sync/{edgeId}": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Sync edge (syncEdge)", + "description": "Starts synchronization process between edge and cloud. \nAll entities that are assigned to particular edge are going to be send to remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "syncEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/types": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{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", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "edge-controller" + ], + "summary": "Delete edge (deleteEdge)", + "description": "Deletes the edge. Referencing non-existing edge Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/{ruleChainId}/root": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Set root rule chain for provided edge (setEdgeRootRuleChain)", + "description": "Change root rule chain of the edge to the new provided rule chain. \nThis operation will send a notification to update root rule chain on remote edge service.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeRootRuleChain", + "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", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edgeInfos/all{?pageSize,page,includeCustomers,type,textSearch,sortProperty,sortOrder}": { + "get": { + "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 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": "getAllEdgeInfos", + "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": "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdgeInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edges": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Find related edges (findByQuery)", + "description": "Returns all edges that are related to the specific entity. The entity id, relation type, edge types, depth of the search, and other query parameters defined using complex 'EdgeSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findByQuery_2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EdgeSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edges/enabled": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Is edges support enabled (isEdgesSupportEnabled)", + "description": "Returns 'true' if edges support enabled on server, 'false' - otherwise.", + "operationId": "isEdgesSupportEnabled", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edges{?edgeIds}": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Get Edges By Ids (getEdgesByIds)", + "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": "getEdgesByIds", + "parameters": [ + { + "name": "edgeIds", + "in": "query", + "description": "A list of edges ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Edge" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edges{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Get Tenant Edges (getEdges)", + "description": "Returns a page of edges owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge{?entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Create Or Update Edge (saveEdge)", + "description": "Create or update the Edge. When creating edge, platform generates Edge Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created edge id will be present in the response. Specify existing Edge id to update the edge. Referencing non-existing Edge Id will cause 'Not Found' error.\n\nEdge name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the edge names and non-unique 'label' field for user-friendly visualization purposes.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Edge entity. ", + "operationId": "saveEdge", + "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" + } + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/edges{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/license/activateInstance{?licenseSecret,releaseDate}": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Activate edge instance (activateInstance)", + "description": "Activates edge license on license portal.", + "operationId": "activateInstance", + "parameters": [ + { + "name": "licenseSecret", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "releaseDate", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/license/checkInstance": { + "post": { + "tags": [ + "edge-controller" + ], + "summary": "Check edge license (checkInstance)", + "description": "Checks license request from edge service by forwarding request to license portal.", + "operationId": "checkInstance", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/edges{?edgeName}": { + "get": { + "tags": [ + "edge-controller" + ], + "summary": "Get Tenant Edge (getTenantEdge)", + "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": "getTenantEdge", + "parameters": [ + { + "name": "edgeName", + "in": "query", + "description": "Unique name of the edge", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Edge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/edges{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/edges{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 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": "getUserEdges", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdge" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/events{?pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "type", + "label", + "customerTitle" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEdgeEvent" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/diff/{entityType}/{internalEntityUuid}{?versionId}": { + "get": { + "tags": [ + "entities-version-control-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", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + }, + { + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataDiff" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/entity": { + "post": { + "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": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntityTypeVersionLoadRequest" + }, + { + "$ref": "#/components/schemas/SingleEntityVersionLoadRequest" + } + ] + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/entity/{entityType}/{versionId}": { + "get": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "List entities at version (listEntitiesAtVersion)", + "description": "Returns a list of remote entities of a specific entity type that are available at a concrete version. \nEach entity item in the result has `externalId` property. Entities order will be the same as in the repository.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntitiesAtVersion", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + }, + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/entity/{requestId}/status": { + "get": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "Get version load request status (getVersionLoadRequestStatus)", + "description": "Returns the status of previously made version load request. The structure contains following parameters:\n- `done` - if the request was successfully processed;\n- `result` - a list of load results for each entity type:\n - `created` - created entities count;\n - `updated` - updated entities count;\n - `deleted` - removed entities count;\n - `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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionLoadResult" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/entity/{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", + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/info/{versionId}/{entityType}/{externalEntityUuid}{?internalEntityId}": { + "get": { + "tags": [ + "entities-version-control-controller" + ], + "summary": "Get entity data info (getEntityDataInfo)", + "description": "Retrieves short info about the remote entity by external id at a concrete version. \nReturned entity data info contains following properties: `hasRelations` (whether stored entity data contains relations), `hasAttributes` (contains attributes), `hasCredentials` (whether stored device data has credentials), `hasPermissions` (user group data contains group permission list) and `hasGroupEntities` (entity group data contains group entities).\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEntityDataInfo", + "parameters": [ + { + "name": "versionId", + "in": "path", + "description": "Version id, for example fd82625bdd7d6131cf8027b44ee967012ecaf990. Represents commit hash.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + }, + { + "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": { + "$ref": "#/components/schemas/EntityDataInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/version": { + "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": { + "oneOf": [ + { + "$ref": "#/components/schemas/ComplexVersionCreateRequest" + }, + { + "$ref": "#/components/schemas/SingleEntityVersionCreateRequest" + } + ] + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/version/{entityType}/{externalEntityUuid}{?branch,internalEntityId,pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class for more details. \n\nResponse example: \n```json\n{\n \"data\": [\n {\n \"timestamp\": 1655198593000,\n \"id\": \"fd82625bdd7d6131cf8027b44ee967012ecaf990\",\n \"name\": \"Devices and assets - v2.0\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198528000,\n \"id\": \"682adcffa9c8a2f863af6f00c4850323acbd4219\",\n \"name\": \"Update my device\",\n \"author\": \"John Doe \"\n },\n {\n \"timestamp\": 1655198280000,\n \"id\": \"d2a6087c2b30e18cc55e7cdda345a8d0dfb959a4\",\n \"name\": \"Devices and assets - v1.0\",\n \"author\": \"John Doe \"\n }\n ],\n \"totalPages\": 1,\n \"totalElements\": 3,\n \"hasNext\": false\n}\n```\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "listEntityVersions", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + }, + { + "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": { + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/version/{entityType}{?branch,pageSize,page,textSearch,sortProperty,sortOrder}": { + "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": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + }, + { + "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": { + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/version/{requestId}/status": { + "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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/VersionCreationResult" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entities/vc/version{?branch,pageSize,page,textSearch,sortProperty,sortOrder}": { + "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", + "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", + "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": { + "enum": [ + "timestamp" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityVersion" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/allEntityGroups/edge/{edgeId}/{groupType}": { + "get": { + "tags": [ + "entity-group-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", + "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": { + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/entityGroup/{entityGroupId}/{groupType}": { + "post": { + "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", + "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": { + "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/EntityGroup" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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", + "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": { + "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/EntityGroup" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup": { + "post": { + "tags": [ + "entity-group-controller" + ], + "summary": "Create Or Update Entity Group (saveEntityGroup)", + "description": "Create or update the Entity Group. When creating Entity Group, platform generates Entity Group Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Entity Group Id will be present in the response. Specify existing Entity Group Id to update the group. Referencing non-existing Entity Group Id will cause 'Not Found' error.Remove 'id', 'tenantId' and optionally 'ownerId' from the request body example (below) to create new Entity Group entity. \n\nEntity group name is unique in the scope of owner and entity type. For example, you can't create two tenant device groups called 'Water meters'. However, you may create device and asset group with the same name. And also you may create groups with the same name for two different customers of the same tenant. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "saveEntityGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityGroup" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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 request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/all/{ownerType}/{ownerId}/{groupType}": { + "get": { + "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": { + "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": { + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}": { + "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", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/addEntities": { + "post": { + "tags": [ + "entity-group-controller" + ], + "summary": "Add entities to the group (addEntitiesToEntityGroup)", + "description": "Add entities to the specified entity group. Entity group allows you to group multiple entities of the same entity type (Device, Asset, Customer, User, Dashboard, etc). Entity Group always have an owner - particular Tenant or Customer. Each entity may belong to multiple groups simultaneously.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'ADD_TO_GROUP' permission for specified group.", + "operationId": "addEntitiesToEntityGroup", + "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": { + "type": "array", + "description": "A list of entity ids", + "items": { + "type": "string" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/deleteEntities": { + "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" + } + } + ], + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/entities{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "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 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 specified group.", + "operationId": "getEntities", + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataShortEntityView" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/makePrivate": { + "post": { + "tags": [ + "entity-group-controller" + ], + "summary": "Make Entity Group Private (makeEntityGroupPrivate)", + "description": "Make the entity group not available for non authorized users. Every group is private by default. This call is useful to hide the group that was previously made public.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPrivate", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/makePublic": { + "post": { + "tags": [ + "entity-group-controller" + ], + "summary": "Make Entity Group Publicly available (makeEntityGroupPublic)", + "description": "Make the entity group available for non authorized users. Useful for public dashboards that will be embedded into the public websites. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "makeEntityGroupPublic", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/{entityId}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Group Entity (getGroupEntity)", + "description": "Fetch the Short Entity View object based on the group and entity id. Short Entity View object contains the entity id and number of fields (attributes, telemetry, etc). List of those fields is configurable and defined in the group configuration.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getGroupEntity", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShortEntityView" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/{userGroupId}/{roleId}/share": { + "post": { + "tags": [ + "entity-group-controller" + ], + "summary": "Share the Entity Group with User group (shareEntityGroupToChildOwnerUserGroup)", + "description": "Share the entity group with specified user group using specified role. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority. Security check is performed to verify that the user has 'WRITE' permission for specified group.", + "operationId": "shareEntityGroupToChildOwnerUserGroup", + "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'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{ownerType}/{ownerId}/{groupType}/{groupName}": { + "get": { + "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", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "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": { + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + } + }, + { + "name": "groupName", + "in": "path", + "description": "Entity Group name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupInfo/{entityGroupId}": { + "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", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupInfos/{groupType}/shared{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getSharedEntityGroupEntityInfosByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupInfos/{groupType}{?includeShared,pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getEntityGroupEntityInfosByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupInfos/{ownerType}/{ownerId}/{groupType}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getEntityGroupEntityInfosByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "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": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupInfosHierarchy/{ownerType}/{ownerId}/{groupType}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getEntityGroupEntityInfosHierarchyByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "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": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupInfos{?entityGroupIds}": { + "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", + "parameters": [ + { + "name": "entityGroupIds", + "in": "query", + "description": "A list of group ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/edge/{edgeId}/{groupType}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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": "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": { + "enum": [ + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD" + ] + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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 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": "getEntityGroupsForEntity", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/{groupType}/shared": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Shared Entity Groups by entity type (getSharedEntityGroupsByType)", + "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": "getSharedEntityGroupsByType", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/{groupType}/shared{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getSharedEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/{groupType}{?includeShared,pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getEntityGroupsByTypeAndPageLink", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/{groupType}{?includeShared}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by entity type (getEntityGroupsByType)", + "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": "getEntityGroupsByType", + "parameters": [ + { + "name": "groupType", + "in": "path", + "description": "Entity Group type", + "required": true, + "schema": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}": { + "get": { + "tags": [ + "entity-group-controller" + ], + "summary": "Get Entity Groups by owner and entity type (getEntityGroupsByOwnerAndType)", + "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": "getEntityGroupsByOwnerAndType", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups/{ownerType}/{ownerId}/{groupType}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getEntityGroupsByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "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": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroupsHierarchy/{ownerType}/{ownerId}/{groupType}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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 specified group.", + "operationId": "getEntityGroupsHierarchyByOwnerAndTypeAndPageLink", + "parameters": [ + { + "name": "ownerType", + "in": "path", + "description": "Tenant or Customer", + "required": true, + "schema": { + "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": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroups{?entityGroupIds}": { + "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": { + "items": {} + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ownerInfos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/owners{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edqs/enabled": { + "get": { + "tags": [ + "entity-query-controller" + ], + "summary": "isEdqsApiEnabled", + "operationId": "isEdqsApiEnabled", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edqs/system/request": { + "post": { + "tags": [ + "entity-query-controller" + ], + "summary": "processSystemEdqsRequest", + "operationId": "processSystemEdqsRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ToCoreEdqsRequest" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entitiesQuery/count": { + "post": { + "tags": [ + "entity-query-controller" + ], + "summary": "Count Entities by Query", + "description": "Allows to run complex queries to search the count of platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the number of entities that match the query definition.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the entity filter by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"active\"\n },\n \"valueType\": \"BOOLEAN\",\n \"predicate\": {\n \"operation\": \"EQUAL\",\n \"value\": {\n \"defaultValue\": true,\n \"dynamicValue\": null\n },\n \"type\": \"BOOLEAN\"\n }\n }\n ]\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "countEntitiesByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityCountQuery" + } + } + }, + "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": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entitiesQuery/find": { + "post": { + "tags": [ + "entity-query-controller" + ], + "summary": "Find Entity Data by Query", + "description": "Allows to run complex queries over platform entities (devices, assets, customers, etc) based on the combination of main entity filter and multiple key filters. Returns the paginated result of the query that contains requested entity fields and latest values of requested attributes and time series data.\n\n# Query Definition\n\n\n\nMain **entity filter** is mandatory and defines generic search criteria. For example, \"find all devices with profile 'Moisture Sensor'\" or \"Find all devices related to asset 'Building A'\"\n\nOptional **key filters** allow to filter results of the **entity filter** by complex criteria against main entity fields (name, label, type, etc), attributes and telemetry. For example, \"temperature > 20 or temperature< 10\" or \"name starts with 'T', and attribute 'model' is 'T1000', and time series field 'batteryLevel' > 40\".\n\nThe **entity fields** and **latest values** contains list of entity fields and latest attribute/telemetry fields to fetch for each entity.\n\nThe **page link** contains information about the page to fetch and the sort ordering.\n\nLet's review the example:\n\n```json\n{\n \"entityFilter\": {\n \"type\": \"entityType\",\n \"resolveMultiple\": true,\n \"entityType\": \"DEVICE\"\n },\n \"keyFilters\": [\n {\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\",\n \"inherit\": false\n }\n },\n \"type\": \"NUMERIC\"\n }\n }\n ],\n \"entityFields\": [\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"name\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"label\"\n },\n {\n \"type\": \"ENTITY_FIELD\",\n \"key\": \"additionalInfo\"\n }\n ],\n \"latestValues\": [\n {\n \"type\": \"ATTRIBUTE\",\n \"key\": \"model\"\n },\n {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n }\n ],\n \"pageLink\": {\n \"page\": 0,\n \"pageSize\": 10,\n \"sortOrder\": {\n \"key\": {\n \"key\": \"name\",\n \"type\": \"ENTITY_FIELD\"\n },\n \"direction\": \"ASC\"\n }\n }\n}\n```\n\n Example mentioned above search all devices which have attribute 'active' set to 'true'. Now let's review available entity filters and key filters syntax:\n\n # Entity Filters\nEntity Filter body depends on the 'type' parameter. Let's review available entity filter types. In fact, they do correspond to available dashboard aliases.\n\n## Single Entity\n\nAllows to filter only one entity based on the id. For example, this entity filter selects certain device:\n\n```json\n{\n \"type\": \"singleEntity\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Group Entities Filter\n\nAllows to filter multiple entities of the same type using the entity group type and id. For example, this entity filter selects all devices that belong to the group 'e52b0020-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"entityGroup\",\n \"groupType\": \"DEVICE\",\n \"entityGroup\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n}\n```\n\n## Entity List Filter\n\nAllows to filter entities of the same type using their ids. For example, this entity filter selects two devices:\n\n```json\n{\n \"type\": \"entityList\",\n \"entityType\": \"DEVICE\",\n \"entityList\": [\n \"e6501f30-2a7a-11ec-94eb-213c95f54092\",\n \"e6657bf0-2a7a-11ec-94eb-213c95f54092\"\n ]\n}\n```\n\n## Entity Name Filter\n\nAllows to filter entities of the same type using the **'starts with'** expression over entity name. For example, this entity filter selects all devices which name starts with 'Air Quality':\n\n```json\n{\n \"type\": \"entityName\",\n \"entityType\": \"DEVICE\",\n \"entityNameFilter\": \"Air Quality\"\n}\n```\n\n## Entity Type Filter\n\nAllows to filter entities based on their type (CUSTOMER, USER, DASHBOARD, ASSET, DEVICE, etc)For example, this entity filter selects all tenant customers:\n\n```json\n{\n \"type\": \"entityType\",\n \"entityType\": \"CUSTOMER\"\n}\n```\n\n## Group List Filter\n\nReturn multiple groups of the same type using specified ids. For example, this entity filter selects 2 device groups (if they are present in the system) with ids 'e52b0020-2a7a-11ec-94eb-213c95f54092' and 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"entityGroupList\",\n \"groupType\": \"DEVICE\",\n \"entityGroupList\": [\"e52b0020-2a7a-11ec-94eb-213c95f54092\", \"e52b0020-2a7a-11ec-94eb-213c95f54093\"]\n}\n```\n\n## Group Name Filter\n\nAllows to filter entity groups based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all devices which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"CAT\"\n}\n```\n\n## Entities by Group Name Filter\n\nAllows to filter entities that belong to group based on the entity type and the group name. Optional parameter 'ownerId' allows you to specify the owner of the group (Tenant or Customer, current user owner by default).For example, this entity filter selects all devices which belong to group 'Water Meters':\n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n Other example, this entity filter selects all devices which belong to group 'Water Meters' which in turn belongs to (sub-)Customer with id 'e52b0020-2a7a-11ec-94eb-213c95f54093': \n\n```json\n{\n \"type\": \"entitiesByGroupName\",\n \"ownerId\": {\"entityType\": \"CUSTOMER\",\"id\":\"e52b0020-2a7a-11ec-94eb-213c95f54093\"},\n \"groupType\": \"DEVICE\",\n \"entityGroupNameFilter\": \"Water Meters\"\n}\n```\n\n## Entity owner Filter\n\nAllows to fetch owner (Tenant or Customer) of the specified entity. For example, this entity filter selects owner of the device with id 'e52b0020-2a7a-11ec-94eb-213c95f54093':\n\n```json\n{\n \"type\": \"stateEntityOwner\",\n \"singleEntity\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"DEVICE\"\n }\n}\n```\n\n## Asset Type Filter\n\nAllows to filter assets based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'charging station' assets which name starts with 'Tesla':\n\n```json\n{\n \"type\": \"assetType\",\n \"assetType\": \"charging station\",\n \"assetNameFilter\": \"Tesla\"\n}\n```\n\n## Device Type Filter\n\nAllows to filter devices based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Temperature Sensor' devices which name starts with 'ABC':\n\n```json\n{\n \"type\": \"deviceType\",\n \"deviceType\": \"Temperature Sensor\",\n \"deviceNameFilter\": \"ABC\"\n}\n```\n\n## Edge Type Filter\n\nAllows to filter edge instances based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Factory' edge instances which name starts with 'Nevada':\n\n```json\n{\n \"type\": \"edgeType\",\n \"edgeType\": \"Factory\",\n \"edgeNameFilter\": \"Nevada\"\n}\n```\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```\n\n## Api Usage Filter\n\nAllows to query for Api Usage based on optional customer id. If the customer id is not set, returns current tenant API usage.For example, this entity filter selects the 'Api Usage' entity for customer with id 'e6501f30-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"apiUsageState\",\n \"customerId\": {\n \"id\": \"d521edb0-2a7a-11ec-94eb-213c95f54092\",\n \"entityType\": \"CUSTOMER\"\n }\n}\n```\n\n## Relations Query Filter\n\nAllows to filter entities that are related to the provided root entity. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'filter' object allows you to define the relation type and set of acceptable entity types to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only those who match the 'filters'.\n\nFor example, this entity filter selects all devices and assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092':\n\n```json\n{\n \"type\": \"relationsQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"filters\": [\n {\n \"relationType\": \"Contains\",\n \"entityTypes\": [\n \"DEVICE\",\n \"ASSET\"\n ]\n }\n ]\n}\n```\n\n## Asset Search Query\n\nAllows to filter assets that are related to the provided root entity. Filters related assets based on the relation type and set of asset types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'assetTypes' defines the type of the asset to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only assets that match 'relationType' and 'assetTypes' conditions.\n\nFor example, this entity filter selects 'charging station' assets which are related to the asset with id 'e51de0c0-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"assetSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e51de0c0-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"assetTypes\": [\n \"charging station\"\n ]\n}\n```\n\n## Device Search Query\n\nAllows to filter devices that are related to the provided root entity. Filters related devices based on the relation type and set of device types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Charging port' and 'Air Quality Sensor' devices which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"deviceTypes\": [\n \"Air Quality Sensor\",\n \"Charging port\"\n ]\n}\n```\n\n## Entity View Query\n\nAllows to filter entity views that are related to the provided root entity. Filters related entity views based on the relation type and set of entity view types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'entityViewTypes' defines the type of the entity view to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Concrete mixer' entity views which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"entityViewSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 1,\n \"fetchLastLevelOnly\": false,\n \"relationType\": \"Contains\",\n \"entityViewTypes\": [\n \"Concrete mixer\"\n ]\n}\n```\n\n## Edge Search Query\n\nAllows to filter edge instances that are related to the provided root entity. Filters related edge instances based on the relation type and set of edge types. Possible direction values are 'TO' and 'FROM'. The 'maxLevel' defines how many relation levels should the query search 'recursively'. Assuming the 'maxLevel' is > 1, the 'fetchLastLevelOnly' defines either to return all related entities or only entities that are on the last level of relations. The 'relationType' defines the type of the relation to search for. The 'deviceTypes' defines the type of the device to search for. The relation query calculates all related entities, even if they are filtered using different relation types, and then extracts only devices that match 'relationType' and 'deviceTypes' conditions.\n\nFor example, this entity filter selects 'Factory' edge instances which are related to the asset with id 'e52b0020-2a7a-11ec-94eb-213c95f54092' using 'Contains' relation:\n\n```json\n{\n \"type\": \"deviceSearchQuery\",\n \"rootEntity\": {\n \"entityType\": \"ASSET\",\n \"id\": \"e52b0020-2a7a-11ec-94eb-213c95f54092\"\n },\n \"direction\": \"FROM\",\n \"maxLevel\": 2,\n \"fetchLastLevelOnly\": true,\n \"relationType\": \"Contains\",\n \"edgeTypes\": [\n \"Factory\"\n ]\n}\n```\n\n # Key Filters\nKey Filter allows you to define complex logical expressions over entity field, attribute or latest time series value. The filter is defined using 'key', 'valueType' and 'predicate' objects. Single Entity Query may have zero, one or multiple predicates. If multiple filters are defined, they are evaluated using logical 'AND'. The example below checks that temperature of the entity is above 20 degrees:\n\n```json\n{\n \"key\": {\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n },\n \"valueType\": \"NUMERIC\",\n \"predicate\": {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n}\n```\n\n Now let's review 'key', 'valueType' and 'predicate' objects in detail.\n\n## Filter Key\n\nFilter Key defines either entity field, attribute or telemetry. It is a JSON object that consists the key name and type. The following filter key types are supported: \n\n * 'CLIENT_ATTRIBUTE' - used for client attributes; \n * 'SHARED_ATTRIBUTE' - used for shared attributes; \n * 'SERVER_ATTRIBUTE' - used for server attributes; \n * 'ATTRIBUTE' - used for any of the above; \n * 'TIME_SERIES' - used for time series values; \n * 'ENTITY_FIELD' - used for accessing entity fields like 'name', 'label', etc. The list of available fields depends on the entity type; \n * 'ALARM_FIELD' - similar to entity field, but is used in alarm queries only; \n\n\n Let's review the example:\n\n```json\n{\n \"type\": \"TIME_SERIES\",\n \"key\": \"temperature\"\n}\n```\n\n## Value Type and Operations\n\nProvides a hint about the data type of the entity field that is defined in the filter key. The value type impacts the list of possible operations that you may use in the corresponding predicate. For example, you may use 'STARTS_WITH' or 'END_WITH', but you can't use 'GREATER_OR_EQUAL' for string values.The following filter value types and corresponding predicate operations are supported: \n\n * 'STRING' - used to filter any 'String' or 'JSON' values. Operations: EQUAL, NOT_EQUAL, STARTS_WITH, ENDS_WITH, CONTAINS, NOT_CONTAINS; \n * 'NUMERIC' - used for 'Long' and 'Double' values. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n * 'BOOLEAN' - used for boolean values. Operations: EQUAL, NOT_EQUAL;\n * 'DATE_TIME' - similar to numeric, transforms value to milliseconds since epoch. Operations: EQUAL, NOT_EQUAL, GREATER, LESS, GREATER_OR_EQUAL, LESS_OR_EQUAL; \n\n\n## Filter Predicate\n\nFilter Predicate defines the logical expression to evaluate. The list of available operations depends on the filter value type, see above. Platform supports 4 predicate types: 'STRING', 'NUMERIC', 'BOOLEAN' and 'COMPLEX'. The last one allows to combine multiple operations over one filter key.\n\nSimple predicate example to check 'value < 100': \n\n```json\n{\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 100,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n}\n```\n\nComplex predicate example, to check 'value < 10 or value > 20': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 20,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n}\n```\n\nMore complex predicate example, to check 'value < 10 or (value > 50 && value < 60)': \n\n```json\n{\n \"type\": \"COMPLEX\",\n \"operation\": \"OR\",\n \"predicates\": [\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 10,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"type\": \"COMPLEX\",\n \"operation\": \"AND\",\n \"predicates\": [\n {\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 50,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n },\n {\n \"operation\": \"LESS\",\n \"value\": {\n \"defaultValue\": 60,\n \"dynamicValue\": null\n },\n \"type\": \"NUMERIC\"\n }\n ]\n }\n ]\n}\n```\n\n You may also want to replace hardcoded values (for example, temperature > 20) with the more dynamic expression (for example, temperature > 'value of the tenant attribute with key 'temperatureThreshold'). It is possible to use 'dynamicValue' to define attribute of the tenant, customer or user that is performing the API call. See example below: \n\n```json\n{\n \"operation\": \"GREATER\",\n \"value\": {\n \"defaultValue\": 0,\n \"dynamicValue\": {\n \"sourceType\": \"CURRENT_USER\",\n \"sourceAttribute\": \"temperatureThreshold\"\n }\n },\n \"type\": \"NUMERIC\"\n}\n```\n\n Note that you may use 'CURRENT_USER', 'CURRENT_CUSTOMER' and 'CURRENT_TENANT' as a 'sourceType'. The 'defaultValue' is used when the attribute with such a name is not defined for the chosen source.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findEntityDataByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entitiesQuery/find/keys{?timeseries,attributes,scope}": { + "post": { + "tags": [ + "entity-query-controller" + ], + "summary": "Find Entity Keys by Query", + "description": "Uses entity data query (see 'Find Entity Data by Query') to find first 100 entities. Then fetch and return all unique time series and/or attribute keys. Used mostly for UI hints.", + "operationId": "findEntityTimeseriesAndAttributesKeysByQuery", + "parameters": [ + { + "name": "timeseries", + "in": "query", + "description": "Include all unique time series keys to the result.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "attributes", + "in": "query", + "description": "Include all unique attribute keys to the result.", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "scope", + "in": "query", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": false, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityDataQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relation": { + "post": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Create Relation (saveRelation)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations": { + "post": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Find related entities (findByQuery)", + "description": "Returns all entities that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info.", + "operationId": "findByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations/info": { + "post": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Find related entity infos (findInfoByQuery)", + "description": "Returns all entity infos that are related to the specific entity. The entity id, relation type, entity types, depth of the search, and other query parameters defined using complex 'EntityRelationsQuery' object. See 'Model' tab of the Parameters for more info. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findInfoByQuery", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelationsQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations/info{?fromId,fromType,relationTypeGroup}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relation Infos (findInfoByFrom)", + "description": "Returns list of relation info objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findInfoByFrom", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations/info{?toId,toType,relationTypeGroup}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relation Infos (findInfoByTo)", + "description": "Returns list of relation info objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer. Relation Info is an extension of the default Relation object that contains information about the 'from' and 'to' entity names. ", + "operationId": "findInfoByTo", + "parameters": [ + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelationInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations{?entityId,entityType}": { + "delete": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Delete common relations (deleteCommonRelations)", + "description": "Deletes all the relations ('from' and 'to' direction) for the specified entity and relation type group: 'COMMON'. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "deleteRelations", + "parameters": [ + { + "name": "entityId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations{?fromId,fromType,relationType,relationTypeGroup}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relations (findByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findByFrom_1", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations{?fromId,fromType,relationTypeGroup}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relations (findByFrom)", + "description": "Returns list of relation objects for the specified entity by the 'from' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findByFrom", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations{?toId,toType,relationType,relationTypeGroup}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relations (findByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findByTo_1", + "parameters": [ + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relations{?toId,toType,relationTypeGroup}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get List of Relations (findByTo)", + "description": "Returns list of relation objects for the specified entity by the 'to' direction. \n\nIf the user has the authority of 'System Administrator', the server checks that the entity is owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that the entity is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the entity is assigned to the same customer.", + "operationId": "findByTo", + "parameters": [ + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/relation{?fromId,fromType,relationType,relationTypeGroup,toId,toType}": { + "get": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Get Relation (getRelation)", + "description": "Returns relation object between two specified entities if present. Otherwise throws exception. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "getRelation", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "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/EntityRelation" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Delete Relation (deleteRelation)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelation", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/v2/relation": { + "post": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Create Relation (saveRelationV2)", + "description": "Creates or updates a relation between two entities in the platform. Relations unique key is a combination of from/to entity id and relation type group and relation type. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "saveRelationV2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityRelation" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/v2/relation{?fromId,fromType,relationType,relationTypeGroup,toId,toType}": { + "delete": { + "tags": [ + "entity-relation-controller" + ], + "summary": "Delete Relation (deleteRelationV2)", + "description": "Deletes a relation between two entities in the platform. \n\nIf the user has the authority of 'System Administrator', the server checks that 'from' and 'to' entities are owned by the sysadmin. If the user has the authority of 'Tenant Administrator', the server checks that 'from' and 'to' entities are owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the 'from' and 'to' entities are assigned to the same customer.", + "operationId": "deleteRelationV2", + "parameters": [ + { + "name": "fromId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromType", + "in": "query", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationType", + "in": "query", + "description": "A string value representing relation type between entities. For example, 'Contains', 'Manages'. It can be any string value.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "relationTypeGroup", + "in": "query", + "description": "A string value representing relation type group. For example, 'COMMON'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "toId", + "in": "query", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "toType", + "in": "query", + "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/EntityRelation" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/entityViewInfos{?pageSize,page,includeCustomers,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Customer Entity View Infos (getCustomerEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the specified customer. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See 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": "getCustomerEntityViewInfos", + "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": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityViewInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/entityViews{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Customer Entity Views (getCustomerEntityViews)", + "description": "Returns a page of Entity View objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getCustomerEntityViews", + "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": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/entityViews{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get entity views by Entity Group Id (getEntityViewsByEntityGroupId)", + "description": "Returns a page of Entity View objects that belongs to specified Entity View 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 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 specified group.", + "operationId": "getEntityViewsByEntityGroupId", + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityView/info/{entityViewId}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get entity view info (getEntityViewInfoById)", + "description": "Fetch the Entity View info object based on the provided entity view id. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewInfoById", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityView/types": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Entity View Types (getEntityViewTypes)", + "description": "Returns a set of unique entity view types based on entity views that are either owned by the tenant or assigned to the customer which user is performing the request.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewTypes", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityView/{entityViewId}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get entity view (getEntityViewById)", + "description": "Fetch the EntityView object based on the provided entity view id. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getEntityViewById", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "entity-view-controller" + ], + "summary": "Delete entity view (deleteEntityView)", + "description": "Delete the EntityView object based on the provided entity view id. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteEntityView", + "parameters": [ + { + "name": "entityViewId", + "in": "path", + "description": "A string value representing the entity view id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityViewInfos/all{?pageSize,page,includeCustomers,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get All Entity View Infos for current user (getAllEntityViewInfos)", + "description": "Returns a page of entity view info objects owned by the tenant or the customer of a current user. Entity Views Info extends the Entity View with owner name. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See 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": "getAllEntityViewInfos", + "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": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityViewInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityViews": { + "post": { + "tags": [ + "entity-view-controller" + ], + "summary": "Find related entity views (findByQuery)", + "description": "Returns all entity views that are related to the specific entity. The entity id, relation type, entity view types, depth of the search, and other query parameters defined using complex 'EntityViewSearchQuery' object. See 'Model' tab of the Parameters for more info.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findByQuery_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityViewSearchQuery" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityViews{?entityViewIds}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Entity Views By Ids (getEntityViewsByIds)", + "description": "Requested entity views must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityViewsByIds", + "parameters": [ + { + "name": "entityViewIds", + "in": "query", + "description": "A list of entity view ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityView" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityView{?entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "entity-view-controller" + ], + "summary": "Save or update entity view (saveEntityView)", + "description": "Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. See the 'Model' tab for more details.Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Entity View entity.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityView", + "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": { + "items": {} + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/entityViews{?entityViewName}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Entity View by name (getTenantEntityView)", + "description": "Fetch the Entity View object based on the tenant id and entity view name. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityView", + "parameters": [ + { + "name": "entityViewName", + "in": "query", + "description": "Entity View name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityView" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/entityViews{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Tenant Entity Views (getTenantEntityViews)", + "description": "Returns a page of entity views owned by tenant. Entity Views limit the degree of exposure of the Device or Asset telemetry and attributes to the Customers. Every Entity View references exactly one entity (device or asset) and defines telemetry and attribute keys that will be visible to the assigned Customer. As a Tenant Administrator you are able to create multiple EVs per Device or Asset and assign them to different Customers. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantEntityViews", + "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": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/entityViews{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "entity-view-controller" + ], + "summary": "Get Entity Views (getUserEntityViews)", + "description": "Returns a page of entity views that are available for the current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See 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": "getUserEntityViews", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "\n\n## Entity View Filter\n\nAllows to filter entity views based on their type and the **'starts with'** expression over their name. For example, this entity filter selects all 'Concrete Mixer' entity views which name starts with 'CAT':\n\n```json\n{\n \"type\": \"entityViewType\",\n \"entityViewType\": \"Concrete Mixer\",\n \"entityViewNameFilter\": \"CAT\"\n}\n```", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the entity view name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEntityView" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/events/{entityType}/{entityId}/clear{?startTime,endTime}": { + "post": { + "tags": [ + "event-controller" + ], + "summary": "Clear Events (clearEvents)", + "description": "Clears events by filter for specified entity.", + "operationId": "clearEvents", + "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": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", + "oneOf": [ + { + "$ref": "#/components/schemas/CalculatedFieldDebugEventFilter" + }, + { + "$ref": "#/components/schemas/DebugConverterEventFilter" + }, + { + "$ref": "#/components/schemas/DebugIntegrationEventFilter" + }, + { + "$ref": "#/components/schemas/ErrorEventFilter" + }, + { + "$ref": "#/components/schemas/LifeCycleEventFilter" + }, + { + "$ref": "#/components/schemas/RawDataEventFilter" + }, + { + "$ref": "#/components/schemas/RuleChainDebugEventFilter" + }, + { + "$ref": "#/components/schemas/RuleNodeDebugEventFilter" + }, + { + "$ref": "#/components/schemas/StatisticsEventFilter" + } + ] + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/events/{entityType}/{entityId}/{eventType}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}": { + "get": { + "tags": [ + "event-controller" + ], + "summary": "Get Events by type (getEvents)", + "description": "Returns a page of events for specified entity by specifying event type. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. ", + "operationId": "getEvents_2", + "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": "eventType", + "in": "path", + "description": "A string value representing event type", + "required": true, + "schema": { + "type": "string" + }, + "example": "STATS" + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "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 value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEventInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/events/{entityType}/{entityId}{?tenantId,pageSize,page,textSearch,sortProperty,sortOrder,startTime,endTime}": { + "get": { + "tags": [ + "event-controller" + ], + "summary": "Get Events (Deprecated)", + "description": "Returns a page of events for specified entity. Deprecated and will be removed in next minor release. The call was deprecated to improve the performance of the system. Current implementation will return 'Lifecycle' events only. Use 'Get events by type' or 'Get events by filter' instead. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. ", + "operationId": "getEvents_1", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "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 value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEventInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "event-controller" + ], + "summary": "Get Events by event filter (getEvents)", + "description": "Returns a page of events for the chosen entity by specifying the event filter. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\n# Event Filter Definition\n\n6 different eventFilter objects could be set for different event types. The eventType field is required. Others are optional. If some of them are set, the filtering will be applied according to them. See the examples below for all the fields used for each event type filtering. \n\nNote,\n\n * 'server' - string value representing the server name, identif ier or ip address where the platform is running;\n * 'errorStr' - the case insensitive 'contains' filter based on error message.\n\n## Error Event Filter\n\n```json\n{\n \"eventType\":\"ERROR\",\n \"server\":\"ip-172-31-24-152\",\n \"method\":\"onClusterEventMsg\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'method' - string value representing the method name when the error happened.\n\n## Lifecycle Event Filter\n\n```json\n{\n \"eventType\":\"LC_EVENT\",\n \"server\":\"ip-172-31-24-152\",\n \"event\":\"STARTED\",\n \"status\":\"Success\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'event' - string value representing the lifecycle event type;\n * 'status' - string value representing status of the lifecycle event.\n\n## Statistics Event Filter\n\n```json\n{\n \"eventType\":\"STATS\",\n \"server\":\"ip-172-31-24-152\",\n \"messagesProcessed\":10,\n \"errorsOccurred\":5\n}\n```\n\n * 'messagesProcessed' - the minimum number of successfully processed messages;\n * 'errorsOccurred' - the minimum number of errors occurred during messages processing.\n\n## Debug Rule Node Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_NODE\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n## Debug Rule Chain Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_RULE_CHAIN\",\n \"msgDirectionType\":\"IN\",\n \"server\":\"ip-172-31-24-152\",\n \"dataSearch\":\"humidity\",\n \"metadataSearch\":\"deviceName\",\n \"entityName\":\"DEVICE\",\n \"relationType\":\"Success\",\n \"entityId\":\"de9d54a0-2b7a-11ec-a3cc-23386423d98f\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n}\n```\n\n * 'msgDirectionType' - string value representing msg direction type (incoming to entity or outcoming from entity);\n * 'dataSearch' - the case insensitive 'contains' filter based on data (key and value) for the message;\n * 'metadataSearch' - the case insensitive 'contains' filter based on metadata (key and value) for the message;\n * 'entityName' - string value representing the entity type;\n * 'relationType' - string value representing the type of message routing;\n * 'entityId' - string value representing the entity id in the event body (originator of the message);\n * 'msgType' - string value representing the message type;\n * 'isError' - boolean value to filter the errors.\n\n## Debug Calculated Field Event Filter\n\n```json\n{\n \"eventType\":\"DEBUG_CALCULATED_FIELD\",\n \"server\":\"ip-172-31-24-152\",\n \"isError\":\"false\",\n \"errorStr\":\"Error Message\"\n \"entityId\":\"cf4b8741-f618-471f-ae08-d881ca7f9fe9\",\n \"msgId\":\"5cf7d3a0-aee7-40dd-a737-ade05528e7eb\",\n \"msgType\":\"POST_TELEMETRY_REQUEST\",\n \"arguments\":\"{\n \"x\": {\n \"ts\": 1739432016629,\n \"value\": 20\n },\n \"y\": {\n \"ts\": 1739429717656,\n \"value\": 12\n }\n }\",\n \"result\":\"{\n \"x + y\": 32\n }\",\n}\n```\n\n * 'entityId' - string value representing the entity id in the event body;\n * 'entityType' - string value representing the entity type;\n * 'msgId' - string value representing the message id in the rule engine;\n * 'msgType' - string value representing the message type;\n * 'arguments' - string value representing the arguments that were used in the calculation performed;\n * 'result' - string value representing the result of a calculation;\n * 'isError' - boolean value to filter the errors.\n\n", + "operationId": "getEvents", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenantId", + "in": "query", + "description": "A string value representing the tenant id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "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 value is not used in searching.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "ts", + "id" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "startTime", + "in": "query", + "description": "Timestamp. Events with creation time before it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTime", + "in": "query", + "description": "Timestamp. Events with creation time after it won't be queried.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "description": "A JSON value representing the event filter.", + "oneOf": [ + { + "$ref": "#/components/schemas/CalculatedFieldDebugEventFilter" + }, + { + "$ref": "#/components/schemas/DebugConverterEventFilter" + }, + { + "$ref": "#/components/schemas/DebugIntegrationEventFilter" + }, + { + "$ref": "#/components/schemas/ErrorEventFilter" + }, + { + "$ref": "#/components/schemas/LifeCycleEventFilter" + }, + { + "$ref": "#/components/schemas/RawDataEventFilter" + }, + { + "$ref": "#/components/schemas/RuleChainDebugEventFilter" + }, + { + "$ref": "#/components/schemas/RuleNodeDebugEventFilter" + }, + { + "$ref": "#/components/schemas/StatisticsEventFilter" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataEventInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/groupPermissions": { + "get": { + "tags": [ + "group-permission-controller" + ], + "summary": "Get group permissions by Entity Group Id (getEntityGroupPermissions)", + "description": "Returns a list of group permission objects that is assigned for the specified Entity Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getEntityGroupPermissions", + "parameters": [ + { + "name": "entityGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/groupPermission": { + "post": { + "tags": [ + "group-permission-controller" + ], + "summary": "Create Or Update Group Permission (saveGroupPermission)", + "description": "Creates or Updates the Group Permission. When creating group permission, platform generates Group Permission Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Group Permission id will be present in the response. Specify existing Group Permission id to update the permission. Referencing non-existing Group Permission Id will cause 'Not Found' error.\n\nGroup permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveGroupPermission", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupPermission" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupPermission" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/groupPermission/info/{groupPermissionId}{?isUserGroup}": { + "get": { + "tags": [ + "group-permission-controller" + ], + "summary": "Get Group Permission Info (getGroupPermissionInfoById)", + "description": "Fetch the Group Permission Info object based on the provided Group Permission Id and the flag that controls what additional information to load: User or Entity Group. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionInfoById", + "parameters": [ + { + "name": "groupPermissionId", + "in": "path", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isUserGroup", + "in": "query", + "description": "Load additional information about User('true') or Entity Group('false).", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/groupPermission/{groupPermissionId}": { + "get": { + "tags": [ + "group-permission-controller" + ], + "summary": "Get Group Permission (getGroupPermissionById)", + "description": "Fetch the Group Permission object based on the provided Group Permission Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getGroupPermissionById", + "parameters": [ + { + "name": "groupPermissionId", + "in": "path", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GroupPermission" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "group-permission-controller" + ], + "summary": "Delete group permission (deleteGroupPermission)", + "description": "Deletes the group permission. Referencing non-existing group permission Id will cause an error.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteGroupPermission", + "parameters": [ + { + "name": "groupPermissionId", + "in": "path", + "description": "A string value representing the group permission id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/userGroup/groupPermissions/info": { + "post": { + "tags": [ + "group-permission-controller" + ], + "summary": "Load User Group Permissions (loadUserGroupPermissionInfos)", + "description": "Enrich a list of group permission objects with the information about Role, User and Entity Groups. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "loadUserGroupPermissionInfos", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "JSON array of group permission objects", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/userGroup/{userGroupId}/groupPermissions": { + "get": { + "tags": [ + "group-permission-controller" + ], + "summary": "Get group permissions by User Group Id (getUserGroupPermissions)", + "description": "Returns a list of group permission objects that belongs to specified User Group Id. Group permission entity represents list of allowed operations for certain User Group to perform against certain Entity Group. Basically, this entity wires three other entities: \n\n * Role that defines set of allowed operations;\n * User Group that defines set of users who may perform the operations; \n * Entity Group that defines set of entities which will be accessible to users;\n\n Group Permission Info object extends the Group Permissions with the full information about Role and User and/or Entity Groups. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserGroupPermissions", + "parameters": [ + { + "name": "userGroupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermissionInfo" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/image": { + "post": { + "tags": [ + "image-controller" + ], + "summary": "uploadImage", + "operationId": "uploadImage", + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + }, + "title": { + "type": "string" + }, + "imageSubType": { + "type": "string" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/image/import": { + "put": { + "tags": [ + "image-controller" + ], + "summary": "importImage", + "operationId": "importImage", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceExportData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/public/{publicResourceKey}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadPublicImage", + "operationId": "downloadPublicImage", + "parameters": [ + { + "name": "publicResourceKey", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/{type}/{key}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadImage", + "operationId": "downloadImage", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "put": { + "tags": [ + "image-controller" + ], + "summary": "updateImage", + "operationId": "updateImage", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "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", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/{type}/{key}/export": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "exportImage", + "operationId": "exportImage", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ResourceExportData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/{type}/{key}/info": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "getImageInfo", + "operationId": "getImageInfo", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "put": { + "tags": [ + "image-controller" + ], + "summary": "updateImageInfo", + "operationId": "updateImageInfo", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/{type}/{key}/preview": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadImagePreview", + "operationId": "downloadImagePreview", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/{type}/{key}/public/{isPublic}": { + "put": { + "tags": [ + "image-controller" + ], + "summary": "updateImagePublicStatus", + "operationId": "updateImagePublicStatus", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "isPublic", + "in": "path", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images/{type}/{key}{?force}": { + "delete": { + "tags": [ + "image-controller" + ], + "summary": "deleteImage", + "operationId": "deleteImage", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbImageDeleteResult" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/images{?pageSize,page,imageSubType,includeSystemImages,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "getImages", + "operationId": "getImages", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "imageSubType", + "in": "query", + "description": "A string value representing resource sub-type.", + "required": false, + "schema": { + "enum": [ + "IMAGE", + "SCADA_SYMBOL" + ] + } + }, + { + "name": "includeSystemImages", + "in": "query", + "description": "Use 'true' to include system images. Disabled by default. Ignored for requests by users with system administrator authority.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/whiteLabel/loginFavicon/{type}/{key}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadLoginFavicon", + "operationId": "downloadLoginFavicon", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/whiteLabel/loginLogo/{type}/{key}": { + "get": { + "tags": [ + "image-controller" + ], + "summary": "downloadLoginLogo", + "operationId": "downloadLoginLogo", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Type of the image: tenant or system", + "required": true, + "schema": { + "enum": [ + "tenant", + "system" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Image resource key, for example thermostats_dashboard_background.jpeg", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "image/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/edge/integration/{edgeId}/missingAttributes{?integrationIds}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Find edge missing attributes for assigned integrations (findEdgeMissingAttributes)", + "description": "Returns list of edge attribute names that are missing in assigned integrations.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findEdgeMissingAttributes", + "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": "integrationIds", + "in": "query", + "description": "A list of assigned integration ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/integration/{integrationId}/allMissingAttributes": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Find missing attributes for all related edges (findAllRelatedEdgesMissingAttributes)", + "description": "Returns list of attribute names of all related edges that are missing in the integration configuration.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "findAllRelatedEdgesMissingAttributes", + "parameters": [ + { + "name": "integrationId", + "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/integration/{integrationId}": { + "post": { + "tags": [ + "integration-controller" + ], + "summary": "Assign integration to edge (assignIntegrationToEdge)", + "description": "Creates assignment of an existing integration edge template to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once integration will be delivered to edge service, it's going to start locally. \n\nOnly integration edge template can be assigned to edge.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "assignIntegrationToEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "integrationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "integration-controller" + ], + "summary": "Unassign integration from edge (unassignIntegrationFromEdge)", + "description": "Clears assignment of the integration to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove integration (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove integration locally.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unassignIntegrationFromEdge", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "integrationId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/integrationInfos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Edge Integrations (getEdgeIntegrationInfos)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeIntegrationInfos", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataIntegrationInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/integrations{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Edge Integrations (getEdgeIntegrations)", + "description": "Returns a page of Integrations assigned to the specified edge. The integration object contains information about the Integration, including the heavyweight configuration object. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getEdgeIntegrations", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataIntegration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integration": { + "post": { + "tags": [ + "integration-controller" + ], + "summary": "Create Or Update Integration (saveIntegration)", + "description": "Create or update the Integration. When creating integration, platform generates Integration Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created integration id will be present in the response. Specify existing Integration id to update the integration. Referencing non-existing integration Id will cause 'Not Found' error. Integration configuration is validated for each type of the integration before it can be created. \n\n# Integration Configuration\n\nIntegration configuration (**'configuration'** field) is the JSON object representing the special configuration per integration type with the connectivity fields and other important parameters dependent on the specific integration type. Let's review the configuration object for the MQTT Integration type below. \n\n```json\n{\n \"clientConfiguration\":{\n \"host\":\"broker.hivemq.com\",\n \"port\":1883,\n \"cleanSession\":false,\n \"ssl\":false,\n \"connectTimeoutSec\":10,\n \"clientId\":\"\",\n \"maxBytesInMessage\":32368,\n \"credentials\":{\n \"type\":\"anonymous\"\n }\n },\n \"downlinkTopicPattern\":\"${topic}\",\n \"topicFilters\":[\n {\n \"filter\":\"tb/mqtt-integration-tutorial/sensors/+/temperature\",\n \"qos\":0\n }\n ],\n \"metadata\":{\n }\n}\n```\n\nRemove 'id', 'tenantId' from the request body example (below) to create new Integration entity. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveIntegration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integration/check": { + "post": { + "tags": [ + "integration-controller" + ], + "summary": "Check integration connectivity (checkIntegrationConnection)", + "description": "Checks if the connection to the integration is established. Throws an error if the connection is not established. Example: Failed to connect to MQTT broker at host:port.", + "operationId": "checkIntegrationConnection", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integration/routingKey/{routingKey}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integration by Routing Key (getIntegrationByRoutingKey)", + "description": "Fetch the Integration object based on the provided routing key. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationByRoutingKey", + "parameters": [ + { + "name": "routingKey", + "in": "path", + "description": "A string value representing the integration routing key. For example, '542047e6-c1b2-112e-a87e-e49247c09d4b'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integration/{integrationId}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integration (getIntegrationById)", + "description": "Fetch the Integration object based on the provided Integration Id. The server checks that the integration is owned by the same tenant. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationById", + "parameters": [ + { + "name": "integrationId", + "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Integration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "integration-controller" + ], + "summary": "Delete integration (deleteIntegration)", + "description": "Deletes the integration and all the relations (from and to the integration). Referencing non-existing integration Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteIntegration", + "parameters": [ + { + "name": "integrationId", + "in": "path", + "description": "A string value representing the integration id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integrationInfos{?isEdgeTemplate,pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integration Infos (getIntegrationInfos)", + "description": "Returns a page of integration infos owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationInfos", + "parameters": [ + { + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataIntegrationInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integrations/converters/info": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integrations Converters info (getIntegrationsConvertersInfo)", + "description": "Returns a JSON object containing information about existing tenant converters and converters available in library. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getIntegrationsConvertersInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/IntegrationConvertersInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integrations{?integrationIds}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integrations By Ids (getIntegrationsByIds)", + "description": "Requested integrations must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrationsByIds", + "parameters": [ + { + "name": "integrationIds", + "in": "query", + "description": "A list of integration ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Integration" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/integrations{?isEdgeTemplate,pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "integration-controller" + ], + "summary": "Get Integrations (getIntegrations)", + "description": "Returns a page of integrations owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getIntegrations", + "parameters": [ + { + "name": "isEdgeTemplate", + "in": "query", + "description": "Fetch edge template integrations", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'startsWith' filter based on the integration name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "type", + "debugMode", + "allowCreateDevicesOrAssets", + "enabled", + "remote", + "routingKey", + "secret" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataIntegration" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/auth/login": { + "post": { + "tags": [ + "login-endpoint" + ], + "summary": "Login method to get user JWT token data", + "description": "Login method used to authenticate user and get JWT token data.\n\nValue of the response **token** field can be used as **X-Authorization** header value:\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`.", + "requestBody": { + "description": "Login request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "account-disabled": { + "summary": "Disabled account", + "value": { + "message": "User account is not active", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "bad-credentials": { + "summary": "Bad credentials", + "value": { + "message": "Invalid username or password", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "message": "User account is locked due to security policy", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "message": "Token has expired", + "errorCode": 11, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "authentication-failed": { + "summary": "General authentication error", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + } + } + } + } + }, + "401 ": { + "description": "Unauthorized (**Expired credentials**)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + }, + "examples": { + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1747837263601, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "resetToken": "0so9jSEdeoEMiQFxhUvWaBjnDqIjXN" + } + } + } + } + } + } + } + } + }, + "/api/auth/token": { + "post": { + "tags": [ + "login-endpoint" + ], + "summary": "Refresh user JWT token data", + "description": "Method to refresh JWT token. Provide a valid refresh token to get a new JWT token.\n\nThe response contains a new token that can be used for authorization.\n\n`X-Authorization: Bearer $JWT_TOKEN_VALUE`", + "requestBody": { + "description": "Refresh token request", + "content": { + "application/json": { + "schema": { + "properties": { + "refreshToken": {} + } + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginResponse" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "account-disabled": { + "summary": "Disabled account", + "value": { + "message": "User account is not active", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "bad-credentials": { + "summary": "Bad credentials", + "value": { + "message": "Invalid username or password", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "account-locked": { + "summary": "Locked account", + "value": { + "message": "User account is locked due to security policy", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "token-expired": { + "summary": "JWT token expired", + "value": { + "message": "Token has expired", + "errorCode": 11, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + }, + "authentication-failed": { + "summary": "General authentication error", + "value": { + "message": "Authentication failed", + "errorCode": 10, + "status": 401, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "timestamp": 1747837263599 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "401 ": { + "description": "Unauthorized (**Expired credentials**)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardCredentialsExpiredResponse" + }, + "examples": { + "credentials-expired": { + "summary": "Expired credentials", + "value": { + "status": 401, + "message": "User password expired!", + "errorCode": 15, + "timestamp": 1747837263601, + "subscriptionErrorCode": null, + "subscriptionEntry": null, + "subscriptionValue": null, + "resetToken": "0so9jSEdeoEMiQFxhUvWaBjnDqIjXN" + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/lwm2m/device-credentials{?entityGroupId}": { + "post": { + "tags": [ + "lwm-2m-controller" + ], + "summary": "Save device with credentials (Deprecated)", + "operationId": "saveDeviceWithCredentials", + "parameters": [ + { + "name": "entityGroupId", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": {} + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Device" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/lwm2m/deviceProfile/bootstrap/{isBootstrapServer}": { + "get": { + "tags": [ + "lwm-2m-controller" + ], + "summary": "Get Lwm2m Bootstrap SecurityInfo (getLwm2mBootstrapSecurityInfo)", + "description": "Get the Lwm2m Bootstrap SecurityInfo object (of the current server) based on the provided isBootstrapServer parameter. If isBootstrapServer == true, get the parameters of the current Bootstrap Server. If isBootstrapServer == false, get the parameters of the current Lwm2m Server. Used for client settings when starting the client in Bootstrap mode. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLwm2mBootstrapSecurityInfo", + "parameters": [ + { + "name": "isBootstrapServer", + "in": "path", + "description": "A Boolean value representing the Server SecurityInfo for future Bootstrap client mode settings. Values: 'true' for Bootstrap Server; 'false' for Lwm2m Server. ", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LwM2MServerSecurityConfigDefault" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mail/config/template": { + "get": { + "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.", + "description": "Mail configuration template is set of default smtp settings for mail server that specific provider supports", + "operationId": "getClientRegistrationTemplates_1", + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/bundle/info/{id}": { + "get": { + "tags": [ + "mobile-app-bundle-controller" + ], + "summary": "Get mobile app bundle info by id (getMobileAppBundleInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getMobileAppBundleInfoById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileAppBundleInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/bundle/infos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "mobile-app-bundle-controller" + ], + "summary": "Get mobile app bundle infos (getTenantMobileAppBundleInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantMobileAppBundleInfos", + "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 app'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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataMobileAppBundleInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/bundle/{id}": { + "delete": { + "tags": [ + "mobile-app-bundle-controller" + ], + "summary": "Delete Mobile App Bundle by ID (deleteMobileAppBundle)", + "description": "Deletes Mobile App Bundle by ID. Referencing non-existing mobile app bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteMobileAppBundle", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/bundle/{id}/oauth2Clients": { + "put": { + "tags": [ + "mobile-app-bundle-controller" + ], + "summary": "Update oauth2 clients (updateOauth2Clients)", + "description": "Update oauth2 clients of the specified mobile app bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateOauth2Clients", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/bundle{?oauth2ClientIds}": { + "post": { + "tags": [ + "mobile-app-bundle-controller" + ], + "summary": "Save Or update Mobile app bundle (saveMobileAppBundle)", + "description": "Create or update the Mobile app bundle that represents tha pair of ANDROID and IOS app and mobile settings like oauth2 clients, self-registration and layout configuration.When creating mobile app bundle, platform generates Mobile App Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Bundle Id will be present in the response. Referencing non-existing Mobile App Bundle Id will cause 'Not Found' error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveMobileAppBundle", + "parameters": [ + { + "name": "oauth2ClientIds", + "in": "query", + "description": "A list of oauth2 client ids, separated by comma ','", + "required": false, + "schema": { + "items": {} + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileAppBundle" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileAppBundle" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/app": { + "post": { + "tags": [ + "mobile-app-controller" + ], + "summary": "Save Or update Mobile app (saveMobileApp)", + "description": "Create or update the Mobile app. When creating mobile app, platform generates Mobile App Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Mobile App Id will be present in the response. Specify existing Mobile App Id to update the mobile app. Referencing non-existing Mobile App Id will cause 'Not Found' error.\n\nThe pair of mobile app package name and platform type is unique for entire platform setup.\n\n\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveMobileApp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/app/{id}": { + "get": { + "tags": [ + "mobile-app-controller" + ], + "summary": "Get mobile info by id (getMobileAppInfoById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getMobileAppById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileApp" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "mobile-app-controller" + ], + "summary": "Delete Mobile App by ID (deleteMobileApp)", + "description": "Deletes Mobile App by ID. Referencing non-existing mobile app Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteMobileApp", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/app{?platformType,pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "mobile-app-controller" + ], + "summary": "Get mobile app infos (getTenantMobileAppInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantMobileApps", + "parameters": [ + { + "name": "platformType", + "in": "query", + "description": "Platform type: ANDROID or IOS", + "required": false, + "schema": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } + }, + { + "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 app'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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataMobileApp" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile{?pkgName,platform}": { + "get": { + "tags": [ + "mobile-app-controller" + ], + "summary": "Get user mobile app basic info (getUserMobileInfo)", + "description": "\n\nAvailable for any authorized user. ", + "operationId": "getUserMobileInfo", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile application package name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserMobileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/mobile{?pkgName,platform}": { + "get": { + "tags": [ + "mobile-app-controller" + ], + "summary": "Get mobile app login info (getLoginMobileInfo)", + "operationId": "getLoginMobileInfo", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile application package name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginMobileInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/notification/deliveryMethods": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "Get available delivery methods (getAvailableDeliveryMethods)", + "description": "Returns the list of delivery methods that are properly configured and are allowed to be used for sending notifications.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getAvailableDeliveryMethods", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "WEB", + "EMAIL", + "SMS", + "SLACK", + "MICROSOFT_TEAMS", + "MOBILE_APP" + ] + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/request": { + "post": { + "tags": [ + "notification-controller" + ], + "summary": "Create notification request (createNotificationRequest)", + "description": "Processes notification request.\nMandatory request properties are `targets` (list of targets ids to send notification to), and either `templateId` (existing notification template id) or `template` (to send notification without saving the template).\nOptionally, you can set `sendingDelayInSec` inside the `additionalConfig` field to schedule the notification.\n\nFor each enabled delivery method in the notification template, there must be a target in the `targets` list that supports this delivery method: if you chose `WEB`, `EMAIL` or `SMS` - there must be at least one target in `targets` of `PLATFORM_USERS` type.\nFor `SLACK` delivery method - you need to chose at least one `SLACK` notification target.\n\nNotification request object with `PROCESSING` status will be returned immediately, and the notification sending itself is done asynchronously. After all notifications are sent, the `status` of the request becomes `SENT`. Use `getNotificationRequestById` to see the notification request processing status and some sending stats. \n\nHere is an example of notification request to one target using saved template:\n```json\n{\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"6dbc3670-e4dd-11ed-9401-dbcc5dff78be\"\n },\n \"targets\": [\n \"320e3ed0-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"additionalConfig\": {\n \"sendingDelayInSec\": 0\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "createNotificationRequest", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequest" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/request/preview{?recipientsPreviewSize}": { + "post": { + "tags": [ + "notification-controller" + ], + "summary": "Get notification request preview (getNotificationRequestPreview)", + "description": "Returns preview for notification request.\n\n`processedTemplates` shows how the notifications for each delivery method will look like for the first recipient of the corresponding notification target.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequestPreview", + "parameters": [ + { + "name": "recipientsPreviewSize", + "in": "query", + "description": "Amount of the recipients to show in preview", + "required": false, + "schema": { + "type": "integer", + "format": "int32", + "default": 20 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequestPreview" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/request/{id}": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "Get notification request by id (getNotificationRequestById)", + "description": "Fetches notification request info by request id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequestById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRequestInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "notification-controller" + ], + "summary": "Delete notification request (deleteNotificationRequest)", + "description": "Deletes notification request by its id.\n\nIf the request has status `SENT` - all sent notifications for this request will be deleted. If it is `SCHEDULED`, the request will be cancelled.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationRequest", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/requests{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "Get notification requests (getNotificationRequests)", + "description": "Returns the page of notification requests submitted by users of this tenant or sysadmins.\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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRequests", + "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' filed based on the used template 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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotificationRequestInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/settings": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "Get notification settings (getNotificationSettings)", + "description": "Retrieves notification settings for this tenant or sysadmin.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "notification-controller" + ], + "summary": "Save notification settings (saveNotificationSettings)", + "description": "Saves notification settings for this tenant or sysadmin.\n`deliveryMethodsConfigs` of the settings must be specified.\n\nHere is an example of the notification settings with Slack configuration:\n```json\n{\n \"deliveryMethodsConfigs\": {\n \"SLACK\": {\n \"method\": \"SLACK\",\n \"botToken\": \"xoxb-....\"\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/settings/user": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "getUserNotificationSettings", + "operationId": "getUserNotificationSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotificationSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "notification-controller" + ], + "summary": "saveUserNotificationSettings", + "operationId": "saveUserNotificationSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotificationSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserNotificationSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/{id}": { + "delete": { + "tags": [ + "notification-controller" + ], + "summary": "Delete notification (deleteNotification)", + "description": "Deletes notification by its id.\n\nAvailable for any authorized user. ", + "operationId": "deleteNotification", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/{id}/read": { + "put": { + "tags": [ + "notification-controller" + ], + "summary": "Mark notification as read (markNotificationAsRead)", + "description": "Marks notification as read by its id.\n\nAvailable for any authorized user. ", + "operationId": "markNotificationAsRead", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notifications/read{?deliveryMethod}": { + "put": { + "tags": [ + "notification-controller" + ], + "summary": "Mark all notifications as read (markAllNotificationsAsRead)", + "description": "Marks all unread notifications as read.\n\nAvailable for any authorized user. ", + "operationId": "markAllNotificationsAsRead", + "parameters": [ + { + "name": "deliveryMethod", + "in": "query", + "description": "Delivery method", + "required": false, + "schema": { + "enum": [ + "WEB", + "MOBILE_APP" + ] + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notifications/unread/count{?deliveryMethod}": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "Get unread notifications count (getUnreadNotificationsCount)", + "description": "Returns unread notifications count for chosen delivery method.\n\nAvailable for any authorized user. ", + "operationId": "getUnreadNotificationsCount", + "parameters": [ + { + "name": "deliveryMethod", + "in": "query", + "description": "Delivery method", + "required": false, + "schema": { + "enum": [ + "WEB", + "MOBILE_APP" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notifications{?pageSize,page,textSearch,sortProperty,sortOrder,unreadOnly,deliveryMethod}": { + "get": { + "tags": [ + "notification-controller" + ], + "summary": "Get notifications (getNotifications)", + "description": "Returns the page of notifications for current user.\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 the 'Model' tab of the Response Class for more details. \n\nAvailable for any authorized user. \n\n**WebSocket API**:\n\nThere are 2 types of subscriptions: one for unread notifications count, another for unread notifications themselves.\n\nThe URI for opening WS session for notifications: `/api/ws/plugins/notifications`.\n\nSubscription command for unread notifications count:\n```\n{\n \"unreadCountSubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo subscribe for latest unread notifications:\n```\n{\n \"unreadSubCmd\": {\n \"cmdId\": 1234,\n \"limit\": 10\n }\n}\n```\nTo unsubscribe from any subscription:\n```\n{\n \"unsubCmd\": {\n \"cmdId\": 1234\n }\n}\n```\nTo mark certain notifications as read, use following command:\n```\n{\n \"markAsReadCmd\": {\n \"cmdId\": 1234,\n \"notifications\": [\n \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\",\n \"5b6dfee0-8d0d-11ed-b61f-35a57b03dade\"\n ]\n }\n}\n\n```\nTo mark all notifications as read:\n```\n{\n \"markAllAsReadCmd\": {\n \"cmdId\": 1234\n }\n}\n```\n\n\nUpdate structure for unread **notifications count subscription**:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 55\n}\n```\nFor **notifications subscription**:\n- full update of latest unread notifications:\n```\n{\n \"cmdId\": 1234,\n \"notifications\": [\n {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n ...\n }\n ],\n \"totalUnreadCount\": 1\n}\n```\n- when new notification arrives or shown notification is updated:\n```\n{\n \"cmdId\": 1234,\n \"update\": {\n \"id\": {\n \"entityType\": \"NOTIFICATION\",\n \"id\": \"6f860330-7fc2-11ed-b855-7dd3b7d2faa9\"\n },\n # updated notification info, text, subject etc.\n ...\n },\n \"totalUnreadCount\": 2\n}\n```\n- when unread notifications count changes:\n```\n{\n \"cmdId\": 1234,\n \"totalUnreadCount\": 5\n}\n```", + "operationId": "getNotifications", + "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 notification subject or text", + "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": "unreadOnly", + "in": "query", + "description": "To search for unread notifications only", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "deliveryMethod", + "in": "query", + "description": "Delivery method", + "required": false, + "schema": { + "enum": [ + "WEB", + "MOBILE_APP" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotification" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/rule": { + "post": { + "tags": [ + "notification-rule-controller" + ], + "summary": "Save notification rule (saveNotificationRule)", + "description": "Creates or updates notification rule. \n\nMandatory properties are `name`, `templateId` (of a template with `notificationType` matching to rule's `triggerType`), `triggerType`, `triggerConfig` and `recipientConfig`. Additionally, you may specify rule `description` inside of `additionalConfig`.\n\nTrigger type of the rule cannot be changed. Available trigger types for tenant: `ENTITY_ACTION`, `ALARM`, `ALARM_COMMENT`, `ALARM_ASSIGNMENT`, `DEVICE_ACTIVITY`, `RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT`.\nFor sysadmin, there are following trigger types available: `ENTITIES_LIMIT`, `API_USAGE_LIMIT`, `NEW_PLATFORM_VERSION`.\n\nHere is an example of notification rule to send notification when a device, asset or customer is created or deleted:\n```json\n{\n \"name\": \"Entity action\",\n \"templateId\": {\n \"entityType\": \"NOTIFICATION_TEMPLATE\",\n \"id\": \"32117320-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"triggerType\": \"ENTITY_ACTION\",\n \"triggerConfig\": {\n \"entityTypes\": [\n \"CUSTOMER\",\n \"DEVICE\",\n \"ASSET\"\n ],\n \"created\": true,\n \"updated\": false,\n \"deleted\": true,\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"recipientsConfig\": {\n \"targets\": [\n \"320f2930-d785-11ed-a06c-21dd57dd88ca\"\n ],\n \"triggerType\": \"ENTITY_ACTION\"\n },\n \"additionalConfig\": {\n \"description\": \"Send notification to tenant admins or customer users when a device, asset or customer is created\"\n },\n \"templateName\": \"Entity action notification\",\n \"deliveryMethods\": [\n \"WEB\"\n ]\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationRule", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRule" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRule" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/rule/{id}": { + "get": { + "tags": [ + "notification-rule-controller" + ], + "summary": "Get notification rule by id (getNotificationRuleById)", + "description": "Fetches notification rule info by rule's id.\nIn addition to regular notification rule fields, there are `templateName` and `deliveryMethods` in the response.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRuleById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationRuleInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "notification-rule-controller" + ], + "summary": "Delete notification rule (deleteNotificationRule)", + "description": "Deletes notification rule by id.\nCancels all related scheduled notification requests (e.g. due to escalation table)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationRule", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/rules{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "notification-rule-controller" + ], + "summary": "Get notification rules (getNotificationRules)", + "description": "Returns the page of notification rules.\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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationRules", + "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 rule'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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotificationRuleInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/target": { + "post": { + "tags": [ + "notification-target-controller" + ], + "summary": "Save notification target (saveNotificationTarget)", + "description": "Creates or updates notification target.\n\nAvailable `configuration` types are `PLATFORM_USERS` and `SLACK`.\nFor `PLATFORM_USERS` the `usersFilter` must be specified. For tenant, there are following users filter types available: `USER_LIST`, `CUSTOMER_USERS`, `USER_GROUP_LIST`, `TENANT_ADMINISTRATORS`, `USER_ROLE`, `ALL_USERS`, `ORIGINATOR_ENTITY_OWNER_USERS`, `AFFECTED_USER`.\nFor sysadmin: `TENANT_ADMINISTRATORS`, `AFFECTED_TENANT_ADMINISTRATORS`, `SYSTEM_ADMINISTRATORS`, `ALL_USERS`.\n\nHere is an example of tenant-level notification target to send notification to customer's users:\n```json\n{\n \"name\": \"Users of Customer A\",\n \"configuration\": {\n \"type\": \"PLATFORM_USERS\",\n \"usersFilter\": {\n \"type\": \"CUSTOMER_USERS\",\n \"customerId\": \"32499a20-d785-11ed-a06c-21dd57dd88ca\"\n },\n \"description\": \"Users of Customer A\"\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationTarget", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/target/recipients{?pageSize,page}": { + "post": { + "tags": [ + "notification-target-controller" + ], + "summary": "Get recipients for notification target config (getRecipientsForNotificationTargetConfig)", + "description": "Returns the page of recipients for such notification target configuration.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getRecipientsForNotificationTargetConfig", + "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" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/target/{id}": { + "get": { + "tags": [ + "notification-target-controller" + ], + "summary": "Get notification target by id (getNotificationTargetById)", + "description": "Fetches notification target by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "notification-target-controller" + ], + "summary": "Delete notification target by id (deleteNotificationTargetById)", + "description": "Deletes notification target by its id.\n\nThis target cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationTargetById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/targets{?ids}": { + "get": { + "tags": [ + "notification-target-controller" + ], + "summary": "Get notification targets by ids (getNotificationTargetsByIds)", + "description": "Returns the list of notification targets found by provided ids.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetsByIds", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma-separated list of uuids representing targets ids", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTarget" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/targets{?pageSize,page,textSearch,sortProperty,sortOrder,notificationType}": { + "get": { + "tags": [ + "notification-target-controller" + ], + "summary": "Get notification targets by supported notification type (getNotificationTargetsBySupportedNotificationType)", + "description": "Returns the page of notification targets filtered by notification type that they can be used for.\n\nYou can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargetsBySupportedNotificationType", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "textSearch", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "notificationType", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "GENERAL", + "ALARM", + "DEVICE_ACTIVITY", + "ENTITY_ACTION", + "ALARM_COMMENT", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "ALARM_ASSIGNMENT", + "NEW_PLATFORM_VERSION", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RULE_NODE", + "INTEGRATION_LIFECYCLE_EVENT", + "RATE_LIMITS", + "EDGE_CONNECTION", + "EDGE_COMMUNICATION_FAILURE", + "TASK_PROCESSING_FAILURE", + "USER_ACTIVATED", + "USER_REGISTERED" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotificationTarget" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/targets{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "notification-target-controller" + ], + "summary": "Get notification targets (getNotificationTargets)", + "description": "Returns the page of notification targets owned by sysadmin or tenant.\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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTargets", + "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' filed based on the target'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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotificationTarget" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/slack/conversations{?type,token}": { + "get": { + "tags": [ + "notification-template-controller" + ], + "summary": "List Slack conversations (listSlackConversations)", + "description": "List available Slack conversations by type.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "listSlackConversations", + "parameters": [ + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "DIRECT", + "PUBLIC_CHANNEL", + "PRIVATE_CHANNEL" + ] + } + }, + { + "name": "token", + "in": "query", + "description": "Slack bot token. If absent - system Slack settings will be used", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SlackConversation" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/template": { + "post": { + "tags": [ + "notification-template-controller" + ], + "summary": "Save notification template (saveNotificationTemplate)", + "description": "Creates or updates notification template.\n\nHere is an example of template to send notification via Web, SMS and Slack:\n```json\n{\n \"name\": \"Greetings\",\n \"notificationType\": \"GENERAL\",\n \"configuration\": {\n \"deliveryMethodsTemplates\": {\n \"WEB\": {\n \"enabled\": true,\n \"subject\": \"Greetings\",\n \"body\": \"Hi there, ${recipientTitle}\",\n \"additionalConfig\": {\n \"icon\": {\n \"enabled\": true,\n \"icon\": \"back_hand\",\n \"color\": \"#757575\"\n },\n \"actionButtonConfig\": {\n \"enabled\": false\n }\n },\n \"method\": \"WEB\"\n },\n \"SMS\": {\n \"enabled\": true,\n \"body\": \"Hi there, ${recipientTitle}\",\n \"method\": \"SMS\"\n },\n \"SLACK\": {\n \"enabled\": true,\n \"body\": \"Hi there, @${recipientTitle}\",\n \"method\": \"SLACK\"\n }\n }\n }\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveNotificationTemplate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/template/{id}": { + "get": { + "tags": [ + "notification-template-controller" + ], + "summary": "Get notification template by id (getNotificationTemplateById)", + "description": "Fetches notification template by id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTemplateById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationTemplate" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "notification-template-controller" + ], + "summary": "Delete notification template by id (deleteNotificationTemplateById", + "description": "Deletes notification template by its id.\n\nThis template cannot be referenced by existing scheduled notification requests or any notification rules.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteNotificationTemplateById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/notification/templates{?pageSize,page,textSearch,sortProperty,sortOrder,notificationTypes}": { + "get": { + "tags": [ + "notification-template-controller" + ], + "summary": "Get notification templates (getNotificationTemplates)", + "description": "Returns the page of notification templates owned by sysadmin or tenant.\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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getNotificationTemplates", + "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 template's name and notification type", + "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": "notificationTypes", + "in": "query", + "description": "Comma-separated list of notification types to filter the templates", + "required": false, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataNotificationTemplate" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/oauth2/config/template": { + "get": { + "tags": [ + "o-auth-2-config-template-controller" + ], + "summary": "Get the list of all OAuth2 client registration templates (getClientRegistrationTemplates)\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "getClientRegistrationTemplates", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "o-auth-2-config-template-controller" + ], + "summary": "Create or update OAuth2 client registration template (saveClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "saveClientRegistrationTemplate", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplate" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/oauth2/config/template/{clientRegistrationTemplateId}": { + "delete": { + "tags": [ + "o-auth-2-config-template-controller" + ], + "summary": "Delete OAuth2 client registration template by id (deleteClientRegistrationTemplate)\n\nAvailable for users with 'SYS_ADMIN' authority.", + "description": "Client registration template is OAuth2 provider configuration template with default settings for registering new OAuth2 clients", + "operationId": "deleteClientRegistrationTemplate", + "parameters": [ + { + "name": "clientRegistrationTemplateId", + "in": "path", + "description": "String representation of client registration template id to delete", + "required": true, + "schema": { + "type": "string" + }, + "example": "139b1f81-2f5d-11ec-9dbe-9b627e1a88f4" + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/oauth2Clients{?pkgName,platform}": { + "post": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Get OAuth2 clients (getOAuth2Clients)", + "description": "Get the list of OAuth2 clients to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)", + "operationId": "getOAuth2Clients", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile application package name, to find OAuth2 clients where there is configured mobile application with such package name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type to search OAuth2 clients for which the usage with this platform type is allowed in the settings. If platform type is not one of allowable values - it will just be ignored", + "required": false, + "schema": { + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientLoginInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/oauth2/client": { + "post": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Save OAuth2 Client (saveOAuth2Client)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveOAuth2Client", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2Client" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2Client" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/oauth2/client/infos{?clientIds}": { + "get": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Get OAuth2 Client infos By Ids (findOAuth2ClientInfosByIds)", + "description": "Fetch OAuth2 Client info objects based on the provided ids. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findOAuth2ClientInfosByIds", + "parameters": [ + { + "name": "clientIds", + "in": "query", + "description": "A list of oauth2 ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/oauth2/client/infos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Get OAuth2 Client infos (findOAuth2ClientInfos)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findOAuth2ClientInfos", + "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 client's 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": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataOAuth2ClientInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/oauth2/client/{id}": { + "get": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Get OAuth2 Client by id (getOAuth2ClientById)", + "description": "\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOAuth2ClientById", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuth2Client" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Delete oauth2 client (deleteOauth2Client)", + "description": "Deletes the oauth2 client. Referencing non-existing oauth2 client Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteOauth2Client", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/oauth2/loginProcessingUrl": { + "get": { + "tags": [ + "o-auth-2-controller" + ], + "summary": "Get OAuth2 log in processing URL (getLoginProcessingUrl)", + "description": "Returns the URL enclosed in double quotes. After successful authentication with OAuth2 provider, it makes a redirect to this path so that the platform can do further log in processing. This URL may be configured as 'security.oauth2.loginProcessingUrl' property in yml configuration file, or as 'SECURITY_OAUTH2_LOGIN_PROCESSING_URL' env variable. By default it is '/login/oauth2/code/'\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLoginProcessingUrl", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackage": { + "post": { + "tags": [ + "ota-package-controller" + ], + "summary": "Create Or Update OTA Package Info (saveOtaPackageInfo)", + "description": "Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created OTA Package id will be present in the response. Specify existing OTA Package id to update the OTA Package Info. Referencing non-existing OTA Package Id will cause 'Not Found' error. \n\nOTA Package combination of the title with the version is unique in the scope of tenant. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveOtaPackageInfo", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SaveOtaPackageInfoRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtaPackageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackage/info/{otaPackageId}": { + "get": { + "tags": [ + "ota-package-controller" + ], + "summary": "Get OTA Package Info (getOtaPackageInfoById)", + "description": "Fetch the OTA Package Info object based on the provided OTA Package Id. 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": "getOtaPackageInfoById", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtaPackageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackage/{otaPackageId}": { + "get": { + "tags": [ + "ota-package-controller" + ], + "summary": "Get OTA Package (getOtaPackageById)", + "description": "Fetch the OTA Package object based on the provided OTA Package Id. The server checks that the OTA Package is owned by the same tenant. OTA Package is a heavyweight object that includes main information about the OTA Package and also data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getOtaPackageById", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtaPackage" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "ota-package-controller" + ], + "summary": "Delete OTA Package (deleteOtaPackage)", + "description": "Deletes the OTA Package. Referencing non-existing OTA Package Id will cause an error. Can't delete the OTA Package if it is referenced by existing devices or device profile.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteOtaPackage", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackage/{otaPackageId}/download": { + "get": { + "tags": [ + "ota-package-controller" + ], + "summary": "Download OTA Package (downloadOtaPackage)", + "description": "Download OTA Package based on the provided OTA Package Id.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "downloadOtaPackage", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackage/{otaPackageId}{?checksum,checksumAlgorithm}": { + "post": { + "tags": [ + "ota-package-controller" + ], + "summary": "Save OTA Package data (saveOtaPackageData)", + "description": "Update the OTA Package. Adds the date to the existing OTA Package Info\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveOtaPackageData", + "parameters": [ + { + "name": "otaPackageId", + "in": "path", + "description": "A string value representing the ota package id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "checksum", + "in": "query", + "description": "OTA Package checksum. For example, '0xd87f7e0c'", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "checksumAlgorithm", + "in": "query", + "description": "OTA Package checksum algorithm.", + "required": true, + "schema": { + "enum": [ + "MD5", + "SHA256", + "SHA384", + "SHA512", + "CRC32", + "MURMUR3_32", + "MURMUR3_128" + ] + } + } + ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary", + "description": "OTA Package data." + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OtaPackageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackages/group/{groupId}/{type}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "ota-package-controller" + ], + "summary": "Get group OTA Package Infos (getGroupOtaPackages)", + "description": "Returns a page of OTA Package Info objects owned by tenant, and by 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 the 'Model' tab of the Response Class 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": "getGroupOtaPackages", + "parameters": [ + { + "name": "groupId", + "in": "path", + "description": "A string value representing the Entity Group Id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "path", + "description": "OTA Package type.", + "required": true, + "schema": { + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "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 ota package title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataOtaPackageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackages/{deviceProfileId}/{type}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "ota-package-controller" + ], + "summary": "Get OTA Package Infos (getOtaPackages)", + "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 the 'Model' tab of the Response Class for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackages_1", + "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" + } + }, + { + "name": "type", + "in": "path", + "description": "OTA Package type.", + "required": true, + "schema": { + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + } + }, + { + "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 ota package title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataOtaPackageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/otaPackages{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "ota-package-controller" + ], + "summary": "Get OTA Package Infos (getOtaPackages)", + "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 the 'Model' tab of the Response Class for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getOtaPackages", + "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 ota package title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "type", + "title", + "version", + "tag", + "url", + "fileName", + "dataSize", + "checksum" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataOtaPackageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/owner/CUSTOMER/{ownerId}/{entityType}/{entityId}": { + "post": { + "tags": [ + "owner-controller" + ], + "summary": "Change owner to customer (changeOwnerToCustomer)", + "description": "Tenant/Customer changes Owner to Customer or sub-Customer. Sub-Customer can`t perform this operation! \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "changeOwnerToCustomer", + "parameters": [ + { + "name": "ownerId", + "in": "path", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "An optional list of additional entity group ids", + "items": { + "type": "string" + } + } + } + } + }, + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/qr/deepLink": { + "get": { + "tags": [ + "qr-code-settings-controller" + ], + "summary": "Get the deep link to the associated mobile application (getMobileAppDeepLink)", + "description": "Fetch the url that takes user to linked mobile application \n\nAvailable for any authorized user. ", + "operationId": "getMobileAppDeepLink", + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/qr/merged": { + "get": { + "tags": [ + "qr-code-settings-controller" + ], + "summary": "Get QR code configuration for home page (getMobileAppQrCodeConfig)", + "description": "The response payload contains ui configuration of qr code\n\nAvailable for any authorized user. ", + "operationId": "getMergedMobileAppSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/mobile/qr/settings": { + "get": { + "tags": [ + "qr-code-settings-controller" + ], + "summary": "Get Mobile application settings (getMobileAppSettings)", + "description": "The response payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for any authorized user. ", + "operationId": "getQrCodeSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "qr-code-settings-controller" + ], + "summary": "Create Or Update the Mobile application settings (saveMobileAppSettings)", + "description": "The request payload contains configuration for android/iOS applications and platform qr code widget settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveQrCodeSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QrCodeSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/qr": { + "get": { + "tags": [ + "qr-code-settings-controller" + ], + "summary": "getApplicationRedirect", + "operationId": "getApplicationRedirect", + "parameters": [ + { + "name": "User-Agent", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/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/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/queues/name/{queueName}": { + "get": { + "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", + "parameters": [ + { + "name": "queueName", + "in": "path", + "description": "A string value representing the queue id. For example, 'Main'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/queues/{queueId}": { + "get": { + "tags": [ + "queue-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", + "parameters": [ + { + "name": "queueId", + "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "queue-controller" + ], + "summary": "Delete Queue (deleteQueue)", + "description": "Deletes the Queue. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteQueue", + "parameters": [ + { + "name": "queueId", + "in": "path", + "description": "A string value representing the queue id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/queues{?serviceType,pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueuesByServiceType", + "parameters": [ + { + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "required": true, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "topic" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataQueue" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/queues{?serviceType}": { + "post": { + "tags": [ + "queue-controller" + ], + "summary": "Create Or Update Queue (saveQueue)", + "description": "Create or update the Queue. When creating queue, platform generates Queue Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Specify existing Queue id to update the queue. Referencing non-existing Queue Id will cause 'Not Found' error.\n\nQueue name is unique in the scope of sysadmin. Remove 'id', 'tenantId' from the request body example (below) to create new Queue entity. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveQueue", + "parameters": [ + { + "name": "serviceType", + "in": "query", + "description": "Service type (implemented only for the TB-RULE-ENGINE)", + "required": true, + "schema": { + "enum": [ + "TB-RULE-ENGINE", + "TB-CORE", + "TB-TRANSPORT", + "JS-EXECUTOR" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Queue" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/queueStats/{queueStatsId}": { + "get": { + "tags": [ + "queue-stats-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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueStats" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/queueStats{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantQueueStats", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "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": { + "enum": [ + "createdTime" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataQueueStats" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/queueStats{?queueStatsIds}": { + "get": { + "tags": [ + "queue-stats-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": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/QueueStats" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/report/test{?reportsServerEndpointUrl}": { + "post": { + "tags": [ + "report-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", + "parameters": [ + { + "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/ReportConfig" + } + } + }, + "required": true + }, + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/report/{dashboardId}/download": { + "post": { + "tags": [ + "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" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/role": { + "post": { + "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" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/role/{roleId}": { + "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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Role" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/roles{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "role-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 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": "getRoles", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "minimum": 0 + } + }, + { + "name": "type", + "in": "query", + "description": "Type of the role", + "required": false, + "schema": { + "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": { + "enum": [ + "createdTime", + "name", + "type", + "description" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataRole" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/roles{?roleIds}": { + "get": { + "tags": [ + "role-controller" + ], + "summary": "Get Roles By Ids (getRolesByIds)", + "description": "Returns the list of rows based on their ids. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRolesByIds", + "parameters": [ + { + "name": "roleIds", + "in": "query", + "description": "A list of role ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/rpc/oneway/{deviceId}": { + "post": { + "tags": [ + "rpc-v-1-controller" + ], + "summary": "Send one-way RPC request (handleOneWayDeviceRPCRequest)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequest_1", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/rpc/twoway/{deviceId}": { + "post": { + "tags": [ + "rpc-v-1-controller" + ], + "summary": "Send two-way RPC request (handleTwoWayDeviceRPCRequest)", + "description": "Deprecated. See 'Rpc V 2 Controller' instead.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequest_1", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the RPC request." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rpc/oneway/{deviceId}": { + "post": { + "tags": [ + "rpc-v-2-controller" + ], + "summary": "Send one-way RPC request", + "description": "Sends the one-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is either 200 OK if the message was sent to device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleOneWayDeviceRPCRequest", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "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.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rpc/persistent/device/{deviceId}{?pageSize,page,rpcStatus,textSearch,sortProperty,sortOrder}": { + "get": { + "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", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "page", + "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": { + "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": { + "enum": [ + "createdTime", + "expirationTime", + "request", + "response" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rpc/persistent/{rpcId}": { + "get": { + "tags": [ + "rpc-v-2-controller" + ], + "summary": "Get persistent RPC request", + "description": "Get information about the status of the RPC call.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getPersistedRpc", + "parameters": [ + { + "name": "rpcId", + "in": "path", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Rpc" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "rpc-v-2-controller" + ], + "summary": "Delete persistent RPC", + "description": "Deletes the persistent RPC request.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "deleteRpc", + "parameters": [ + { + "name": "rpcId", + "in": "path", + "description": "A string value representing the rpc id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rpc/twoway/{deviceId}": { + "post": { + "tags": [ + "rpc-v-2-controller" + ], + "summary": "Send two-way RPC request", + "description": "Sends the two-way remote-procedure call (RPC) request to device. Sends the one-way remote-procedure call (RPC) request to device. The RPC call is A JSON that contains the method name ('method'), parameters ('params') and multiple optional fields. See example below. We will review the properties of the RPC call one-by-one below. \n\n```json\n{\n \"method\": \"setGpio\",\n \"params\": {\n \"pin\": 7,\n \"value\": 1\n },\n \"persistent\": false,\n \"timeout\": 5000\n}\n```\n\n### Server-side RPC structure\n\nThe body of server-side RPC request consists of multiple fields:\n\n* **method** - mandatory, name of the method to distinct the RPC calls.\n For example, \"getCurrentTime\" or \"getWeatherForecast\". The value of the parameter is a string.\n* **params** - mandatory, parameters used for processing of the request. The value is a JSON. Leave empty JSON \"{}\" if no parameters needed.\n* **timeout** - optional, value of the processing timeout in milliseconds. The default value is 10000 (10 seconds). The minimum value is 5000 (5 seconds).\n* **expirationTime** - optional, value of the epoch time (in milliseconds, UTC timezone). Overrides **timeout** if present.\n* **persistent** - optional, indicates persistent RPC. The default value is \"false\".\n* **retries** - optional, defines how many times persistent RPC will be re-sent in case of failures on the network and/or device side.\n* **additionalInfo** - optional, defines metadata for the persistent RPC that will be added to the persistent RPC events.\n\n### RPC Result\nIn case of persistent RPC, the result of this call is 'rpcId' UUID. In case of lightweight RPC, the result of this call is the response from device, or 504 Gateway Timeout if device is offline.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "handleTwoWayDeviceRPCRequest", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "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.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to send the RPC request. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "413": { + "description": "Request payload is too large", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "504": { + "description": "Timeout to process the RPC call. Most likely, device is offline.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/ruleChain/{ruleChainId}": { + "post": { + "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", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ruleChainId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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 request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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" + } + }, + { + "name": "ruleChainId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/ruleChains{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class 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": { + "enum": [ + "createdTime", + "name", + "root" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataRuleChain" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain": { + "post": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Create Or Update Rule Chain (saveRuleChain)", + "description": "Create or update the Rule Chain. When creating Rule Chain, platform generates Rule Chain Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Rule Chain Id will be present in the response. Specify existing Rule Chain id to update the rule chain. Referencing non-existing rule chain Id will cause 'Not Found' error.\n\nThe rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.Remove 'id', 'tenantId' from the request body example (below) to create new Rule Chain entity.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChain", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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 request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/autoAssignToEdgeRuleChains": { + "get": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/device/default": { + "post": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Create Default Rule Chain", + "description": "Create rule chain from template, based on the specified name in the request. Creates the rule chain based on the template that is used to create root rule chain. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChain_1", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DefaultRuleChainCreateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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 request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/metadata{?updateRelated}": { + "post": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Update Rule Chain Metadata", + "description": "Updates the rule chain metadata. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "saveRuleChainMetaData", + "parameters": [ + { + "name": "updateRelated", + "in": "query", + "description": "Update related rule nodes.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/tbelEnabled": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/testScript{?scriptLang}": { + "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": "testScript", + "parameters": [ + { + "name": "scriptLang", + "in": "query", + "description": "Script language: JS or TBEL", + "required": false, + "schema": { + "type": "string", + "enum": [ + "JS", + "TBEL" + ] + } + } + ], + "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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}": { + "get": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain object based on the provided Rule Chain Id. The rule chain object is lightweight and contains general information about the rule chain. List of rule nodes and their connection is stored in a separate 'metadata' object.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainById", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/autoAssignToEdge": { + "post": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Set Auto Assign To Edge Rule Chain (setAutoAssignToEdgeRuleChain)", + "description": "Makes the rule chain to be automatically assigned for any new edge that will be created. Does not assign this rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setAutoAssignToEdgeRuleChain", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Unset Auto Assign To Edge Rule Chain (unsetAutoAssignToEdgeRuleChain)", + "description": "Removes the rule chain from the list of rule chains that are going to be automatically assigned for any new edge that will be created. Does not unassign this rule chain for already assigned edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "unsetAutoAssignToEdgeRuleChain", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/edgeTemplateRoot": { + "post": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Set Edge Template Root Rule Chain (setEdgeTemplateRootRuleChain)", + "description": "Makes the rule chain to be root rule chain for any new edge that will be created. Does not update root rule chain for already created edges. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "setEdgeTemplateRootRuleChain", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/metadata": { + "get": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Get Rule Chain (getRuleChainById)", + "description": "Fetch the Rule Chain Metadata object based on the provided Rule Chain Id. The metadata object contains information about the rule nodes and their connections.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChainMetaData", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/output/labels": { + "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", + "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": "array", + "items": { + "type": "string" + }, + "uniqueItems": 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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/output/labels/usage": { + "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", + "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": "array", + "items": { + "$ref": "#/components/schemas/RuleChainOutputLabelsUsage" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChain/{ruleChainId}/root": { + "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", + "parameters": [ + { + "name": "ruleChainId", + "in": "path", + "description": "A string value representing the rule chain id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChain" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChains/export{?limit}": { + "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", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit of rule chains to export.", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChains/import{?overwrite}": { + "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 + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RuleChainData" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RuleChainImportResult" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChains{?pageSize,page,type,textSearch,sortProperty,sortOrder}": { + "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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getRuleChains", + "parameters": [ + { + "name": "pageSize", + "in": "query", + "description": "Maximum amount of entities in a one page", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "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": { + "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": { + "enum": [ + "createdTime", + "name", + "root" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataRuleChain" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleChains{?ruleChainIds}": { + "get": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Get Rule Chains By Ids (getRuleChainsByIds)", + "description": "Requested rule chains must be owned by tenant which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getRuleChainsByIds", + "parameters": [ + { + "name": "ruleChainIds", + "in": "query", + "description": "A list of rule chain ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/ruleNode/{ruleNodeId}/debugIn": { + "get": { + "tags": [ + "rule-chain-controller" + ], + "summary": "Get latest input message (getLatestRuleNodeDebugInput)", + "description": "Gets the input message from the debug events for specified Rule Chain Id. Referencing non-existing rule chain Id will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLatestRuleNodeDebugInput", + "parameters": [ + { + "name": "ruleNodeId", + "in": "path", + "description": "A string value representing the rule node 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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rule-engine/": { + "post": { + "tags": [ + "rule-engine-controller" + ], + "summary": "Push user message to the rule engine (handleRuleEngineRequest)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses current User Id ( the one which credentials is used to perform the request) as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequest_3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rule-engine/{entityType}/{entityId}": { + "post": { + "tags": [ + "rule-engine-controller" + ], + "summary": "Push entity message to the rule engine (handleRuleEngineRequest)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The default timeout of the request processing is 10 seconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequest", + "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" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rule-engine/{entityType}/{entityId}/{queueName}/{timeout}": { + "post": { + "tags": [ + "rule-engine-controller" + ], + "summary": "Push entity message with timeout and specified queue to the rule engine (handleRuleEngineRequest)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. If request sent for Device/Device Profile or Asset/Asset Profile entity, specified queue will be used instead of the queue selected in the device or asset profile. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequest_2", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "entityId", + "in": "path", + "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "queueName", + "in": "path", + "description": "Queue name to process the request in the rule engine", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "timeout", + "in": "path", + "description": "Timeout to process the request in milliseconds", + "required": true, + "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": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/rule-engine/{entityType}/{entityId}/{timeout}": { + "post": { + "tags": [ + "rule-engine-controller" + ], + "summary": "Push entity message with timeout to the rule engine (handleRuleEngineRequest)", + "description": "Creates the Message with type 'REST_API_REQUEST' and payload taken from the request body. Uses specified Entity Id as the Rule Engine message originator. This method allows you to extend the regular platform API with the power of Rule Engine. You may use default and custom rule nodes to handle the message. The generated message contains two important metadata fields:\n\n * **'serviceId'** to identify the platform server that received the request;\n * **'requestUUID'** to identify the request and route possible response from the Rule Engine;\n\nUse **'rest call reply'** rule node to push the reply from rule engine back as a REST API call response. The platform expects the timeout value in milliseconds.\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "handleRuleEngineRequest_1", + "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": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "A JSON value representing the message." + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/allSchedulerEvents": { + "get": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Get All Edge Scheduler Events (getAllSchedulerEvents)", + "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": "getAllSchedulerEvents", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/schedulerEvent/{schedulerEventId}": { + "post": { + "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", + "parameters": [ + { + "name": "edgeId", + "in": "path", + "description": "A string value representing the edge id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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" + } + }, + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/edge/{edgeId}/schedulerEvents{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "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 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": "getEdgeSchedulerEvents", + "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": { + "minimum": 1 + } + }, + { + "name": "page", + "in": "query", + "description": "Sequence number of page starting from 0", + "required": true, + "schema": { + "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": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataSchedulerEventInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/schedulerEvent": { + "post": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Save Scheduler Event (saveSchedulerEvent)", + "description": "Creates or Updates scheduler event. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. When creating scheduler event, platform generates scheduler event Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created scheduler event id will be present in the response. Specify existing scheduler event id to update the scheduler event. Referencing non-existing scheduler event Id will cause 'Not Found' error. Remove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new Scheduler Event entity. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveSchedulerEvent", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/schedulerEvent/info/{schedulerEventId}": { + "get": { + "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", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/schedulerEvent/{schedulerEventId}": { + "get": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Get Scheduler Event (getSchedulerEventById)", + "description": "Fetch the SchedulerEvent object based on the provided scheduler event Id. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. Referencing non-existing Scheduler Event Id will cause 'Not Found' error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventById", + "parameters": [ + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "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", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/schedulerEvent/{schedulerEventId}/enabled/{enabledValue}": { + "put": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Enable or disable Scheduler Event (enableSchedulerEvent)", + "description": "Updates scheduler event with enabled = true/false. Scheduler Event extends Scheduler Event Info object and adds 'configuration' - a JSON structure of scheduler event configuration. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "enableSchedulerEvent", + "parameters": [ + { + "name": "schedulerEventId", + "in": "path", + "description": "A string value representing the scheduler id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "enabledValue", + "in": "path", + "description": "Enabled or disabled scheduler", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SchedulerEvent" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/schedulerEvents{?schedulerEventIds}": { + "get": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Get Scheduler Events By Ids (getSchedulerEventsByIds)", + "description": "Requested scheduler events must be owned by tenant or assigned to customer which user is performing the request. Scheduler Events allows you to schedule various types of events with flexible schedule configuration. Scheduler fires configured scheduler events according to their schedule. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSchedulerEventsByIds", + "parameters": [ + { + "name": "schedulerEventIds", + "in": "query", + "description": "A list of scheduler event ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/schedulerEvents{?type}": { + "get": { + "tags": [ + "scheduler-event-controller" + ], + "summary": "Get Scheduler Events By Type (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\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": "type", + "in": "query", + "description": "A string value representing the scheduler type. For example, 'generateReport'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulerEventWithCustomerInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/selfRegistration/privacyPolicy{?pkgName,platform}": { + "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": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/selfRegistration/signUpSelfRegistrationParams{?pkgName,platformType}": { + "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": [ + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platformType", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/selfRegistration/termsOfUse{?pkgName,platform}": { + "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": [ + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "required": false, + "schema": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/selfRegistration/selfRegistrationParams": { + "get": { + "tags": [ + "self-registration-controller" + ], + "summary": "Get Self Registration parameters (getSelfRegistrationParams)", + "description": "Fetch the Self Registration parameters object for the tenant of the current user. \n\nAvailable for users with 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getWebSelfRegistrationParams", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/MobileSelfRegistrationParams" + }, + { + "$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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "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/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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "self-registration-controller" + ], + "summary": "deleteWebSelfRegistrationParams", + "operationId": "deleteWebSelfRegistrationParams", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/activateByEmailCode{?emailCode,pkgName,platform}": { + "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", + "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": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/activateEmail{?emailCode,pkgName,platform}": { + "get": { + "tags": [ + "sign-up-controller" + ], + "summary": "Activate User using code from Email (activateEmail)", + "description": "Activate the user using code(link) from the activation email. Validates the code an redirects according to the signup flow. Checks that user was not activated yet.", + "operationId": "activateEmail", + "parameters": [ + { + "name": "emailCode", + "in": "query", + "description": "Activation token.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pkgName", + "in": "query", + "description": "Optional package name of the mobile application.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/cloud/activateByEmailCode{?emailCode,pkgName,platform}": { + "post": { + "tags": [ + "sign-up-controller" + ], + "summary": "activateCloudUserByEmailCode", + "operationId": "activateCloudUserByEmailCode", + "parameters": [ + { + "name": "emailCode", + "in": "query", + "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": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/cloud/activateEmail{?emailCode,pkgName,platform}": { + "get": { + "tags": [ + "sign-up-controller" + ], + "summary": "activateCloudEmail", + "operationId": "activateCloudEmail", + "parameters": [ + { + "name": "emailCode", + "in": "query", + "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": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/cloud/login{?pkgName,platform}": { + "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", + "parameters": [ + { + "name": "pkgName", + "in": "query", + "description": "Mobile app package name. Used to identify the application and build the redirect link.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/cloud/resendEmailActivation{?email,pkgName,platform}": { + "post": { + "tags": [ + "sign-up-controller" + ], + "summary": "resendCloudEmailActivation", + "operationId": "resendCloudEmailActivation", + "parameters": [ + { + "name": "email", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "pkgName", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": false, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/login{?pkgName,platform}": { + "get": { + "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" + } + }, + { + "name": "platform", + "in": "query", + "description": "Platform type", + "required": true, + "schema": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/resendEmailActivation{?email,pkgName,platform}": { + "post": { + "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" + }, + { + "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": { + "enum": [ + "ANDROID", + "IOS" + ] + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/signup": { + "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 + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "enum": [ + "SUCCESS", + "INACTIVE_USER_EXISTS" + ] + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/noauth/signup/recaptchaParams": { + "get": { + "tags": [ + "sign-up-controller" + ], + "summary": "getRecaptchaParams", + "operationId": "getRecaptchaParams", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CaptchaClientParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/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", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/signup/acceptPrivacyPolicyAndTermsOfUse": { + "post": { + "tags": [ + "sign-up-controller" + ], + "summary": "acceptPrivacyPolicyAndTermsOfUse", + "operationId": "acceptPrivacyPolicyAndTermsOfUse", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/signup/acceptTermsOfUse": { + "post": { + "tags": [ + "sign-up-controller" + ], + "summary": "Accept Terms of Use (acceptTermsOfUse)", + "description": "Accept Terms of Use by the current user.", + "operationId": "acceptTermsOfUse", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/signup/displayWelcome": { + "get": { + "tags": [ + "sign-up-controller" + ], + "summary": "isDisplayWelcome", + "operationId": "isDisplayWelcome", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/signup/notDisplayWelcome": { + "post": { + "tags": [ + "sign-up-controller" + ], + "summary": "setNotDisplayWelcome", + "operationId": "setNotDisplayWelcome", + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/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": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/signup/termsOfUseAccepted": { + "get": { + "tags": [ + "sign-up-controller" + ], + "summary": "Check Terms Of User (termsOfUseAccepted)", + "description": "Checks that current user accepted the privacy policy.", + "operationId": "termsOfUseAccepted", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/solutions/templates/details/{solutionTemplateId}": { + "get": { + "tags": [ + "solution-controller" + ], + "summary": "Get Solution template details (getSolutionTemplateDetails)", + "description": "Get a solution template details based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateDetails", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSolutionTemplateDetails" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/solutions/templates/infos": { + "get": { + "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", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSolutionTemplateInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/solutions/templates/instructions/{solutionTemplateId}": { + "get": { + "tags": [ + "solution-controller" + ], + "summary": "Get Solution Template Instructions (getSolutionTemplateInstructions)", + "description": "Get a solution template instructions based on the provided id\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getSolutionTemplateInstructions", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSolutionTemplateInstructions" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/solutions/templates/{solutionTemplateId}/delete": { + "delete": { + "tags": [ + "solution-controller" + ], + "summary": "Uninstall Solution Template (uninstallSolutionTemplate)", + "description": "Uninstall solution template based on the provided id\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "uninstallSolutionTemplate", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/solutions/templates/{solutionTemplateId}/install": { + "post": { + "tags": [ + "solution-controller" + ], + "summary": "Install Solution Template (installSolutionTemplate)", + "description": "Install solution template based on the provided id\n\n Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "installSolutionTemplate", + "parameters": [ + { + "name": "solutionTemplateId", + "in": "path", + "description": "A string value representing the solution template id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SolutionInstallResponse" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/subscription/data": { + "get": { + "tags": [ + "subscription-controller" + ], + "summary": "getTenantProfileData", + "operationId": "getTenantProfileData", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantProfileData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/subscription/usage": { + "get": { + "tags": [ + "subscription-controller" + ], + "summary": "getTenantSubscriptionUsage", + "operationId": "getTenantSubscriptionUsage", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionUsage" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfile/{tenantProfileId}/data": { + "get": { + "tags": [ + "subscription-controller" + ], + "summary": "getTenantProfileDataById", + "operationId": "getTenantProfileDataById", + "parameters": [ + { + "name": "tenantProfileId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantProfileData" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource": { + "post": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Create Or Update Resource (saveResource)", + "description": "Create or update the Resource. When creating the Resource, platform generates Resource id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Resource id will be present in the response. Specify existing Resource id to update the Resource. Referencing non-existing Resource Id will cause 'Not Found' error. \n\nResource combination of the title with the key is unique in the scope of tenant. Remove 'id', 'tenantId' from the request body example (below) to create new Resource entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveResource", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResource" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/info/{resourceId}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get Resource Info (getResourceInfoById)", + "description": "Fetch the Resource Info object based on the provided Resource Id. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceInfoById", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/jks/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download JKS Resource (downloadJksResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadJksResourceIfChanged", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/x-java-keystore": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/js/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download JS Resource (downloadJsResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for any authorized user. ", + "operationId": "downloadJsResourceIfChanged", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/javascript": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/lwm2m/page{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get LwM2M Objects (getLwm2mListObjectsPage)", + "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLwm2mListObjectsPage", + "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 resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "id", + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2mObject" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/lwm2m/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download LWM2M Resource (downloadLwm2mResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadLwm2mResourceIfChanged", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/xml": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/lwm2m{?sortOrder,sortProperty,objectIds}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get LwM2M Objects (getLwm2mListObjects)", + "description": "Returns a page of LwM2M objects parsed from Resources with type 'LWM2M_MODEL' owned by tenant or sysadmin. You can specify parameters to filter the results. LwM2M Object is a object that includes information about the LwM2M model which can be used in transport configuration for the LwM2M device profile. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getLwm2mListObjects", + "parameters": [ + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": true, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": true, + "schema": { + "enum": [ + "id", + "name" + ] + } + }, + { + "name": "objectIds", + "in": "query", + "description": "LwM2M Object ids.", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2mObject" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/pkcs12/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download PKCS_12 Resource (downloadPkcs12ResourceIfChanged)", + "description": "Download Resource based on the provided Resource Id or return 304 status code if resource was not changed.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadPkcs12ResourceIfChanged", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/x-pkcs12": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/tenant{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get All Resource Infos (getAllResources)", + "description": "Returns a page of Resource Info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "getTenantResources", + "parameters": [ + { + "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 resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/{resourceId}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get Resource (getResourceById)", + "description": "Fetch the Resource object based on the provided Resource Id. Resource is a heavyweight object that includes main information about the Resource and also data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceById", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResource" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/{resourceId}/download": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download Resource (downloadResource)", + "description": "Download Resource based on the provided Resource Id.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "downloadResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/{resourceId}{?force}": { + "delete": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Delete Resource (deleteResource)", + "description": "Deletes the Resource. Referencing non-existing Resource Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteResource", + "parameters": [ + { + "name": "resourceId", + "in": "path", + "description": "A string value representing the resource id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "force", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceDeleteResult" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/{resourceType}/{scope}/{key}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Download resource (downloadResource)", + "description": "Download resource with a given type and key for the given scope\n\nAvailable for any authorized user. ", + "operationId": "downloadResourceIfChanged", + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "enum": [ + "lwm2m_model", + "jks", + "pkcs_12", + "js_module", + "dashboard" + ] + } + }, + { + "name": "scope", + "in": "path", + "description": "Scope of the resource", + "required": true, + "schema": { + "enum": [ + "system", + "tenant" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the resource, e.g. 'extension.js'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource/{resourceType}/{scope}/{key}/info": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get resource info (getResourceInfo)", + "description": "Get info for the resource with the given type, scope and key. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResourceInfo", + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "enum": [ + "lwm2m_model", + "jks", + "pkcs_12", + "js_module", + "dashboard" + ] + } + }, + { + "name": "scope", + "in": "path", + "description": "Scope of the resource", + "required": true, + "schema": { + "enum": [ + "system", + "tenant" + ] + } + }, + { + "name": "key", + "in": "path", + "description": "Key of the resource, e.g. 'extension.js'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/resource{?pageSize,page,resourceType,resourceSubType,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tb-resource-controller" + ], + "summary": "Get Resource Infos (getResources)", + "description": "Returns a page of Resource Info objects owned by tenant or sysadmin. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Resource Info is a lightweight object that includes main information about the Resource excluding the heavyweight data. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getResources", + "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": "resourceType", + "in": "query", + "description": "A string value representing the resource type.", + "required": false, + "schema": { + "enum": [ + "LWM2M_MODEL", + "JKS", + "PKCS_12", + "JS_MODULE" + ] + } + }, + { + "name": "resourceSubType", + "in": "query", + "description": "A string value representing the resource sub-type.", + "required": false, + "schema": { + "enum": [ + "EXTENSION", + "MODULE" + ] + } + }, + { + "name": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the resource title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "resourceType", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTbResourceInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{deviceId}/{scope}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save device attributes (saveDeviceAttributes)", + "description": "Creates or updates the device attributes based on device id and specified attribute scope. The request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\n\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveDeviceAttributes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + } + } + ], + "requestBody": { + "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Attribute from the request was created or updated. Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request or invalid attributes scope provided.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to save device attributes for selected device. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about device attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{deviceId}/{scope}{?keys}": { + "delete": { + "tags": [ + "telemetry-controller" + ], + "summary": "Delete device attributes (deleteDeviceAttributes)", + "description": "Delete device attributes using provided Device Id, scope and a list of keys. Referencing a non-existing Device Id will cause an error\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteDeviceAttributes", + "parameters": [ + { + "name": "deviceId", + "in": "path", + "description": "A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + }, + { + "name": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device attributes was removed for the selected keys in the request. Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Platform returns a bad request in case if keys or scope are not specified.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to delete device attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about device attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/attributes/{scope}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save entity attributes (saveEntityAttributesV2)", + "description": "Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: \n\n * SERVER_SCOPE - supported for all entity types;\n * SHARED_SCOPE - supported for devices.\n\nThe request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityAttributesV2", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + } + } + ], + "requestBody": { + "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Attribute from the request was created or updated. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request or invalid attributes scope provided.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to save entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/keys/attributes": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get all attribute keys (getAttributeKeys)", + "description": "Returns a set of unique attribute key names for the selected entity. The response will include merged key names set for all attribute scopes:\n\n * SERVER_SCOPE - supported for all entity types;\n * CLIENT_SCOPE - supported for devices;\n * SHARED_SCOPE - supported for devices. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAttributeKeys", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/keys/attributes/{scope}": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get all attribute keys by scope (getAttributeKeysByScope)", + "description": "Returns a set of unique attribute key names for the selected entity and attributes scope: \n\n * SERVER_SCOPE - supported for all entity types;\n * CLIENT_SCOPE - supported for devices;\n * SHARED_SCOPE - supported for devices. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAttributeKeysByScope", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/keys/timeseries": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get time series keys (getTimeseriesKeys)", + "description": "Returns a set of unique time series key names for the selected entity. \n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getTimeseriesKeys", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/timeseries/delete{?keys,deleteAllDataForKeys,startTs,endTs,deleteLatest,rewriteLatestIfDeleted}": { + "delete": { + "tags": [ + "telemetry-controller" + ], + "summary": "Delete entity time series data (deleteEntityTimeseries)", + "description": "Delete time series for selected entity based on entity id, entity type and keys. Use 'deleteAllDataForKeys' to delete all time series data. Use 'startTs' and 'endTs' to specify time-range instead. Use 'deleteLatest' to delete latest value (stored in separate table for performance) if the value's timestamp matches the time-range. Use 'rewriteLatestIfDeleted' to rewrite latest value (stored in separate table for performance) if the value's timestamp matches the time-range and 'deleteLatest' param is true. The replacement value will be fetched from the 'time series' table, and its timestamp will be the most recent one before the defined time-range. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteEntityTimeseries", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of telemetry keys. If keys are not selected, the result will return all latest time series. For example, 'temperature,humidity'.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "deleteAllDataForKeys", + "in": "query", + "description": "A boolean value to specify if should be deleted all data for selected keys or only data that are in the selected time range.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "startTs", + "in": "query", + "description": "A long value representing the start timestamp of removal time range in milliseconds.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTs", + "in": "query", + "description": "A long value representing the end timestamp of removal time range in milliseconds.", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "deleteLatest", + "in": "query", + "description": "If the parameter is set to true, the latest telemetry can be removed, otherwise, in case that parameter is set to false the latest value will not removed.", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "rewriteLatestIfDeleted", + "in": "query", + "description": "If the parameter is set to true, the latest telemetry will be rewritten in case that current latest value was removed, otherwise, in case that parameter is set to false the new latest value will not set.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "Time series for the selected keys in the request was removed. Platform creates an audit log event about entity time series removal with action type 'TIMESERIES_DELETED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Platform returns a bad request in case if keys list is empty or start and end timestamp values is empty when deleteAllDataForKeys is set to false.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to delete entity time series for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity time series removal with action type 'TIMESERIES_DELETED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/timeseries/{scope}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save or update time series data (saveEntityTelemetry)", + "description": "Creates or updates the entity time series data based on the Entity Id and request payload.The request payload is a JSON document with three possible formats:\n\nSimple format without timestamp. In such a case, current server time will be used: \n\n```json\n{\"temperature\": 26}\n```\n\n Single JSON object with timestamp: \n\n```json\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}\n```\n\n JSON array with timestamps: \n\n```json\n[{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}]\n```\n\n The scope parameter is not used in the API call implementation but should be specified whatever value because it is used as a path variable. Referencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityTelemetry", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "Value is deprecated, reserved for backward compatibility and not used in the API call implementation. Specify any scope for compatibility", + "required": true, + "schema": { + "enum": [ + "ANY" + ] + } + } + ], + "requestBody": { + "description": "A JSON with the telemetry values. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Time series from the request was created or updated. Platform creates an audit log event about entity time series updates with action type 'TIMESERIES_UPDATED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to save entity time series for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity time series updates with action type 'TIMESERIES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/timeseries/{scope}/{ttl}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save or update time series data with TTL (saveEntityTelemetryWithTTL)", + "description": "Creates or updates the entity time series data based on the Entity Id and request payload.The request payload is a JSON document with three possible formats:\n\nSimple format without timestamp. In such a case, current server time will be used: \n\n```json\n{\"temperature\": 26}\n```\n\n Single JSON object with timestamp: \n\n```json\n{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}\n```\n\n JSON array with timestamps: \n\n```json\n[{\"ts\":1634712287000,\"values\":{\"temperature\":26, \"humidity\":87}}, {\"ts\":1634712588000,\"values\":{\"temperature\":25, \"humidity\":88}}]\n```\n\n The scope parameter is not used in the API call implementation but should be specified whatever value because it is used as a path variable. \n\nThe ttl parameter takes affect only in case of Cassandra DB.Referencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityTelemetryWithTTL", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "Value is deprecated, reserved for backward compatibility and not used in the API call implementation. Specify any scope for compatibility", + "required": true, + "schema": { + "enum": [ + "ANY" + ] + } + }, + { + "name": "ttl", + "in": "path", + "description": "A long value representing TTL (Time to Live) parameter.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "A JSON with the telemetry values. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Time series from the request was created or updated. Platform creates an audit log event about entity time series updates with action type 'TIMESERIES_UPDATED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to save entity time series for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity time series updates with action type 'TIMESERIES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/values/attributes/{scope}{?keys}": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get attributes by scope (getAttributesByScope)", + "description": "Returns all attributes of a specified scope that belong to specified entity. List of possible attribute scopes depends on the entity type: \n\n * SERVER_SCOPE - supported for all entity types;\n * SHARED_SCOPE - supported for devices;\n * CLIENT_SCOPE - supported for devices. \n\nUse optional 'keys' parameter to return specific attributes.\n Example of the result: \n\n```json\n[\n {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000},\n {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001},\n {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002},\n {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003},\n {\"key\": \"jsonKeyExample\",\n \"value\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n },\n \"lastUpdateTs\": 1609459200004\n }\n]\n```\n\n Referencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAttributesByScope", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + }, + { + "name": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/values/attributes{?keys}": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get attributes (getAttributes)", + "description": "Returns all attributes that belong to specified entity. Use optional 'keys' parameter to return specific attributes.\n Example of the result: \n\n```json\n[\n {\"key\": \"stringAttributeKey\", \"value\": \"value\", \"lastUpdateTs\": 1609459200000},\n {\"key\": \"booleanAttributeKey\", \"value\": false, \"lastUpdateTs\": 1609459200001},\n {\"key\": \"doubleAttributeKey\", \"value\": 42.2, \"lastUpdateTs\": 1609459200002},\n {\"key\": \"longKeyExample\", \"value\": 73, \"lastUpdateTs\": 1609459200003},\n {\"key\": \"jsonKeyExample\",\n \"value\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n },\n \"lastUpdateTs\": 1609459200004\n }\n]\n```\n\n Referencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getAttributes", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'.", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/values/timeseries{?keys,startTs,endTs,intervalType,interval,timeZone,limit,agg,orderBy,useStrictDataTypes}": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get time series data (getTimeseries)", + "description": "Returns a range of time series values for specified entity. Returns not aggregated data by default. Use aggregation function ('agg') and aggregation interval ('interval') to enable aggregation of the results on the database / server side. The aggregation is generally more efficient then fetching all records. \n\n```json\n{\n \"temperature\": [\n {\n \"value\": 36.7,\n \"ts\": 1609459200000\n },\n {\n \"value\": 36.6,\n \"ts\": 1609459201000\n }\n ]\n}\n```\n\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getTimeseries", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of telemetry keys.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "startTs", + "in": "query", + "description": "A long value representing the start timestamp of the time range in milliseconds, UTC.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "endTs", + "in": "query", + "description": "A long value representing the end timestamp of the time range in milliseconds, UTC.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "intervalType", + "in": "query", + "description": "A string value representing the type fo the interval.", + "required": false, + "schema": { + "enum": [ + "MILLISECONDS", + "WEEK", + "WEEK_ISO", + "MONTH", + "QUARTER" + ] + } + }, + { + "name": "interval", + "in": "query", + "description": "A long value representing the aggregation interval range in milliseconds.", + "required": false, + "schema": { + "type": "integer", + "format": "int64", + "default": 0 + } + }, + { + "name": "timeZone", + "in": "query", + "description": "A string value representing the timezone that will be used to calculate exact timestamps for 'WEEK', 'WEEK_ISO', 'MONTH' and 'QUARTER' interval types.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "An integer value that represents a max number of time series data points to fetch. This parameter is used only in the case if 'agg' parameter is set to 'NONE'.", + "required": false, + "schema": { + "default": "100" + } + }, + { + "name": "agg", + "in": "query", + "description": "A string value representing the aggregation function. If the interval is not specified, 'agg' parameter will use 'NONE' value.", + "required": false, + "schema": { + "enum": [ + "MIN", + "MAX", + "AVG", + "SUM", + "COUNT", + "NONE" + ] + } + }, + { + "name": "orderBy", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "useStrictDataTypes", + "in": "query", + "description": "Enables/disables conversion of telemetry values to strings. Conversion is enabled by default. Set parameter to 'true' in order to disable the conversion.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/values/timeseries{?keys,useStrictDataTypes}": { + "get": { + "tags": [ + "telemetry-controller" + ], + "summary": "Get latest time series value (getLatestTimeseries)", + "description": "Returns all time series that belong to specified entity. Use optional 'keys' parameter to return specific time series. The result is a JSON object. The format of the values depends on the 'useStrictDataTypes' parameter. By default, all time series values are converted to strings: \n\n```json\n{\n \"stringTsKey\": [{ \"value\": \"value\", \"ts\": 1609459200000}],\n \"booleanTsKey\": [{ \"value\": \"false\", \"ts\": 1609459200000}],\n \"doubleTsKey\": [{ \"value\": \"42.2\", \"ts\": 1609459200000}],\n \"longTsKey\": [{ \"value\": \"73\", \"ts\": 1609459200000}],\n \"jsonTsKey\": [{ \"value\": \"{\\\"someNumber\\\": 42,\\\"someArray\\\": [1,2,3],\\\"someNestedObject\\\": {\\\"key\\\": \\\"value\\\"}}\", \"ts\": 1609459200000}]\n}\n\n```\n\n However, it is possible to request the values without conversion ('useStrictDataTypes'=true): \n\n```json\n{\n \"stringTsKey\": [{ \"value\": \"value\", \"ts\": 1609459200000}],\n \"booleanTsKey\": [{ \"value\": false, \"ts\": 1609459200000}],\n \"doubleTsKey\": [{ \"value\": 42.2, \"ts\": 1609459200000}],\n \"longTsKey\": [{ \"value\": 73, \"ts\": 1609459200000}],\n \"jsonTsKey\": [{ \n \"value\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }, \n \"ts\": 1609459200000}]\n}\n\n```\n\n Referencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getLatestTimeseries", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of telemetry keys. If keys are not selected, the result will return all latest time series. For example, 'temperature,humidity'.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "useStrictDataTypes", + "in": "query", + "description": "Enables/disables conversion of telemetry values to strings. Conversion is enabled by default. Set parameter to 'true' in order to disable the conversion.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/{scope}": { + "post": { + "tags": [ + "telemetry-controller" + ], + "summary": "Save entity attributes (saveEntityAttributesV1)", + "description": "Creates or updates the entity attributes based on Entity Id and the specified attribute scope. List of possible attribute scopes depends on the entity type: \n\n * SERVER_SCOPE - supported for all entity types;\n * SHARED_SCOPE - supported for devices.\n\nThe request payload is a JSON object with key-value format of attributes to create or update. For example:\n\n```json\n{\n \"stringKey\":\"value1\", \n \"booleanKey\":true, \n \"doubleKey\":42.0, \n \"longKey\":73, \n \"jsonKey\": {\n \"someNumber\": 42,\n \"someArray\": [1,2,3],\n \"someNestedObject\": {\"key\": \"value\"}\n }\n}\n```\nReferencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "saveEntityAttributesV1", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + } + } + ], + "requestBody": { + "description": "A string value representing the json object. For example, '{\"key\":\"value\"}'. See API call description for more details.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Attribute from the request was created or updated. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED', and also sends event msg to the rule engine with msg type 'ATTRIBUTES_UPDATED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Invalid structure of the request or invalid attributes scope provided.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to save entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity attributes updates with action type 'ATTRIBUTES_UPDATED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/plugins/telemetry/{entityType}/{entityId}/{scope}{?keys}": { + "delete": { + "tags": [ + "telemetry-controller" + ], + "summary": "Delete entity attributes (deleteEntityAttributes)", + "description": "Delete entity attributes using provided Entity Id, scope and a list of keys. Referencing a non-existing entity Id or invalid entity type will cause an error. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "deleteEntityAttributes", + "parameters": [ + { + "name": "entityType", + "in": "path", + "description": "A string value representing the entity type. For example, 'DEVICE'", + "required": true, + "schema": { + "default": "DEVICE" + } + }, + { + "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": "scope", + "in": "path", + "description": "A string value representing the attributes scope. For example, 'SERVER_SCOPE'.", + "required": true, + "schema": { + "enum": [ + "SERVER_SCOPE", + "SHARED_SCOPE", + "CLIENT_SCOPE" + ] + } + }, + { + "name": "keys", + "in": "query", + "description": "A string value representing the comma-separated list of attributes keys. For example, 'active,inactivityAlarmTime'.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Entity attributes was removed for the selected keys in the request. Platform creates an audit log event about entity attributes removal with action type 'ATTRIBUTES_DELETED'.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "400": { + "description": "Platform returns a bad request in case if keys or scope are not specified.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "401": { + "description": "User is not authorized to delete entity attributes for selected entity. Most likely, User belongs to different Customer or Tenant.", + "content": { + "application/json": { + "schema": {} + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "500": { + "description": "The exception was thrown during processing the request. Platform creates an audit log event about entity attributes removal with action type 'ATTRIBUTES_DELETED' that includes an error stacktrace.", + "content": { + "application/json": { + "schema": {} + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant": { + "post": { + "tags": [ + "tenant-controller" + ], + "summary": "Create Or update Tenant (saveTenant)", + "description": "Create or update the Tenant. When creating tenant, platform generates Tenant Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). Default Rule Chain and Device profile are also generated for the new tenants automatically. The newly created Tenant Id will be present in the response. Specify existing Tenant Id id to update the Tenant. Referencing non-existing Tenant Id will cause 'Not Found' error.Remove 'id', 'tenantId' from the request body example (below) to create new Tenant entity.\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveTenant", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/info/{tenantId}": { + "get": { + "tags": [ + "tenant-controller" + ], + "summary": "Get Tenant Info (getTenantInfoById)", + "description": "Fetch the Tenant Info object based on the provided Tenant Id. The Tenant Info object extends regular Tenant object and includes Tenant Profile name. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantInfoById", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/{tenantId}": { + "get": { + "tags": [ + "tenant-controller" + ], + "summary": "Get Tenant (getTenantById)", + "description": "Fetch the Tenant object based on the provided Tenant Id. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getTenantById", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Tenant" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "tenant-controller" + ], + "summary": "Delete Tenant (deleteTenant)", + "description": "Deletes the tenant, it's customers, rule chains, devices and all other related entities. Referencing non-existing tenant Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteTenant", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantInfos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tenant-controller" + ], + "summary": "Get Tenants Info (getTenants)", + "description": "Returns a page of tenant info objects registered in the platform. The Tenant Info object extends regular Tenant object and includes Tenant Profile 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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantInfos", + "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 tenant name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "tenantProfileName", + "title", + "email", + "country", + "state", + "city", + "address", + "address2", + "zip", + "phone", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTenantInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenants{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tenant-controller" + ], + "summary": "Get Tenants (getTenants)", + "description": "Returns a page of tenants 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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenants", + "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 tenant name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "email", + "country", + "state", + "city", + "address", + "address2", + "zip", + "phone", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTenant" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenants{?tenantIds}": { + "get": { + "tags": [ + "tenant-controller" + ], + "summary": "getTenantsByIds", + "operationId": "getTenantsByIds", + "parameters": [ + { + "name": "tenantIds", + "in": "query", + "description": "A list of tenant ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tenant" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfile": { + "post": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Create Or update Tenant Profile (saveTenantProfile)", + "description": "Create or update the Tenant Profile. When creating tenant profile, platform generates Tenant Profile Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Tenant Profile Id will be present in the response. Specify existing Tenant Profile Id id to update the Tenant Profile. Referencing non-existing Tenant Profile Id will cause 'Not Found' error. \n\nUpdate of the tenant profile configuration will cause immediate recalculation of API limits for all affected Tenants. \n\nThe **'profileData'** object is the part of Tenant Profile that defines API limits and Rate limits. \n\nYou have an ability to define maximum number of devices ('maxDevice'), assets ('maxAssets') and other entities. You may also define maximum number of messages to be processed per month ('maxTransportMessages', 'maxREExecutions', etc). The '*RateLimit' defines the rate limits using simple syntax. For example, '1000:1,20000:60' means up to 1000 events per second but no more than 20000 event per minute. Let's review the example of tenant profile data below: \n\n```json\n{\n \"name\": \"Your name\",\n \"description\": \"Your description\",\n \"isolatedTbRuleEngine\": false,\n \"profileData\": {\n \"configuration\": {\n \"type\": \"DEFAULT\",\n \"maxDevices\": 0,\n \"maxAssets\": 0,\n \"maxCustomers\": 0,\n \"maxUsers\": 0,\n \"maxDashboards\": 0,\n \"maxRuleChains\": 0,\n \"maxResourcesInBytes\": 0,\n \"maxOtaPackagesInBytes\": 0,\n \"maxResourceSize\": 0,\n \"transportTenantMsgRateLimit\": \"1000:1,20000:60\",\n \"transportTenantTelemetryMsgRateLimit\": \"1000:1,20000:60\",\n \"transportTenantTelemetryDataPointsRateLimit\": \"1000:1,20000:60\",\n \"transportDeviceMsgRateLimit\": \"20:1,600:60\",\n \"transportDeviceTelemetryMsgRateLimit\": \"20:1,600:60\",\n \"transportDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\",\n \"transportGatewayMsgRateLimit\": \"20:1,600:60\",\n \"transportGatewayTelemetryMsgRateLimit\": \"20:1,600:60\",\n \"transportGatewayTelemetryDataPointsRateLimit\": \"20:1,600:60\",\n \"transportGatewayDeviceMsgRateLimit\": \"20:1,600:60\",\n \"transportGatewayDeviceTelemetryMsgRateLimit\": \"20:1,600:60\",\n \"transportGatewayDeviceTelemetryDataPointsRateLimit\": \"20:1,600:60\",\n \"integrationMsgsPerTenantRateLimit\": \"20:1,600:60\",\n \"integrationMsgsPerDeviceRateLimit\": \"20:1,600:60\",\n \"integrationMsgsPerAssetRateLimit\": \"20:1,600:60\",\n \"maxTransportMessages\": 10000000,\n \"maxTransportDataPoints\": 10000000,\n \"maxREExecutions\": 4000000,\n \"maxJSExecutions\": 5000000,\n \"maxDPStorageDays\": 0,\n \"maxRuleNodeExecutionsPerMessage\": 50,\n \"maxDebugModeDurationMinutes\": 15,\n \"maxEmails\": 0,\n \"maxSms\": 0,\n \"maxCreatedAlarms\": 1000,\n \"defaultStorageTtlDays\": 0,\n \"alarmsTtlDays\": 0,\n \"rpcTtlDays\": 0,\n \"queueStatsTtlDays\": 0,\n \"ruleEngineExceptionsTtlDays\": 0,\n \"blobEntityTtlDays\": 0,\n \"warnThreshold\": 0,\n \"maxCalculatedFieldsPerEntity\": 5,\n \"maxArgumentsPerCF\": 10,\n \"maxDataPointsPerRollingArg\": 1000,\n \"maxStateSizeInKBytes\": 32,\n \"maxSingleValueArgumentSizeInKBytes\": 2 }\n },\n \"default\": false\n}\n```Remove 'id', from the request body example (below) to create new Tenant Profile entity.\n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "saveTenantProfile", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantProfile" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfile/{tenantProfileId}": { + "get": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Get Tenant Profile (getTenantProfileById)", + "description": "Fetch the Tenant Profile object based on the provided Tenant Profile Id. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantProfileById", + "parameters": [ + { + "name": "tenantProfileId", + "in": "path", + "description": "A string value representing the tenant profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Delete Tenant Profile (deleteTenantProfile)", + "description": "Deletes the tenant profile. Referencing non-existing tenant profile Id will cause an error. Referencing profile that is used by the tenants will cause an error. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "deleteTenantProfile", + "parameters": [ + { + "name": "tenantProfileId", + "in": "path", + "description": "A string value representing the tenant 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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfile/{tenantProfileId}/default": { + "post": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Make tenant profile default (setDefaultTenantProfile)", + "description": "Makes specified tenant profile to be default. Referencing non-existing tenant profile Id will cause an error. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "setDefaultTenantProfile", + "parameters": [ + { + "name": "tenantProfileId", + "in": "path", + "description": "A string value representing the tenant profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfileInfo/default": { + "get": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Get default Tenant Profile Info (getDefaultTenantProfileInfo)", + "description": "Fetch the default Tenant Profile Info object based. Tenant Profile Info is a lightweight object that contains only id and name of the profile. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getDefaultTenantProfileInfo", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfileInfo/{tenantProfileId}": { + "get": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Get Tenant Profile Info (getTenantProfileInfoById)", + "description": "Fetch the Tenant Profile Info object based on the provided Tenant Profile Id. Tenant Profile Info is a lightweight object that contains only id and name of the profile. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantProfileInfoById", + "parameters": [ + { + "name": "tenantProfileId", + "in": "path", + "description": "A string value representing the tenant profile id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfileInfos{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Get Tenant Profiles Info (getTenantProfileInfos)", + "description": "Returns a page of tenant profile info objects registered in the platform. Tenant Profile Info is a lightweight object that contains only id and name of the profile. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantProfileInfos", + "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 tenant profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "id", + "name" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "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": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfiles{?ids}": { + "get": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "getTenantProfilesByIds", + "operationId": "getTenantProfilesByIds", + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "Comma-separated list of tenant profile ids", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantProfile" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenantProfiles{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "tenant-profile-controller" + ], + "summary": "Get Tenant Profiles (getTenantProfiles)", + "description": "Returns a page of tenant profiles 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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' authority.", + "operationId": "getTenantProfiles", + "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 tenant profile name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "description", + "isDefault" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataTenantProfile" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/translation/login/{localeCode}": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Get system translation for login page", + "description": "Fetch the end-user translation for specified locale.", + "operationId": "getLoginPageTranslation", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/translation/availableJavaLocales": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Get list of available java locales (getAvailableJavaLocales)", + "description": "The result is map where key is locale code and value is locale language and country", + "operationId": "getAvailableJavaLocales", + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/availableLocales": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Get list of available locales (getAvailableLocales)", + "description": "Fetch the list of customized locales from all levels\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getAvailableLocales", + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/edit/basic/{localeCode}": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Get end-user multi-translation for basic edit (getTranslationForBasicEdit)", + "description": "Fetch the translation info map where value is info object containing key translation, origin translation, translation of parent level, translation status.", + "operationId": "getTranslationForBasicEdit", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/full/{localeCode}": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Get end-user all-to-one translation (getFullTranslation)", + "description": "Fetch the end-user translation for specified locale. The result is the merge of user custom translation, system language translation and default locale translation.", + "operationId": "getFullTranslation", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "If-None-Match", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "Accept-Encoding", + "in": "header", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/full/{localeCode}/download": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Download end-user all-to-one translation (downloadFullTranslation)", + "description": "Fetch the end-user translation for the specified locale. The result is a json file with merged user custom translation, system language translation and default locale translation.", + "operationId": "downloadFullTranslation", + "parameters": [ + { + "name": "localeCode", + "in": "path", + "description": "Locale code (e.g. 'en_US').", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/translation/info": { + "get": { + "tags": [ + "translation-controller" + ], + "summary": "Get Translation info (getTranslationInfos)", + "description": "Fetch the list of customized locales and corresponding details such as language display name, country display name and translation progress percentage.\n\n Response example: \n\n```json\n[\n {\n \"localeCode\": \"uk_UA\",\n \"language\": \"Ukrainian (українська)\",\n \"country\": \"Україна\",\n \"progress\": 32\n },\n {\n \"localeCode\": \"es_ES\",\n \"language\": \"Spanish (español)\",\n \"country\": \"España\",\n \"progress\": 79\n }]\n```\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getTranslationInfos", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TranslationInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/trendz/enabled": { + "get": { + "tags": [ + "trendz-controller" + ], + "summary": "Check Trendz Enabled", + "description": "Check if the Trendz is enabled for the current user tenant\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "isTrendzEnabled", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/account/config/generate{?providerType}": { + "post": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Generate 2FA account config (generateTwoFaAccountConfig)", + "description": "Generate new 2FA account config template for specified provider type. \n\nFor TOTP, this will return a corresponding account config template with a generated OTP auth URL (with new random secret key for each API call) that can be then converted to a QR code to scan with an authenticator app. Example:\n```\n{\n \"providerType\": \"TOTP\",\n \"useByDefault\": false,\n \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=PNJDNWJVAK4ZTUYT7RFGPQLXA7XGU7PX\"\n}\n```\n\nFor EMAIL, the generated config will contain email from user's account:\n```\n{\n \"providerType\": \"EMAIL\",\n \"useByDefault\": false,\n \"email\": \"tenant@thingsboard.org\"\n}\n```\n\nFor SMS 2FA this method will just return a config with empty/default values as there is nothing to generate/preset:\n```\n{\n \"providerType\": \"SMS\",\n \"useByDefault\": false,\n \"phoneNumber\": null\n}\n```\n\nWill throw an error (Bad Request) if the provider is not configured for usage. \n\nAvailable for any authorized user. ", + "operationId": "generateTwoFaAccountConfig", + "parameters": [ + { + "name": "providerType", + "in": "query", + "description": "2FA provider type to generate new account config for", + "required": true, + "schema": { + "default": "TOTP" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupCodeTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/EmailTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/SmsTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/TotpTwoFaAccountConfig" + } + ] + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/account/config/submit": { + "post": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Submit 2FA account config (submitTwoFaAccountConfig)", + "description": "Submit 2FA account config to prepare for a future verification. Basically, this method will send a verification code for a given account config, if this has sense for a chosen 2FA provider. This code is needed to then verify and save the account config.\n\nExample of EMAIL 2FA account config:\n```\n{\n \"providerType\": \"EMAIL\",\n \"useByDefault\": true,\n \"email\": \"separate-email-for-2fa@thingsboard.org\"\n}\n```\n\nExample of SMS 2FA account config:\n```\n{\n \"providerType\": \"SMS\",\n \"useByDefault\": false,\n \"phoneNumber\": \"+38012312321\"\n}\n```\n\nFor TOTP this method does nothing.\n\nWill throw an error (Bad Request) if submitted account config is not valid, or if the provider is not configured for usage. \n\nAvailable for any authorized user. ", + "operationId": "submitTwoFaAccountConfig", + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupCodeTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/EmailTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/SmsTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/TotpTwoFaAccountConfig" + } + ] + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/account/config{?providerType}": { + "put": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Update 2FA account config (updateTwoFaAccountConfig)", + "description": "Update config for a given provider type. \nUpdate request example:\n```\n{\n \"useByDefault\": true\n}\n```\nReturns whole account's 2FA settings object.\n\n\nAvailable for any authorized user. ", + "operationId": "updateTwoFaAccountConfig", + "parameters": [ + { + "name": "providerType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TOTP", + "SMS", + "EMAIL", + "BACKUP_CODE" + ] + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TwoFaAccountConfigUpdateRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountTwoFaSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Delete 2FA account config (deleteTwoFaAccountConfig)", + "description": "Delete 2FA config for a given 2FA provider type. \nReturns whole account's 2FA settings object.\n\n\nAvailable for any authorized user. ", + "operationId": "deleteTwoFaAccountConfig", + "parameters": [ + { + "name": "providerType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TOTP", + "SMS", + "EMAIL", + "BACKUP_CODE" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountTwoFaSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/account/config{?verificationCode}": { + "post": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Verify and save 2FA account config (verifyAndSaveTwoFaAccountConfig)", + "description": "Checks the verification code for submitted config, and if it is correct, saves the provided account config. \n\nReturns whole account's 2FA settings object.\nWill throw an error (Bad Request) if the provider is not configured for usage. \n\nAvailable for any authorized user. ", + "operationId": "verifyAndSaveTwoFaAccountConfig", + "parameters": [ + { + "name": "verificationCode", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupCodeTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/EmailTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/SmsTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/TotpTwoFaAccountConfig" + } + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountTwoFaSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/account/settings": { + "get": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Get account 2FA settings (getAccountTwoFaSettings)", + "description": "Get user's account 2FA configuration. Configuration contains configs for different 2FA providers.\n\nExample:\n```\n{\n \"configs\": {\n \"EMAIL\": {\n \"providerType\": \"EMAIL\",\n \"useByDefault\": true,\n \"email\": \"tenant@thingsboard.org\"\n },\n \"TOTP\": {\n \"providerType\": \"TOTP\",\n \"useByDefault\": false,\n \"authUrl\": \"otpauth://totp/TB%202FA:tenant@thingsboard.org?issuer=TB+2FA&secret=P6Z2TLYTASOGP6LCJZAD24ETT5DACNNX\"\n },\n \"SMS\": {\n \"providerType\": \"SMS\",\n \"useByDefault\": false,\n \"phoneNumber\": \"+380501253652\"\n }\n }\n}\n```\n\nAvailable for any authorized user. ", + "operationId": "getAccountTwoFaSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AccountTwoFaSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/providers": { + "get": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "description": "Get the list of provider types available for user to use (the ones configured by tenant or sysadmin).\nExample of response:\n```\n[\n \"TOTP\",\n \"EMAIL\",\n \"SMS\"\n]\n```\n\nAvailable for any authorized user. ", + "operationId": "getAvailableTwoFaProviders_1", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "TOTP", + "SMS", + "EMAIL", + "BACKUP_CODE" + ] + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/2fa/settings": { + "get": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Get platform 2FA settings (getPlatformTwoFaSettings)", + "description": "Get platform settings for 2FA. The settings are described for savePlatformTwoFaSettings API method. If 2FA is not configured, then an empty response will be returned.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getPlatformTwoFaSettings", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformTwoFaSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "two-factor-auth-config-controller" + ], + "summary": "Save platform 2FA settings (savePlatformTwoFaSettings)", + "description": "Save 2FA settings for platform. The settings have following properties:\n- `useSystemTwoFactorAuthSettings` - option for tenant admins to use 2FA settings configured by sysadmin. If this param is set to true, then the settings will not be validated for constraints (if it is a tenant admin; for sysadmin this param is ignored).\n- `providers` - the list of 2FA providers' configs. Users will only be allowed to use 2FA providers from this list. \n\n- `minVerificationCodeSendPeriod` - minimal period in seconds to wait after verification code send request to send next request. \n- `verificationCodeCheckRateLimit` - rate limit configuration for verification code checking.\nThe format is standard: 'amountOfRequests:periodInSeconds'. The value of '1:60' would limit verification code checking requests to one per minute.\n- `maxVerificationFailuresBeforeUserLockout` - maximum number of verification failures before a user gets disabled.\n- `totalAllowedTimeForVerification` - total amount of time in seconds allotted for verification. Basically, this property sets a lifetime for pre-verification token. If not set, default value of 30 minutes is used.\n\n\nTOTP 2FA provider config has following settings:\n- `issuerName` - issuer name that will be displayed in an authenticator app near a username. Must not be blank.\n\nFor SMS 2FA provider:\n- `smsVerificationMessageTemplate` - verification message template. Available template variables are ${code} and ${userEmail}. It must not be blank and must contain verification code variable.\n- `verificationCodeLifetime` - verification code lifetime in seconds. Required to be positive.\n\nFor EMAIL provider type:\n- `verificationCodeLifetime` - the same as for SMS.\n\nExample of the settings:\n```\n{\n \"useSystemTwoFactorAuthSettings\": false,\n \"providers\": [\n {\n \"providerType\": \"TOTP\",\n \"issuerName\": \"TB\"\n },\n {\n \"providerType\": \"EMAIL\",\n \"verificationCodeLifetime\": 60\n },\n {\n \"providerType\": \"SMS\",\n \"verificationCodeLifetime\": 60,\n \"smsVerificationMessageTemplate\": \"Here is your verification code: ${code}\"\n }\n ],\n \"minVerificationCodeSendPeriod\": 60,\n \"verificationCodeCheckRateLimit\": \"3:900\",\n \"maxVerificationFailuresBeforeUserLockout\": 10,\n \"totalAllowedTimeForVerification\": 600\n}\n```\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "savePlatformTwoFaSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformTwoFaSettings" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformTwoFaSettings" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/auth/2fa/providers": { + "get": { + "tags": [ + "two-factor-auth-controller" + ], + "summary": "Get available 2FA providers (getAvailableTwoFaProviders)", + "description": "Get the list of 2FA provider infos available for user to use. Example:\n```\n[\n {\n \"type\": \"EMAIL\",\n \"default\": true,\n \"contact\": \"ab*****ko@gmail.com\"\n },\n {\n \"type\": \"TOTP\",\n \"default\": false,\n \"contact\": null\n },\n {\n \"type\": \"SMS\",\n \"default\": false,\n \"contact\": \"+38********12\"\n }\n]\n```", + "operationId": "getAvailableTwoFaProviders", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TwoFaProviderInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/auth/2fa/verification/check{?providerType,verificationCode}": { + "post": { + "tags": [ + "two-factor-auth-controller" + ], + "summary": "Check 2FA verification code (checkTwoFaVerificationCode)", + "description": "Checks 2FA verification code, and if it is correct the method returns a regular access and refresh token pair.\n\nThe API method is rate limited (using rate limit config from TwoFactorAuthSettings), and also will block a user after X unsuccessful verification attempts if such behavior is configured (in TwoFactorAuthSettings).\n\nWill return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded.", + "operationId": "checkTwoFaVerificationCode", + "parameters": [ + { + "name": "providerType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TOTP", + "SMS", + "EMAIL", + "BACKUP_CODE" + ] + } + }, + { + "name": "verificationCode", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/auth/2fa/verification/send{?providerType}": { + "post": { + "tags": [ + "two-factor-auth-controller" + ], + "summary": "Request 2FA verification code (requestTwoFaVerificationCode)", + "description": "Request 2FA verification code.\n\nTo make a request to this endpoint, you need an access token with the scope of PRE_VERIFICATION_TOKEN, which is issued on username/password auth if 2FA is enabled.\n\nThe API method is rate limited (using rate limit config from TwoFactorAuthSettings). Will return a Bad Request error if provider is not configured for usage, and Too Many Requests error if rate limits are exceeded.", + "operationId": "requestTwoFaVerificationCode", + "parameters": [ + { + "name": "providerType", + "in": "query", + "required": true, + "schema": { + "type": "string", + "enum": [ + "TOTP", + "SMS", + "EMAIL", + "BACKUP_CODE" + ] + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/uiSettings/helpBaseUrl": { + "get": { + "tags": [ + "ui-settings-controller" + ], + "summary": "Get UI help base url (getHelpBaseUrl)", + "description": "Get UI help base url used to fetch help assets. The actual value of the base url is configurable in the system configuration file.", + "operationId": "getHelpBaseUrl", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/usage": { + "get": { + "tags": [ + "usage-info-controller" + ], + "summary": "getTenantUsageInfo", + "operationId": "getTenantUsageInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UsageInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/users{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get Customer Users (getCustomerUsers)", + "description": "Returns a page of users for the current tenant with authority 'CUSTOMER_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 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": "getAllCustomerUsers", + "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/userInfos{?pageSize,page,includeCustomers,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get Customer user Infos (getCustomerUserInfos)", + "description": "Returns a page of user 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 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": "getCustomerUserInfos", + "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": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUserInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/customer/{customerId}/users{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get Customer Users (getCustomerUsers)", + "description": "Returns a page of users 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 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": "getCustomerUsers", + "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": "textSearch", + "in": "query", + "description": "The case insensitive 'substring' filter based on the user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/entityGroup/{entityGroupId}/users{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get users by Entity Group Id (getUsersByEntityGroupId)", + "description": "Returns a page of user 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 the 'Model' tab of the Response Class for more details. \n\n Security check is performed to verify that the user has 'READ' permission for specified group.", + "operationId": "getUsersByEntityGroupId", + "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", + "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/tenant/{tenantId}/users{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get Tenant Users (getTenantAdmins)", + "description": "Returns a page of users 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 the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getTenantAdmins", + "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/dashboards": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get information about last visited and starred dashboards (getLastVisitedDashboards)", + "description": "Fetch the list of last visited and starred dashboards. Both lists are limited to 10 items.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getUserDashboardsInfo", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDashboardsInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/dashboards/{dashboardId}/{action}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Report action of User over the dashboard (reportUserDashboardAction)", + "description": "Report action of User over the dashboard. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "reportUserDashboardAction", + "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": "action", + "in": "path", + "description": "Dashboard action, one of: \"visit\", \"star\" or \"unstar\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserDashboardsInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/info/{userId}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get User info (getUserInfoById)", + "description": "Fetch the User info object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserInfoById", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/mobile/session": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "getMobileSession", + "operationId": "getMobileSession", + "parameters": [ + { + "name": "X-Mobile-Token", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileSessionInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "user-controller" + ], + "summary": "saveMobileSession", + "operationId": "saveMobileSession", + "parameters": [ + { + "name": "X-Mobile-Token", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MobileSessionInfo" + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "user-controller" + ], + "summary": "removeMobileSession", + "operationId": "removeMobileSession", + "parameters": [ + { + "name": "X-Mobile-Token", + "in": "header", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/sendActivationMail{?email}": { + "post": { + "tags": [ + "user-controller" + ], + "summary": "Send or re-send the activation email", + "description": "Force send the activation email to the user. Useful to resend the email if user has accidentally deleted it.\n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "sendActivationEmail", + "parameters": [ + { + "name": "email", + "in": "query", + "description": "Email of the user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/settings": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get user settings (getUserSettings)", + "description": "Fetch the User settings based on authorized user. ", + "operationId": "getUserSettings", + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "put": { + "tags": [ + "user-controller" + ], + "summary": "Update user settings (saveUserSettings)", + "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", + "operationId": "putUserSettings", + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "post": { + "tags": [ + "user-controller" + ], + "summary": "Save user settings (saveUserSettings)", + "description": "Save user settings represented in json format for authorized user. ", + "operationId": "saveUserSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/settings/{paths}": { + "delete": { + "tags": [ + "user-controller" + ], + "summary": "Delete user settings (deleteUserSettings)", + "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", + "operationId": "deleteUserSettings_1", + "parameters": [ + { + "name": "paths", + "in": "path", + "description": "paths", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/settings/{type}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get user settings (getUserSettings)", + "description": "Fetch the User settings based on authorized user. ", + "operationId": "getUserSettings_1", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "put": { + "tags": [ + "user-controller" + ], + "summary": "Update user settings (saveUserSettings)", + "description": "Update user settings for authorized user. Only specified json elements will be updated.Example: you have such settings: {A:5, B:{C:10, D:20}}. Updating it with {B:{C:10, D:30}} will result in{A:5, B:{C:10, D:30}}. The same could be achieved by putting {B.D:30}", + "operationId": "putUserSettings_1", + "parameters": [ + { + "name": "type", + "in": "path", + "description": "Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/settings/{type}/{paths}": { + "delete": { + "tags": [ + "user-controller" + ], + "summary": "Delete user settings (deleteUserSettings)", + "description": "Delete user settings by specifying list of json element xpaths. \n Example: to delete B and C element in { \"A\": {\"B\": 5}, \"C\": 15} send A.B,C in jsonPaths request parameter", + "operationId": "deleteUserSettings", + "parameters": [ + { + "name": "paths", + "in": "path", + "description": "paths", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "path", + "description": "Settings type, case insensitive, one of: \"general\", \"quick_links\", \"doc_links\" or \"dashboards\".", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/tokenAccessEnabled": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Check Token Access Enabled (isUserTokenAccessEnabled)", + "description": "Checks that the system is configured to allow administrators to impersonate themself as other users. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to login as any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to login as any customer user.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "isUserTokenAccessEnabled", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/users{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get Users (getUsers)", + "description": "Returns a page of user 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 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": "getUserUsers", + "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUser" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/{userId}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get User (getUserById)", + "description": "Fetch the User object based on the provided User Id. If the user has the authority of 'SYS_ADMIN', the server does not perform additional checks. If the user has the authority of 'TENANT_ADMIN', the server checks that the requested user is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the requested user is owned by the same customer.\n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUserById", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "user-controller" + ], + "summary": "Delete User (deleteUser)", + "description": "Deletes the User, it's credentials and all the relations (from and to the User). Referencing non-existing User Id will cause an error. \n\n Security check is performed to verify that the user has 'DELETE' permission for the entity (entities).", + "operationId": "deleteUser", + "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" + } + } + ], + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/{userId}/activationLink": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get activation link (getActivationLink)", + "description": "Get the activation link for the user. The base url for activation link is configurable in the general settings of system administrator. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getActivationLink", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/{userId}/activationLinkInfo": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get activation link info (getActivationLinkInfo)", + "description": "Get the activation link info for the user. The base url for activation link is configurable in the general settings of system administrator. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getActivationLinkInfo", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserActivationLink" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/{userId}/token": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get User Token (getUserToken)", + "description": "Returns the token of the User based on the provided User Id. If the user who performs the request has the authority of 'SYS_ADMIN', it is possible to get the token of any tenant administrator. If the user who performs the request has the authority of 'TENANT_ADMIN', it is possible to get the token of any customer user that belongs to the same tenant. ", + "operationId": "getUserToken", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JwtPair" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user/{userId}/userCredentialsEnabled{?userCredentialsEnabled}": { + "post": { + "tags": [ + "user-controller" + ], + "summary": "Enable/Disable User credentials (setUserCredentialsEnabled)", + "description": "Enables or Disables user credentials. Useful when you would like to block user account without deleting it. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class 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 'WRITE' permission for the entity (entities).", + "operationId": "setUserCredentialsEnabled", + "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": "userCredentialsEnabled", + "in": "query", + "description": "Enable (\"true\") or disable (\"false\") the credentials.", + "required": false, + "schema": { + "default": "true" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/userInfos/all{?pageSize,page,includeCustomers,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get All User Infos for current user (getAllUserInfos)", + "description": "Returns a page of user info objects owned by the tenant or the customer of a current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See 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": "getAllUserInfos", + "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUserInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/users/assign/{alarmId}{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get usersForAssign (getUsersForAssign)", + "description": "Returns page of user data objects that can be assigned to provided alarmId. Search is been executed by email, firstName and lastName fields. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "getUsersForAssign", + "parameters": [ + { + "name": "alarmId", + "in": "path", + "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUserEmailInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/users/info{?pageSize,page,textSearch,sortProperty,sortOrder}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Find users by query (findUsersByQuery)", + "description": "Returns page of user data objects. Search is been executed by email, firstName and lastName fields. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "findUsersByQuery", + "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 user email.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "firstName", + "lastName", + "email" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataUserEmailInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/users{?userIds}": { + "get": { + "tags": [ + "user-controller" + ], + "summary": "Get Users By Ids (getUsersByIds)", + "description": "Requested users must be owned by tenant or assigned to customer which user is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getUsersByIds", + "parameters": [ + { + "name": "userIds", + "in": "query", + "description": "A list of user ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/user{?sendActivationMail,entityGroupId,entityGroupIds}": { + "post": { + "tags": [ + "user-controller" + ], + "summary": "Save Or update User (saveUser)", + "description": "Create or update the User. When creating user, platform generates User Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created User Id will be present in the response. Specify existing User Id to update the device. Referencing non-existing User Id will cause 'Not Found' error.\n\nDevice email is unique for entire platform setup.\n\nRemove 'id', 'tenantId' and optionally 'customerId' from the request body example (below) to create new User entity. Security check is performed to verify that the user has 'WRITE' permission for the entity (entities).", + "operationId": "saveUser", + "parameters": [ + { + "name": "sendActivationMail", + "in": "query", + "description": "Send activation email (or use activation link)", + "required": false, + "schema": { + "default": "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": { + "items": {} + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/permissions/allowedPermissions": { + "get": { + "tags": [ + "user-permissions-controller" + ], + "summary": "Get Permissions (getAllowedPermissions)", + "description": "Returns a complex object that describes:\n\n * all possible (both granted and not granted) permissions for the authority of the user (Tenant or Customer);\n * all granted permissions for the user;\n\n The result impacts UI behavior and hides certain UI elements if user has no permissions to invoke the related operations. Nevertheless, all API calls check the permissions each time they are executed on the server side.You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getAllowedPermissions", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AllowedPermissionsInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/noauth/whiteLabel/loginWhiteLabelParams": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Get Login White Labeling parameters", + "description": "Returns login white-labeling parameters based on the hostname from request.", + "operationId": "getLoginWhiteLabelParams", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginWhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + } + } + }, + "/api/tenant/whiteLabelingAllowed": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "tenantWhiteLabelingAllowed", + "operationId": "tenantWhiteLabelingAllowed", + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/currentLoginWhiteLabelParams{?customerId}": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Get Login White Labeling configuration (getCurrentWhiteLabelParams)", + "description": "Fetch the Login White Labeling configuration that corresponds to the authority of the user. The API call is designed to load the Login White Labeling configuration for edition. So, the result is NOT merged with the parent level White Labeling configuration. Let's assume there is a custom White Labeling configured on a system level. And there is no custom White Labeling items configured on a tenant level. In such a case, the API call will return default object for the tenant administrator. \n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCurrentLoginWhiteLabelParams", + "parameters": [ + { + "name": "customerId", + "in": "query", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginWhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Delete Login White Labeling configuration (deleteCurrentLoginWhiteLabelParams)", + "description": "Delete the Login White Labeling configuration that corresponds to the authority of the user. \n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "deleteCurrentLoginWhiteLabelParams", + "parameters": [ + { + "name": "customerId", + "in": "query", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/currentWhiteLabelParams{?customerId}": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Get White Labeling configuration (getCurrentWhiteLabelParams)", + "description": "Fetch the White Labeling configuration that corresponds to the authority of the user. The API call is designed to load the White Labeling configuration for edition. So, the result is NOT merged with the parent level White Labeling configuration. Let's assume there is a custom White Labeling configured on a system level. And there is no custom White Labeling items configured on a tenant level. In such a case, the API call will return default object for the tenant administrator. \n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getCurrentWhiteLabelParams", + "parameters": [ + { + "name": "customerId", + "in": "query", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + }, + "delete": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Delete General White Labeling configuration (deleteCurrentWhiteLabelParams)", + "description": "Delete the White Labeling configuration that corresponds to the authority of the user. \n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "deleteCurrentWhiteLabelParams", + "parameters": [ + { + "name": "customerId", + "in": "query", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/isCustomerWhiteLabelingAllowed": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Check Customer White Labeling Allowed", + "description": "Check if the White Labeling is enabled for the customers of the current tenant\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.\n\nAvailable for users with 'TENANT_ADMIN' authority.", + "operationId": "isCustomerWhiteLabelingAllowed", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/isWhiteLabelingAllowed": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Check White Labeling Allowed", + "description": "Check if the White Labeling is enabled for the current user owner (tenant or customer)\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.", + "operationId": "isWhiteLabelingAllowed", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/loginWhiteLabelParams{?customerId}": { + "post": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Create Or Update Login White Labeling configuration (saveWhiteLabelParams)", + "description": "Creates or Updates the White Labeling configuration.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveLoginWhiteLabelParams", + "parameters": [ + { + "name": "customerId", + "in": "query", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginWhiteLabelingParams" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginWhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/mailTemplates": { + "post": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Save the Mail templates settings (saveMailTemplates)", + "description": "Creates or Updates the Mail templates settings.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveMailTemplates", + "requestBody": { + "description": "A JSON value representing the Administration Settings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JsonNode" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/mailTemplates{?systemByDefault}": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Get the Mail templates settings (getMailTemplates)", + "description": "Fetch Mail template settings. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.\n\nSecurity check is performed to verify that the user has 'READ' permission for the white labeling resource.", + "operationId": "getMailTemplates", + "parameters": [ + { + "name": "systemByDefault", + "in": "query", + "description": "Use system settings if settings are not defined on tenant level.", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], + "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 UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/previewWhiteLabelParams": { + "post": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Preview Login White Labeling configuration (saveWhiteLabelParams)", + "description": "Merge the White Labeling configuration with the parent configuration and return the result.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "previewWhiteLabelParams", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhiteLabelingParams" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/whiteLabelParams": { + "get": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Get White Labeling parameters", + "description": "Returns white-labeling parameters for the current user.", + "operationId": "getWhiteLabelParams", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/whiteLabel/whiteLabelParams{?customerId}": { + "post": { + "tags": [ + "white-labeling-controller" + ], + "summary": "Create Or Update White Labeling configuration (saveWhiteLabelParams)", + "description": "Creates or Updates the White Labeling configuration.\n\nSecurity check is performed to verify that the user has 'WRITE' permission for the white labeling resource.", + "operationId": "saveWhiteLabelParams", + "parameters": [ + { + "name": "customerId", + "in": "query", + "description": "A string value representing the customer id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhiteLabelingParams" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WhiteLabelingParams" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetType/{widgetTypeId}": { + "delete": { + "tags": [ + "widget-type-controller" + ], + "summary": "Delete widget type (deleteWidgetType)", + "description": "Deletes the Widget Type. Referencing non-existing Widget Type Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteWidgetType", + "parameters": [ + { + "name": "widgetTypeId", + "in": "path", + "description": "A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetType/{widgetTypeId}{?includeResources}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Type Details (getWidgetTypeById)", + "description": "Get the Widget Type Details based on the provided Widget Type Id. Widget Type Details extend Widget Type and add image and description properties. Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getWidgetTypeById", + "parameters": [ + { + "name": "widgetTypeId", + "in": "path", + "description": "A string value representing the widget type 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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetTypeDetails" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypeFqns{?widgetsBundleId}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get all Widget type fqns for specified Bundle (getBundleWidgetTypeFqns)", + "description": "Returns an array of Widget Type fqns that belong to specified Widget Bundle.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getBundleWidgetTypeFqns", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "query", + "description": "Widget Bundle Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypeInfo/{widgetTypeId}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Type Info (getWidgetTypeInfoById)", + "description": "Get the Widget Type Info based on the provided Widget Type Id. Widget Type Details extend Widget Type and add image and description properties. Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getWidgetTypeInfoById", + "parameters": [ + { + "name": "widgetTypeId", + "in": "path", + "description": "A string value representing the widget type id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetTypeInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypesDetails{?isSystem,bundleAlias}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get all Widget types details for specified Bundle (getBundleWidgetTypesDetailsByBundleAlias) (Deprecated)", + "description": "Returns an array of Widget Type Details objects that belong to specified Widget Bundle.Widget Type Details extend Widget Type and add image and description properties. Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getBundleWidgetTypesDetailsByBundleAlias", + "parameters": [ + { + "name": "isSystem", + "in": "query", + "description": "System or Tenant", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "bundleAlias", + "in": "query", + "description": "Widget Bundle alias", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetTypeDetails" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypesDetails{?widgetsBundleId,includeResources}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get all Widget types details for specified Bundle (getBundleWidgetTypesDetails)", + "description": "Returns an array of Widget Type Details objects that belong to specified Widget Bundle.Widget Type Details extend Widget Type and add image and description properties. Those properties are useful to edit the Widget Type but they are not required for Dashboard rendering. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getBundleWidgetTypesDetails", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "query", + "description": "Widget Bundle Id", + "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" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetTypeDetails" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypesInfos{?isSystem,bundleAlias}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Type Info objects (getBundleWidgetTypesInfosByBundleAlias) (Deprecated)", + "description": "Get the Widget Type Info objects based on the provided parameters. Widget Type Info is a lightweight object that represents Widget Type but does not contain the heavyweight widget descriptor JSON\n\nAvailable for any authorized user. ", + "operationId": "getBundleWidgetTypesInfosByBundleAlias", + "parameters": [ + { + "name": "isSystem", + "in": "query", + "description": "System or Tenant", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "bundleAlias", + "in": "query", + "description": "Widget Bundle alias", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetTypeInfo" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypesInfos{?widgetsBundleId,pageSize,page,textSearch,sortProperty,sortOrder,fullSearch,deprecatedFilter,widgetTypeList}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Type Info objects (getBundleWidgetTypesInfos)", + "description": "Get the Widget Type Info objects based on the provided parameters. Widget Type Info is a lightweight object that represents Widget Type but does not contain the heavyweight widget descriptor JSON\n\nAvailable for any authorized user. ", + "operationId": "getBundleWidgetTypesInfos", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "query", + "description": "Widget Bundle Id", + "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 widget type name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "deprecated", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "fullSearch", + "in": "query", + "description": "Optional boolean parameter indicating whether search widgets by description not only by name", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deprecatedFilter", + "in": "query", + "description": "Optional string parameter indicating whether to include deprecated widgets", + "required": false, + "schema": { + "enum": [ + "ALL", + "ACTUAL", + "DEPRECATED" + ] + } + }, + { + "name": "widgetTypeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the widget type value", + "required": false, + "schema": { + "items": { + "enum": [ + "timeseries", + "latest", + "control", + "alarm", + "static" + ] + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataWidgetTypeInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypes{?isSystem,bundleAlias}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get all Widget types for specified Bundle (getBundleWidgetTypesByBundleAlias) (Deprecated)", + "description": "Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getBundleWidgetTypesByBundleAlias", + "parameters": [ + { + "name": "isSystem", + "in": "query", + "description": "System or Tenant", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "bundleAlias", + "in": "query", + "description": "Widget Bundle alias", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetType" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypes{?pageSize,page,textSearch,sortProperty,sortOrder,tenantOnly,fullSearch,deprecatedFilter,widgetTypeList,scadaFirst}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Types (getWidgetTypes)", + "description": "Returns a page of Widget Type objects available for current user. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetTypes", + "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 widget type name.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "name", + "deprecated", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC, DESC" + ] + } + }, + { + "name": "tenantOnly", + "in": "query", + "description": "Optional boolean parameter indicating whether only tenant widget types should be returned", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "fullSearch", + "in": "query", + "description": "Optional boolean parameter indicating whether search widgets by description not only by name", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "deprecatedFilter", + "in": "query", + "description": "Optional string parameter indicating whether to include deprecated widgets", + "required": false, + "schema": { + "enum": [ + "ALL", + "ACTUAL", + "DEPRECATED" + ] + } + }, + { + "name": "widgetTypeList", + "in": "query", + "description": "A list of string values separated by comma ',' representing one of the widget type value", + "required": false, + "schema": { + "items": { + "enum": [ + "timeseries", + "latest", + "control", + "alarm", + "static" + ] + } + } + }, + { + "name": "scadaFirst", + "in": "query", + "description": "Optional boolean parameter indicating whether to fetch SCADA symbol widgets first", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataWidgetTypeInfo" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetTypes{?widgetsBundleId}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get all Widget types for specified Bundle (getBundleWidgetTypes)", + "description": "Returns an array of Widget Type objects that belong to specified Widget Bundle.Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. \n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "getBundleWidgetTypes", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "query", + "description": "Widget Bundle Id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetType" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetType{?fqn}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Type (getWidgetType)", + "description": "Get the Widget Type by FQN. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory.\n\nAvailable for any authorized user. ", + "operationId": "getWidgetType", + "parameters": [ + { + "name": "fqn", + "in": "query", + "description": "Widget Type fqn", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetType" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetType{?isSystem,bundleAlias,alias}": { + "get": { + "tags": [ + "widget-type-controller" + ], + "summary": "Get Widget Type (getWidgetTypeByBundleAliasAndTypeAlias) (Deprecated)", + "description": "Get the Widget Type based on the provided parameters. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory.\n\nAvailable for any authorized user. ", + "operationId": "getWidgetTypeByBundleAliasAndTypeAlias", + "parameters": [ + { + "name": "isSystem", + "in": "query", + "description": "System or Tenant", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "bundleAlias", + "in": "query", + "description": "Widget Bundle alias", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "alias", + "in": "query", + "description": "Widget Type alias", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetType" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "deprecated": true, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetType{?updateExistingByFqn}": { + "post": { + "tags": [ + "widget-type-controller" + ], + "summary": "Create Or Update Widget Type (saveWidgetType)", + "description": "Create or update the Widget Type. Widget Type represents the template for widget creation. Widget Type and Widget are similar to class and object in OOP theory. When creating the Widget Type, platform generates Widget Type Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Type Id will be present in the response. Specify existing Widget Type id to update the Widget Type. Referencing non-existing Widget Type Id will cause 'Not Found' error.\n\nWidget Type fqn is unique in the scope of System or Tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' rom the request body example (below) to create new Widget Type entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveWidgetType", + "parameters": [ + { + "name": "updateExistingByFqn", + "in": "query", + "description": "Optional boolean parameter indicating whether to update existing widget type by FQN if present instead of creating new one", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetTypeDetails" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetTypeDetails" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundle": { + "post": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Create Or Update Widget Bundle (saveWidgetsBundle)", + "description": "Create or update the Widget Bundle. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. When creating the bundle, platform generates Widget Bundle Id as [time-based UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_1_(date-time_and_MAC_address)). The newly created Widget Bundle Id will be present in the response. Specify existing Widget Bundle id to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause 'Not Found' error.\n\nWidget Bundle alias is unique in the scope of tenant. Special Tenant Id '13814000-1dd2-11b2-8080-808080808080' is automatically used if the create bundle request is sent by user with 'SYS_ADMIN' authority.Remove 'id', 'tenantId' from the request body example (below) to create new Widgets Bundle entity.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "saveWidgetsBundle", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid request body", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundle/{widgetsBundleId}": { + "delete": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Delete widgets bundle (deleteWidgetsBundle)", + "description": "Deletes the widget bundle. Referencing non-existing Widget Bundle Id will cause an error.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "deleteWidgetsBundle", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK" + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundle/{widgetsBundleId}/widgetTypeFqns": { + "post": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Update widgets bundle widgets list from widget type FQNs list (updateWidgetsBundleWidgetFqns)", + "description": "Updates widgets bundle widgets list from widget type FQNs list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetFqns", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "Ordered list of widget type FQNs to be included by widgets bundle", + "items": { + "type": "string" + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK" + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundle/{widgetsBundleId}/widgetTypes": { + "post": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Update widgets bundle widgets types list (updateWidgetsBundleWidgetTypes)", + "description": "Updates widgets bundle widgets list.\n\nAvailable for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.", + "operationId": "updateWidgetsBundleWidgetTypes", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "description": "Ordered list of widget type Ids to be included by widgets bundle", + "items": { + "type": "string" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundle/{widgetsBundleId}{?inlineImages}": { + "get": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Get Widget Bundle (getWidgetsBundleById)", + "description": "Get the Widget Bundle based on the provided Widget Bundle Id. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetsBundleById", + "parameters": [ + { + "name": "widgetsBundleId", + "in": "path", + "description": "A string value representing the widget bundle 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": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ThingsboardErrorResponse" + }, + "examples": { + "error-code-400": { + "summary": "Bad Request", + "value": { + "message": "Invalid UUID string: 123", + "errorCode": 31, + "status": 400, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundles": { + "get": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Get all Widget Bundles (getWidgetsBundles)", + "description": "Returns an array of Widget Bundle objects that are available for current user.Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetsBundles", + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundles{?pageSize,page,textSearch,sortProperty,sortOrder,tenantOnly,fullSearch,scadaFirst}": { + "get": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Get Widget Bundles (getWidgetsBundles)", + "description": "Returns a page of Widget Bundle objects available for current user. Widget Bundle represents a group(bundle) of widgets. Widgets are grouped into bundle by type or use case. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. \n\nAvailable for any authorized user. ", + "operationId": "getWidgetsBundles_1", + "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 widget bundle title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sortProperty", + "in": "query", + "description": "Property of entity to sort by", + "required": false, + "schema": { + "enum": [ + "createdTime", + "title", + "tenantId" + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)", + "required": false, + "schema": { + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "tenantOnly", + "in": "query", + "description": "Optional boolean parameter to include only tenant-level bundles without system", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "fullSearch", + "in": "query", + "description": "Optional boolean parameter indicating extended search of widget bundles by description and by name / description of related widget types", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "scadaFirst", + "in": "query", + "description": "Optional boolean parameter indicating whether to fetch widgets bundles with SCADA symbols first. Works only when fullSearch parameter is enabled", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PageDataWidgetsBundle" + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + }, + "/api/widgetsBundles{?widgetsBundleIds}": { + "get": { + "tags": [ + "widgets-bundle-controller" + ], + "summary": "Get Widgets Bundles By Ids (getWidgetsBundlesByIds)", + "description": "Requested widgets bundles must be system level or owned by tenant of the user which is performing the request. \n\n Security check is performed to verify that the user has 'READ' permission for the entity (entities).", + "operationId": "getWidgetsBundlesByIds", + "parameters": [ + { + "name": "widgetsBundleIds", + "in": "query", + "description": "A list of widgets bundle ids, separated by comma ','", + "required": true, + "schema": { + "items": {} + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WidgetsBundle" + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + }, + "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, + "timestamp": 1747837263601 + } + } + } + } + } + } + }, + "security": [ + { + "HTTP login form": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER" + ] + } + ] + } + } + }, + "components": { + "schemas": { + "AccountTwoFaSettings": { + "properties": { + "configs": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupCodeTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/EmailTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/SmsTwoFaAccountConfig" + }, + { + "$ref": "#/components/schemas/TotpTwoFaAccountConfig" + } + ] + } + } + } + }, + "AcmeCertificateId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "ActivateUserRequest": { + "description": "Activate user request.", + "properties": { + "activateToken": { + "type": "string", + "description": "The activate token to verify", + "example": "AAB254FF67D.." + }, + "password": { + "type": "string", + "description": "The new password to set", + "example": "secret" + } + } + }, + "AdminSettings": { + "description": "A JSON value representing the Mail Settings.", + "properties": { + "id": { + "$ref": "#/components/schemas/AdminSettingsId", + "description": "The Id of the Administration Settings, auto-generated, UUID" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the settings creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "key": { + "type": "string", + "description": "The Administration Settings key, (e.g. 'general' or 'mail')", + "example": "mail" + }, + "jsonValue": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON representation of the Administration Settings value" + } + } + }, + "AdminSettingsId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "AffectedTenantAdministratorsFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + } + ] + }, + "AffectedUserFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + } + ] + }, + "Alarm": { + "properties": { + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "type": { + "type": "string", + "description": "representing type of the Alarm", + "example": "High Temperature Alarm" + }, + "originator": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with alarm originator id" + }, + "severity": { + "type": "string", + "description": "Alarm severity", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ], + "example": "CRITICAL" + }, + "acknowledged": { + "type": "boolean", + "description": "Acknowledged", + "example": true + }, + "cleared": { + "type": "boolean", + "description": "Cleared", + "example": false + }, + "assigneeId": { + "$ref": "#/components/schemas/UserId", + "description": "Alarm assignee user id" + }, + "startTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm start time, in milliseconds", + "example": 1634058704565 + }, + "endTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm end time(last time update), in milliseconds", + "example": 1634111163522 + }, + "ackTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm acknowledgement, in milliseconds", + "example": 1634115221948 + }, + "clearTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm clearing, in milliseconds", + "example": 1634114528465 + }, + "assignTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm assignment, in milliseconds", + "example": 1634115928465 + }, + "details": { + "$ref": "#/components/schemas/JsonNode" + }, + "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" + } + }, + "id": { + "$ref": "#/components/schemas/AlarmId", + "description": "JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm creation, in milliseconds", + "example": 1634058704567, + "readOnly": true + }, + "name": { + "type": "string", + "description": "representing type of the Alarm", + "example": "High Temperature Alarm", + "readOnly": true + }, + "status": { + "type": "string", + "description": "status of the Alarm", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ], + "example": "ACTIVE_UNACK", + "readOnly": true + } + }, + "required": [ + "acknowledged", + "cleared", + "name", + "originator", + "severity", + "status", + "type" + ] + }, + "AlarmAssignee": { + "properties": { + "id": { + "$ref": "#/components/schemas/UserId" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + } + } + }, + "AlarmAssignmentNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "alarmTypes": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "alarmSeverities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + }, + "uniqueItems": true + }, + "alarmStatuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + }, + "uniqueItems": true + }, + "notifyOn": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ASSIGNED", + "UNASSIGNED" + ] + }, + "uniqueItems": true + } + } + } + ], + "required": [ + "notifyOn" + ] + }, + "AlarmComment": { + "properties": { + "alarmId": { + "$ref": "#/components/schemas/AlarmId", + "description": "JSON object with Alarm id.", + "readOnly": true + }, + "userId": { + "$ref": "#/components/schemas/UserId", + "description": "JSON object with User id.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.", + "enum": [ + "SYSTEM", + "OTHER" + ], + "example": "SYSTEM/OTHER", + "readOnly": true + }, + "comment": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with text of comment." + }, + "id": { + "$ref": "#/components/schemas/AlarmCommentId", + "description": "JSON object with the alarm comment Id. Specify this field to update the alarm comment. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.", + "readOnly": true + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm comment creation, in milliseconds", + "example": 1634058704567, + "readOnly": true + }, + "name": { + "type": "string", + "description": "representing comment text", + "example": "Please take a look", + "readOnly": true + } + } + }, + "AlarmCommentId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "AlarmCommentInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/AlarmCommentId", + "description": "JSON object with the alarm comment Id. Specify this field to update the alarm comment. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm.", + "readOnly": true + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm comment creation, in milliseconds", + "example": 1634058704567, + "readOnly": true + }, + "alarmId": { + "$ref": "#/components/schemas/AlarmId", + "description": "JSON object with Alarm id.", + "readOnly": true + }, + "userId": { + "$ref": "#/components/schemas/UserId", + "description": "JSON object with User id.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.", + "enum": [ + "SYSTEM", + "OTHER" + ], + "example": "SYSTEM/OTHER", + "readOnly": true + }, + "comment": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with text of comment." + }, + "firstName": { + "type": "string", + "description": "User first name", + "example": "John" + }, + "lastName": { + "type": "string", + "description": "User last name", + "example": "Brown" + }, + "email": { + "type": "string", + "description": "User email address", + "example": "johnBrown@gmail.com" + }, + "name": { + "type": "string", + "description": "representing comment text", + "example": "Please take a look", + "readOnly": true + } + } + }, + "AlarmCommentNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "alarmTypes": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "alarmSeverities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + }, + "uniqueItems": true + }, + "alarmStatuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + }, + "uniqueItems": true + }, + "onlyUserComments": { + "type": "boolean" + }, + "notifyOnCommentUpdate": { + "type": "boolean" + } + } + } + ] + }, + "AlarmCondition": { + "properties": { + "condition": { + "type": "array", + "description": "JSON array of alarm condition filters", + "items": { + "$ref": "#/components/schemas/AlarmConditionFilter" + } + }, + "spec": { + "description": "JSON object representing alarm condition type", + "oneOf": [ + { + "$ref": "#/components/schemas/DurationAlarmConditionSpec" + }, + { + "$ref": "#/components/schemas/RepeatingAlarmConditionSpec" + }, + { + "$ref": "#/components/schemas/SimpleAlarmConditionSpec" + } + ] + } + } + }, + "AlarmConditionFilter": { + "properties": { + "key": { + "$ref": "#/components/schemas/AlarmConditionFilterKey", + "description": "JSON object for specifying alarm condition by specific key" + }, + "valueType": { + "type": "string", + "description": "String representation of the type of the value", + "enum": [ + "STRING", + "NUMERIC", + "BOOLEAN", + "DATE_TIME" + ], + "example": "NUMERIC" + }, + "value": { + "description": "Value used in Constant comparison. For other types, such as TIME_SERIES or ATTRIBUTE, the predicate condition is used" + }, + "predicate": { + "description": "JSON object representing filter condition", + "oneOf": [ + { + "$ref": "#/components/schemas/BooleanFilterPredicate" + }, + { + "$ref": "#/components/schemas/ComplexFilterPredicate" + }, + { + "$ref": "#/components/schemas/NumericFilterPredicate" + }, + { + "$ref": "#/components/schemas/StringFilterPredicate" + } + ] + } + } + }, + "AlarmConditionFilterKey": { + "properties": { + "type": { + "type": "string", + "description": "The key type", + "enum": [ + "ATTRIBUTE", + "TIME_SERIES", + "ENTITY_FIELD", + "CONSTANT" + ], + "example": "TIME_SERIES" + }, + "key": { + "type": "string", + "description": "String value representing the key", + "example": "temp" + } + } + }, + "AlarmConditionSpec": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "AlarmCountQuery": { + "description": "A JSON value representing the alarm count query.", + "properties": { + "startTs": { + "type": "integer", + "format": "int64" + }, + "endTs": { + "type": "integer", + "format": "int64" + }, + "timeWindow": { + "type": "integer", + "format": "int64" + }, + "typeList": { + "type": "array", + "items": { + "type": "string" + } + }, + "statusList": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + "severityList": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + } + }, + "searchPropagatedAlarms": { + "type": "boolean" + }, + "assigneeId": { + "$ref": "#/components/schemas/UserId" + }, + "entityFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApiUsageStateFilter" + }, + { + "$ref": "#/components/schemas/AssetSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/AssetTypeFilter" + }, + { + "$ref": "#/components/schemas/DeviceSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/DeviceTypeFilter" + }, + { + "$ref": "#/components/schemas/EdgeSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EdgeTypeFilter" + }, + { + "$ref": "#/components/schemas/EntitiesByGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupListFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityListFilter" + }, + { + "$ref": "#/components/schemas/EntityNameFilter" + }, + { + "$ref": "#/components/schemas/EntityTypeFilter" + }, + { + "$ref": "#/components/schemas/EntityViewSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EntityViewTypeFilter" + }, + { + "$ref": "#/components/schemas/RelationsQueryFilter" + }, + { + "$ref": "#/components/schemas/SchedulerEventFilter" + }, + { + "$ref": "#/components/schemas/SingleEntityFilter" + }, + { + "$ref": "#/components/schemas/StateEntityOwnerFilter" + } + ] + }, + "keyFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyFilter" + } + } + } + }, + "AlarmData": { + "properties": { + "id": { + "$ref": "#/components/schemas/AlarmId", + "description": "JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm creation, in milliseconds", + "example": 1634058704567, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "type": { + "type": "string", + "description": "representing type of the Alarm", + "example": "High Temperature Alarm" + }, + "originator": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with alarm originator id" + }, + "severity": { + "type": "string", + "description": "Alarm severity", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ], + "example": "CRITICAL" + }, + "acknowledged": { + "type": "boolean", + "description": "Acknowledged", + "example": true + }, + "cleared": { + "type": "boolean", + "description": "Cleared", + "example": false + }, + "assigneeId": { + "$ref": "#/components/schemas/UserId", + "description": "Alarm assignee user id" + }, + "startTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm start time, in milliseconds", + "example": 1634058704565 + }, + "endTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm end time(last time update), in milliseconds", + "example": 1634111163522 + }, + "ackTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm acknowledgement, in milliseconds", + "example": 1634115221948 + }, + "clearTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm clearing, in milliseconds", + "example": 1634114528465 + }, + "assignTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm assignment, in milliseconds", + "example": 1634115928465 + }, + "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" + } + }, + "originatorName": { + "type": "string", + "description": "Alarm originator name", + "example": "Thermostat" + }, + "originatorLabel": { + "type": "string", + "description": "Alarm originator label", + "example": "Thermostat label" + }, + "assignee": { + "$ref": "#/components/schemas/AlarmAssignee", + "description": "Alarm assignee" + }, + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "latest": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TsValue" + } + } + }, + "name": { + "type": "string", + "description": "representing type of the Alarm", + "example": "High Temperature Alarm", + "readOnly": true + }, + "status": { + "type": "string", + "description": "status of the Alarm", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ], + "example": "ACTIVE_UNACK", + "readOnly": true + }, + "details": { + "$ref": "#/components/schemas/JsonNode" + } + }, + "required": [ + "acknowledged", + "cleared", + "name", + "originator", + "severity", + "status", + "type" + ] + }, + "AlarmDataPageLink": { + "properties": { + "startTs": { + "type": "integer", + "format": "int64" + }, + "endTs": { + "type": "integer", + "format": "int64" + }, + "timeWindow": { + "type": "integer", + "format": "int64" + }, + "typeList": { + "type": "array", + "items": { + "type": "string" + } + }, + "statusList": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + } + }, + "severityList": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + } + }, + "searchPropagatedAlarms": { + "type": "boolean" + }, + "assigneeId": { + "$ref": "#/components/schemas/UserId" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "textSearch": { + "type": "string" + }, + "sortOrder": { + "$ref": "#/components/schemas/EntityDataSortOrder" + }, + "dynamic": { + "type": "boolean" + } + } + }, + "AlarmDataQuery": { + "description": "A JSON value representing the alarm data query. See API call notes above for more details.", + "properties": { + "entityFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApiUsageStateFilter" + }, + { + "$ref": "#/components/schemas/AssetSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/AssetTypeFilter" + }, + { + "$ref": "#/components/schemas/DeviceSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/DeviceTypeFilter" + }, + { + "$ref": "#/components/schemas/EdgeSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EdgeTypeFilter" + }, + { + "$ref": "#/components/schemas/EntitiesByGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupListFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityListFilter" + }, + { + "$ref": "#/components/schemas/EntityNameFilter" + }, + { + "$ref": "#/components/schemas/EntityTypeFilter" + }, + { + "$ref": "#/components/schemas/EntityViewSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EntityViewTypeFilter" + }, + { + "$ref": "#/components/schemas/RelationsQueryFilter" + }, + { + "$ref": "#/components/schemas/SchedulerEventFilter" + }, + { + "$ref": "#/components/schemas/SingleEntityFilter" + }, + { + "$ref": "#/components/schemas/StateEntityOwnerFilter" + } + ] + }, + "keyFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyFilter" + } + }, + "pageLink": { + "$ref": "#/components/schemas/AlarmDataPageLink" + }, + "entityFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityKey" + } + }, + "latestValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityKey" + } + }, + "alarmFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityKey" + } + } + } + }, + "AlarmId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "ALARM" + ], + "example": "ALARM" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "AlarmInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/AlarmId", + "description": "JSON object with the alarm Id. Specify this field to update the alarm. Referencing non-existing alarm Id will cause error. Omit this field to create new alarm." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm creation, in milliseconds", + "example": 1634058704567, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "type": { + "type": "string", + "description": "representing type of the Alarm", + "example": "High Temperature Alarm" + }, + "originator": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with alarm originator id" + }, + "severity": { + "type": "string", + "description": "Alarm severity", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ], + "example": "CRITICAL" + }, + "acknowledged": { + "type": "boolean", + "description": "Acknowledged", + "example": true + }, + "cleared": { + "type": "boolean", + "description": "Cleared", + "example": false + }, + "assigneeId": { + "$ref": "#/components/schemas/UserId", + "description": "Alarm assignee user id" + }, + "startTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm start time, in milliseconds", + "example": 1634058704565 + }, + "endTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm end time(last time update), in milliseconds", + "example": 1634111163522 + }, + "ackTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm acknowledgement, in milliseconds", + "example": 1634115221948 + }, + "clearTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm clearing, in milliseconds", + "example": 1634114528465 + }, + "assignTs": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the alarm assignment, in milliseconds", + "example": 1634115928465 + }, + "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" + } + }, + "originatorName": { + "type": "string", + "description": "Alarm originator name", + "example": "Thermostat" + }, + "originatorLabel": { + "type": "string", + "description": "Alarm originator label", + "example": "Thermostat label" + }, + "assignee": { + "$ref": "#/components/schemas/AlarmAssignee", + "description": "Alarm assignee" + }, + "name": { + "type": "string", + "description": "representing type of the Alarm", + "example": "High Temperature Alarm", + "readOnly": true + }, + "status": { + "type": "string", + "description": "status of the Alarm", + "enum": [ + "ACTIVE_UNACK", + "ACTIVE_ACK", + "CLEARED_UNACK", + "CLEARED_ACK" + ], + "example": "ACTIVE_UNACK", + "readOnly": true + }, + "details": { + "$ref": "#/components/schemas/JsonNode" + } + }, + "required": [ + "acknowledged", + "cleared", + "name", + "originator", + "severity", + "status", + "type" + ] + }, + "AlarmNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "alarmTypes": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "alarmSeverities": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CRITICAL", + "MAJOR", + "MINOR", + "WARNING", + "INDETERMINATE" + ] + }, + "uniqueItems": true + }, + "notifyOn": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATED", + "SEVERITY_CHANGED", + "ACKNOWLEDGED", + "CLEARED" + ] + }, + "uniqueItems": true + }, + "clearRule": { + "$ref": "#/components/schemas/ClearRule" + } + } + } + ], + "required": [ + "notifyOn" + ] + }, + "AlarmRule": { + "properties": { + "condition": { + "$ref": "#/components/schemas/AlarmCondition", + "description": "JSON object representing the alarm rule condition" + }, + "schedule": { + "description": "JSON object representing time interval during which the rule is active", + "oneOf": [ + { + "$ref": "#/components/schemas/AnyTimeSchedule" + }, + { + "$ref": "#/components/schemas/CustomTimeSchedule" + }, + { + "$ref": "#/components/schemas/SpecificTimeSchedule" + } + ] + }, + "alarmDetails": { + "type": "string", + "description": "String value representing the additional details for an alarm rule" + }, + "dashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id representing the reference to alarm details dashboard used by mobile application" + } + } + }, + "AlarmSchedule": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "ANY_TIME", + "SPECIFIC_TIME", + "CUSTOM" + ] + }, + "dynamicValue": { + "$ref": "#/components/schemas/DynamicValueString" + } + } + }, + "AllUsersFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + } + ] + }, + "AllowCreateNewDevicesDeviceProfileProvisionConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" + } + ] + }, + "AllowedPermissionsInfo": { + "properties": { + "operationsByResource": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ALL", + "CREATE", + "READ", + "WRITE", + "DELETE", + "RPC_CALL", + "READ_CREDENTIALS", + "WRITE_CREDENTIALS", + "READ_ATTRIBUTES", + "WRITE_ATTRIBUTES", + "READ_TELEMETRY", + "WRITE_TELEMETRY", + "ADD_TO_GROUP", + "REMOVE_FROM_GROUP", + "CHANGE_OWNER", + "IMPERSONATE", + "CLAIM_DEVICES", + "SHARE_GROUP", + "ASSIGN_TO_TENANT", + "READ_CALCULATED_FIELD", + "WRITE_CALCULATED_FIELD" + ] + }, + "uniqueItems": true + }, + "description": "Static map (vocabulary) of allowed operations by resource type" + }, + "allowedForGroupRoleOperations": { + "type": "array", + "description": "Static set (vocabulary) of allowed operations for group roles", + "items": { + "type": "string", + "enum": [ + "ALL", + "CREATE", + "READ", + "WRITE", + "DELETE", + "RPC_CALL", + "READ_CREDENTIALS", + "WRITE_CREDENTIALS", + "READ_ATTRIBUTES", + "WRITE_ATTRIBUTES", + "READ_TELEMETRY", + "WRITE_TELEMETRY", + "ADD_TO_GROUP", + "REMOVE_FROM_GROUP", + "CHANGE_OWNER", + "IMPERSONATE", + "CLAIM_DEVICES", + "SHARE_GROUP", + "ASSIGN_TO_TENANT", + "READ_CALCULATED_FIELD", + "WRITE_CALCULATED_FIELD" + ] + }, + "uniqueItems": true + }, + "allowedForGroupOwnerOnlyOperations": { + "type": "array", + "description": "Static set (vocabulary) of allowed operations for group owner", + "items": { + "type": "string", + "enum": [ + "ALL", + "CREATE", + "READ", + "WRITE", + "DELETE", + "RPC_CALL", + "READ_CREDENTIALS", + "WRITE_CREDENTIALS", + "READ_ATTRIBUTES", + "WRITE_ATTRIBUTES", + "READ_TELEMETRY", + "WRITE_TELEMETRY", + "ADD_TO_GROUP", + "REMOVE_FROM_GROUP", + "CHANGE_OWNER", + "IMPERSONATE", + "CLAIM_DEVICES", + "SHARE_GROUP", + "ASSIGN_TO_TENANT", + "READ_CALCULATED_FIELD", + "WRITE_CALCULATED_FIELD" + ] + }, + "uniqueItems": true + }, + "allowedForGroupOwnerOnlyGroupOperations": { + "type": "array", + "description": "Static set (vocabulary) of allowed group operations for group owner", + "items": { + "type": "string", + "enum": [ + "ALL", + "CREATE", + "READ", + "WRITE", + "DELETE", + "RPC_CALL", + "READ_CREDENTIALS", + "WRITE_CREDENTIALS", + "READ_ATTRIBUTES", + "WRITE_ATTRIBUTES", + "READ_TELEMETRY", + "WRITE_TELEMETRY", + "ADD_TO_GROUP", + "REMOVE_FROM_GROUP", + "CHANGE_OWNER", + "IMPERSONATE", + "CLAIM_DEVICES", + "SHARE_GROUP", + "ASSIGN_TO_TENANT", + "READ_CALCULATED_FIELD", + "WRITE_CALCULATED_FIELD" + ] + }, + "uniqueItems": true + }, + "allowedResources": { + "type": "array", + "description": "Static set (vocabulary) of all possibly allowed resources. Static and depends only on the authority of the user", + "items": { + "type": "string", + "enum": [ + "ALL", + "PROFILE", + "ADMIN_SETTINGS", + "ALARM", + "DEVICE", + "ASSET", + "CUSTOMER", + "DASHBOARD", + "ENTITY_VIEW", + "EDGE", + "TENANT", + "RULE_CHAIN", + "USER", + "WIDGETS_BUNDLE", + "WIDGET_TYPE", + "OAUTH2_CLIENT", + "DOMAIN", + "MOBILE_APP", + "MOBILE_APP_BUNDLE", + "OAUTH2_CONFIGURATION_TEMPLATE", + "TENANT_PROFILE", + "DEVICE_PROFILE", + "ASSET_PROFILE", + "CONVERTER", + "INTEGRATION", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "CUSTOMER_GROUP", + "DEVICE_GROUP", + "ASSET_GROUP", + "USER_GROUP", + "ENTITY_VIEW_GROUP", + "EDGE_GROUP", + "DASHBOARD_GROUP", + "ROLE", + "GROUP_PERMISSION", + "WHITE_LABELING", + "AUDIT_LOG", + "API_USAGE_STATE", + "BILLING", + "TB_RESOURCE", + "OTA_PACKAGE", + "QUEUE", + "QUEUE_STATS", + "VERSION_CONTROL", + "NOTIFICATION", + "MOBILE_APP_SETTINGS", + "CUSTOM_MENU" + ] + }, + "uniqueItems": true + }, + "userPermissions": { + "$ref": "#/components/schemas/MergedUserPermissions", + "description": "JSON object with merged permission for all generic and group roles assigned to all user groups the user belongs to" + }, + "userOwnerId": { + "$ref": "#/components/schemas/EntityId", + "description": "Owner Id of the user (Tenant or Customer)" + } + } + }, + "AnyTimeSchedule": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmSchedule" + } + ] + }, + "ApiUsageLimitNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "apiFeatures": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "TRANSPORT", + "DB", + "RE", + "JS", + "TBEL", + "EMAIL", + "SMS", + "ALARM" + ] + }, + "uniqueItems": true + }, + "notifyOn": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ENABLED", + "WARNING", + "DISABLED" + ] + }, + "uniqueItems": true + } + } + } + ] + }, + "ApiUsageStateFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "customerId": { + "$ref": "#/components/schemas/CustomerId" + } + } + } + ] + }, + "Argument": { + "properties": { + "refEntityId": { + "$ref": "#/components/schemas/EntityId" + }, + "refEntityKey": { + "$ref": "#/components/schemas/ReferencedEntityKey" + }, + "defaultValue": { + "type": "string" + }, + "limit": { + "type": "integer", + "format": "int32" + }, + "timeWindow": { + "type": "integer", + "format": "int64" + } + } + }, + "ArrayNode": {}, + "Asset": { + "properties": { + "id": { + "$ref": "#/components/schemas/AssetId", + "description": "JSON object with the asset Id. Specify this field to update the asset. Referencing non-existing asset Id will cause error. Omit this field to create new asset." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the asset creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Asset Name in scope of Tenant", + "example": "Empire State Building" + }, + "type": { + "type": "string", + "description": "Asset type", + "example": "Building" + }, + "label": { + "type": "string", + "description": "Label that may be used in widgets", + "example": "NY Building" + }, + "assetProfileId": { + "$ref": "#/components/schemas/AssetProfileId", + "description": "JSON object with Asset Profile Id." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the asset" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "AssetId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "ASSET" + ], + "example": "ASSET" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "AssetInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/AssetId", + "description": "JSON object with the asset Id. Specify this field to update the asset. Referencing non-existing asset Id will cause error. Omit this field to create new asset." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the asset creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Asset Name in scope of Tenant", + "example": "Empire State Building" + }, + "type": { + "type": "string", + "description": "Asset type", + "example": "Building" + }, + "label": { + "type": "string", + "description": "Label that may be used in widgets", + "example": "NY Building" + }, + "assetProfileId": { + "$ref": "#/components/schemas/AssetProfileId", + "description": "JSON object with Asset Profile Id." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the asset" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "AssetProfile": { + "description": "A JSON value representing the asset profile.", + "properties": { + "id": { + "$ref": "#/components/schemas/AssetProfileId", + "description": "JSON object with the asset profile Id. Specify this field to update the asset profile. Referencing non-existing asset profile Id will cause error. Omit this field to create new asset profile." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the profile creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id that owns the profile.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Asset Profile Name in scope of Tenant.", + "example": "Building" + }, + "description": { + "type": "string", + "description": "Asset Profile description. " + }, + "image": { + "type": "string", + "description": "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. " + }, + "defaultRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "Reference to the rule chain. If present, the specified rule chain will be used to process all messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the root rule chain will be used to process those messages." + }, + "defaultDashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details." + }, + "defaultQueueName": { + "type": "string", + "description": "Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages." + }, + "defaultEdgeRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "Reference to the edge rule chain. If present, the specified edge rule chain will be used on the edge to process all messages related to asset, including asset updates, telemetry, attribute updates, etc. Otherwise, the edge root rule chain will be used to process those messages." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "default": { + "type": "boolean", + "description": "Used to mark the default profile. Default profile is used when the asset profile is not specified during asset creation." + } + } + }, + "AssetProfileId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "ASSET_PROFILE" + ], + "example": "ASSET_PROFILE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "AssetProfileInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the entity Id. " + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "Tenant id." + }, + "name": { + "type": "string", + "description": "Entity Name" + }, + "image": { + "type": "string", + "description": "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of asset profiles in the grid view. " + }, + "defaultDashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to asset details." + } + } + }, + "AssetSearchQuery": { + "properties": { + "parameters": { + "$ref": "#/components/schemas/RelationsSearchParameters", + "description": "Main search parameters." + }, + "relationType": { + "type": "string", + "description": "Type of the relation between root entity and asset (e.g. 'Contains' or 'Manages')." + }, + "assetTypes": { + "type": "array", + "description": "Array of asset types to filter the related entities (e.g. 'Building', 'Vehicle').", + "items": { + "type": "string" + } + } + } + }, + "AssetSearchQueryFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "rootEntity": { + "$ref": "#/components/schemas/EntityId" + }, + "relationType": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "FROM", + "TO" + ] + }, + "maxLevel": { + "type": "integer", + "format": "int32" + }, + "fetchLastLevelOnly": { + "type": "boolean" + }, + "assetTypes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "AssetTypeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "assetType": { + "type": "string", + "deprecated": true, + "writeOnly": true + }, + "assetTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "assetNameFilter": { + "type": "string" + } + } + } + ] + }, + "AttributeExportData": { + "properties": { + "key": { + "type": "string" + }, + "lastUpdateTs": { + "type": "integer", + "format": "int64" + }, + "booleanValue": { + "type": "boolean" + }, + "strValue": { + "type": "string" + }, + "longValue": { + "type": "integer", + "format": "int64" + }, + "doubleValue": { + "type": "number", + "format": "double" + }, + "jsonValue": { + "type": "string" + } + } + }, + "AttributesEntityView": { + "properties": { + "cs": { + "type": "array", + "description": "List of client-side attribute keys to expose", + "example": [ + "currentConfiguration" + ], + "items": { + "type": "string" + } + }, + "ss": { + "type": "array", + "description": "List of server-side attribute keys to expose", + "example": [ + "model" + ], + "items": { + "type": "string" + } + }, + "sh": { + "type": "array", + "description": "List of shared attribute keys to expose", + "example": [ + "targetConfiguration" + ], + "items": { + "type": "string" + } + } + }, + "required": [ + "cs", + "sh", + "ss" + ] + }, + "AuditLog": { + "properties": { + "id": { + "$ref": "#/components/schemas/AuditLogId", + "description": "JSON object with the auditLog Id" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the auditLog creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "entityId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Entity id", + "readOnly": true + }, + "entityName": { + "type": "string", + "description": "Name of the logged entity", + "example": "Thermometer", + "readOnly": true + }, + "userId": { + "$ref": "#/components/schemas/UserId", + "description": "JSON object with User id.", + "readOnly": true + }, + "userName": { + "type": "string", + "description": "Unique user name(email) of the user that performed some action on logged entity", + "example": "tenant@thingsboard.org", + "readOnly": true + }, + "actionType": { + "type": "string", + "description": "String represented Action type", + "enum": [ + "ADDED", + "DELETED", + "UPDATED", + "ATTRIBUTES_UPDATED", + "ATTRIBUTES_DELETED", + "TIMESERIES_UPDATED", + "TIMESERIES_DELETED", + "RPC_CALL", + "CREDENTIALS_UPDATED", + "ASSIGNED_TO_CUSTOMER", + "UNASSIGNED_FROM_CUSTOMER", + "CHANGE_OWNER", + "ACTIVATED", + "SUSPENDED", + "CREDENTIALS_READ", + "ATTRIBUTES_READ", + "RELATION_ADD_OR_UPDATE", + "RELATION_DELETED", + "RELATIONS_DELETED", + "ALARM_ACK", + "ALARM_CLEAR", + "ALARM_DELETE", + "ALARM_ASSIGNED", + "ALARM_UNASSIGNED", + "ADDED_TO_ENTITY_GROUP", + "REMOVED_FROM_ENTITY_GROUP", + "REST_API_RULE_ENGINE_CALL", + "MADE_PUBLIC", + "MADE_PRIVATE", + "LOGIN", + "LOGOUT", + "LOCKOUT", + "ASSIGNED_FROM_TENANT", + "ASSIGNED_TO_TENANT", + "PROVISION_SUCCESS", + "PROVISION_FAILURE", + "ASSIGNED_TO_EDGE", + "UNASSIGNED_FROM_EDGE", + "ADDED_COMMENT", + "UPDATED_COMMENT", + "DELETED_COMMENT", + "SMS_SENT", + "SUBSCRIPTION_CREATED", + "SUBSCRIPTION_UPDATED", + "SUBSCRIPTION_CANCELED", + "SUBSCRIPTION_PLAN_UPDATED", + "SUBSCRIPTION_COUPON_APPLIED" + ], + "example": "ADDED", + "readOnly": true + }, + "actionData": { + "$ref": "#/components/schemas/JsonNode", + "description": "JsonNode represented action data", + "readOnly": true + }, + "actionStatus": { + "type": "string", + "description": "String represented Action status", + "enum": [ + "SUCCESS", + "FAILURE" + ], + "example": "SUCCESS", + "readOnly": true + }, + "actionFailureDetails": { + "type": "string", + "description": "Failure action details info. An empty string in case of action status type 'SUCCESS', otherwise includes stack trace of the caused exception.", + "readOnly": true + } + } + }, + "AuditLogId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "AutoCommitSettings": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/AutoVersionCreateConfig" + } + }, + "AutoVersionCreateConfig": { + "properties": { + "saveRelations": { + "type": "boolean" + }, + "saveAttributes": { + "type": "boolean" + }, + "saveCredentials": { + "type": "boolean" + }, + "saveCalculatedFields": { + "type": "boolean" + }, + "savePermissions": { + "type": "boolean" + }, + "saveGroupEntities": { + "type": "boolean" + }, + "branch": { + "type": "string" + } + } + }, + "AwsSnsSmsProviderConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/SmsProviderConfiguration" + }, + { + "type": "object", + "properties": { + "accessKeyId": { + "type": "string", + "description": "The AWS SNS Access Key ID." + }, + "secretAccessKey": { + "type": "string", + "description": "The AWS SNS Access Key." + }, + "region": { + "type": "string", + "description": "The AWS region." + } + } + } + ] + }, + "BackupCodeTwoFaAccountConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaAccountConfig" + }, + { + "type": "object", + "properties": { + "codes": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "codesLeft": { + "type": "integer", + "format": "int32" + } + } + } + ], + "required": [ + "codes" + ] + }, + "BackupCodeTwoFaProviderConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaProviderConfig" + }, + { + "type": "object", + "properties": { + "codesQuantity": { + "type": "integer", + "format": "int32", + "minimum": 1 + } + } + } + ] + }, + "BlobEntityId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "BLOB_ENTITY" + ], + "example": "BLOB_ENTITY" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "BlobEntityInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/BlobEntityId", + "description": "JSON object with the blob entity Id. Referencing non-existing blob entity Id will cause error" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the blob entity creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "blob entity name", + "example": "report-2021-10-29_14:00:00.pdf", + "readOnly": true + }, + "type": { + "type": "string", + "description": "blob entity type", + "example": "report", + "readOnly": true + }, + "contentType": { + "type": "string", + "description": "blob content type", + "enum": [ + "application/pdf", + "image/jpeg", + "image/png" + ], + "example": "application/pdf", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the blob entity" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + } + }, + "BlobEntityWithCustomerInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/BlobEntityId", + "description": "JSON object with the blob entity Id. Referencing non-existing blob entity Id will cause error" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the blob entity creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "blob entity name", + "example": "report-2021-10-29_14:00:00.pdf", + "readOnly": true + }, + "type": { + "type": "string", + "description": "blob entity type", + "example": "report", + "readOnly": true + }, + "contentType": { + "type": "string", + "description": "blob content type", + "enum": [ + "application/pdf", + "image/jpeg", + "image/png" + ], + "example": "application/pdf", + "readOnly": true + }, + "customerTitle": { + "type": "string", + "description": "Title of the customer", + "example": "Company A" + }, + "customerIsPublic": { + "type": "boolean", + "description": "Parameter that specifies if customer is public", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the blob entity" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + } + }, + "BooleanFilterPredicate": { + "allOf": [ + { + "$ref": "#/components/schemas/KeyFilterPredicate" + }, + { + "type": "object", + "properties": { + "operation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL" + ] + }, + "value": { + "$ref": "#/components/schemas/FilterPredicateValueBoolean" + } + } + } + ] + }, + "BranchInfo": { + "properties": { + "name": { + "type": "string" + }, + "default": { + "type": "boolean" + } + } + }, + "BulkImportRequest": { + "properties": { + "file": { + "type": "string" + }, + "mapping": { + "$ref": "#/components/schemas/Mapping" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId" + }, + "entityGroupId": { + "type": "string" + } + } + }, + "BulkImportResultAsset": { + "properties": { + "created": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "updated": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "errors": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "errorsList": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BulkImportResultDevice": { + "properties": { + "created": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "updated": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "errors": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "errorsList": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "BulkImportResultEdge": { + "properties": { + "created": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "updated": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "errors": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "errorsList": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Button": { + "properties": { + "enabled": { + "type": "boolean" + }, + "text": { + "type": "string" + }, + "linkType": { + "type": "string", + "enum": [ + "LINK", + "DASHBOARD" + ] + }, + "link": { + "type": "string" + }, + "dashboardId": { + "type": "string", + "format": "uuid" + }, + "dashboardState": { + "type": "string" + }, + "setEntityIdInState": { + "type": "boolean" + } + } + }, + "CalculatedField": { + "properties": { + "id": { + "$ref": "#/components/schemas/CalculatedFieldId", + "description": "JSON object with the Calculated Field Id. Referencing non-existing Calculated Field Id will cause error." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the calculated field creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "type": { + "type": "string", + "enum": [ + "SIMPLE", + "SCRIPT" + ] + }, + "name": { + "type": "string", + "description": "User defined name of the calculated field." + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "writeOnly": true + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "configurationVersion": { + "type": "integer", + "format": "int32", + "description": "Version of calculated field configuration.", + "example": 0 + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/components/schemas/ScriptCalculatedFieldConfiguration" + }, + { + "$ref": "#/components/schemas/SimpleCalculatedFieldConfiguration" + } + ] + }, + "version": { + "type": "integer", + "format": "int64" + } + } + }, + "CalculatedFieldConfiguration": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "arguments": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Argument" + } + }, + "expression": { + "type": "string" + }, + "output": { + "$ref": "#/components/schemas/Output" + }, + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "CalculatedFieldDebugEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "isError": { + "type": "boolean", + "writeOnly": true + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + }, + "entityId": { + "type": "string", + "description": "String value representing the entity id in the event body", + "example": "57b6bafe-d600-423c-9267-fe31e5218986" + }, + "entityType": { + "type": "string", + "description": "String value representing the entity type", + "enum": [ + "DEVICE" + ] + }, + "msgId": { + "type": "string", + "description": "String value representing the message id in the rule engine", + "example": "dcf44612-2ce4-4e5d-b462-ebb9c5628228" + }, + "msgType": { + "type": "string", + "description": "String value representing the message type", + "example": "POST_TELEMETRY_REQUEST" + }, + "arguments": { + "type": "string", + "description": "String value representing the arguments that were used in the calculation performed", + "example": { + "x": { + "ts": 1739432016629, + "value": 20 + }, + "y": { + "ts": 1739429717656, + "value": 12 + } + } + }, + "result": { + "type": "string", + "description": "String value representing the result of a calculation", + "example": { + "x + y": 32 + } + }, + "error": { + "type": "boolean" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "CalculatedFieldId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "CALCULATED_FIELD" + ], + "example": "CALCULATED_FIELD" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "CaptchaClientParams": { + "properties": { + "captchaSiteKey": { + "type": "string" + }, + "captchaVersion": { + "type": "string" + }, + "captchaAction": { + "type": "string" + } + } + }, + "CaptchaParams": { + "discriminator": { + "propertyName": "version" + }, + "properties": { + "version": { + "type": "string" + } + } + }, + "CertificateInfo": { + "properties": { + "status": { + "type": "string", + "enum": [ + "PENDING_VALIDATION", + "ISSUED", + "INACTIVE", + "EXPIRED", + "VALIDATION_TIMED_OUT", + "REVOKED", + "FAILED", + "UNKNOWN" + ] + }, + "domainName": { + "type": "string" + }, + "serialNumber": { + "type": "string" + }, + "notBefore": { + "type": "integer", + "format": "int64" + }, + "notAfter": { + "type": "integer", + "format": "int64" + }, + "requestedAt": { + "type": "integer", + "format": "int64" + }, + "issuedAt": { + "type": "integer", + "format": "int64" + }, + "acmeCertificateId": { + "$ref": "#/components/schemas/AcmeCertificateId" + } + } + }, + "ChangePasswordRequest": { + "description": "Change Password Request", + "properties": { + "currentPassword": { + "type": "string", + "description": "The old password", + "example": "OldPassword" + }, + "newPassword": { + "type": "string", + "description": "The new password", + "example": "NewPassword" + } + } + }, + "CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" + } + ] + }, + "ClaimRequest": { + "description": "Claiming request which can optionally contain secret key", + "properties": { + "secretKey": { + "type": "string" + } + } + }, + "ClearRule": { + "properties": { + "alarmStatuses": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ANY", + "ACTIVE", + "CLEARED", + "ACK", + "UNACK" + ] + }, + "uniqueItems": true + } + } + }, + "ClientAttributesQueryingSnmpCommunicationConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpCommunicationConfig" + }, + { + "type": "object", + "properties": { + "mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnmpMapping" + } + }, + "queryingFrequencyMs": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "CoapDeviceProfileTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" + }, + { + "type": "object", + "properties": { + "coapDeviceTypeConfiguration": { + "$ref": "#/components/schemas/CoapDeviceTypeConfiguration" + }, + "clientSettings": { + "$ref": "#/components/schemas/PowerSavingConfiguration" + } + } + } + ] + }, + "CoapDeviceTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceTransportConfiguration" + }, + { + "type": "object", + "properties": { + "powerMode": { + "type": "string", + "enum": [ + "PSM", + "DRX", + "E_DRX" + ] + }, + "psmActivityTimer": { + "type": "integer", + "format": "int64" + }, + "edrxCycle": { + "type": "integer", + "format": "int64" + }, + "pagingTransmissionWindow": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "CoapDeviceTypeConfiguration": { + "discriminator": { + "propertyName": "coapDeviceType" + }, + "properties": { + "coapDeviceType": { + "type": "string" + } + }, + "required": [ + "coapDeviceType" + ] + }, + "ColumnMapping": { + "properties": { + "type": { + "type": "string", + "enum": [ + "NAME", + "TYPE", + "LABEL", + "SHARED_ATTRIBUTE", + "SERVER_ATTRIBUTE", + "TIMESERIES", + "ACCESS_TOKEN", + "X509", + "MQTT_CLIENT_ID", + "MQTT_USER_NAME", + "MQTT_PASSWORD", + "LWM2M_CLIENT_ENDPOINT", + "LWM2M_CLIENT_SECURITY_CONFIG_MODE", + "LWM2M_CLIENT_IDENTITY", + "LWM2M_CLIENT_KEY", + "LWM2M_CLIENT_CERT", + "LWM2M_BOOTSTRAP_SERVER_SECURITY_MODE", + "LWM2M_BOOTSTRAP_SERVER_PUBLIC_KEY_OR_ID", + "LWM2M_BOOTSTRAP_SERVER_SECRET_KEY", + "LWM2M_SERVER_SECURITY_MODE", + "LWM2M_SERVER_CLIENT_PUBLIC_KEY_OR_ID", + "LWM2M_SERVER_CLIENT_SECRET_KEY", + "SNMP_HOST", + "SNMP_PORT", + "SNMP_VERSION", + "SNMP_COMMUNITY_STRING", + "IS_GATEWAY", + "DESCRIPTION", + "EDGE_LICENSE_KEY", + "CLOUD_ENDPOINT", + "ROUTING_KEY", + "SECRET" + ] + }, + "key": { + "type": "string" + } + } + }, + "ComparisonTsValue": { + "properties": { + "current": { + "$ref": "#/components/schemas/TsValue" + }, + "previous": { + "$ref": "#/components/schemas/TsValue" + } + } + }, + "ComplexFilterPredicate": { + "allOf": [ + { + "$ref": "#/components/schemas/KeyFilterPredicate" + }, + { + "type": "object", + "properties": { + "operation": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "predicates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyFilterPredicate" + } + } + } + } + ] + }, + "ComplexVersionCreateRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionCreateRequest" + }, + { + "type": "object", + "properties": { + "syncStrategy": { + "type": "string", + "enum": [ + "MERGE", + "OVERWRITE" + ] + }, + "entityTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EntityTypeVersionCreateConfig" + } + } + } + } + ] + }, + "ComponentDescriptor": { + "properties": { + "id": { + "$ref": "#/components/schemas/ComponentDescriptorId", + "description": "JSON object with the descriptor Id. Specify existing descriptor id to update the descriptor. Referencing non-existing descriptor Id will cause error. Omit this field to create new descriptor." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the descriptor creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "type": { + "type": "string", + "description": "Type of the Rule Node", + "enum": [ + "ENRICHMENT", + "FILTER", + "TRANSFORMATION", + "ACTION", + "ANALYTICS", + "EXTERNAL", + "FLOW" + ], + "readOnly": true + }, + "scope": { + "type": "string", + "description": "Scope of the Rule Node. Always set to 'TENANT', since no rule chains on the 'SYSTEM' level yet.", + "enum": [ + "TENANT" + ], + "example": "TENANT", + "readOnly": true + }, + "clusteringMode": { + "type": "string", + "description": "Clustering mode of the RuleNode. This mode represents the ability to start Rule Node in multiple microservices.", + "enum": [ + "USER_PREFERENCE", + "ENABLED", + "SINGLETON" + ], + "example": "ENABLED", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the Rule Node. Taken from the @RuleNode annotation.", + "example": "Custom Rule Node", + "readOnly": true + }, + "clazz": { + "type": "string", + "description": "Full name of the Java class that implements the Rule Engine Node interface.", + "example": "com.mycompany.CustomRuleNode", + "readOnly": true + }, + "configurationVersion": { + "type": "integer", + "format": "int32", + "description": "Rule node configuration version. By default, this value is 0. If the rule node is a versioned node, this value might be greater than 0.", + "readOnly": true + }, + "actions": { + "type": "string", + "description": "Rule Node Actions. Deprecated. Always null.", + "readOnly": true + }, + "hasQueueName": { + "type": "boolean", + "description": "Indicates that the RuleNode supports queue name configuration.", + "example": true, + "readOnly": true + }, + "configurationDescriptor": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "ComponentDescriptorId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "ContactBasedObject": { + "properties": { + "id": {}, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "country": { + "type": "string" + }, + "state": { + "type": "string" + }, + "city": { + "type": "string" + }, + "address": { + "type": "string" + }, + "address2": { + "type": "string" + }, + "zip": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "email": { + "type": "string" + }, + "name": { + "type": "string" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "Converter": { + "properties": { + "id": { + "$ref": "#/components/schemas/ConverterId", + "description": "JSON object with the Converter Id. Specify this field to update the Converter. Referencing non-existing Converter Id will cause error. Omit this field to create new Converter." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the converter creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Converter Name in scope of Tenant", + "example": "Http Converter" + }, + "type": { + "type": "string", + "description": "The type of the converter to process incoming or outgoing messages", + "enum": [ + "UPLINK", + "DOWNLINK" + ] + }, + "integrationType": { + "type": "string", + "description": "The type of the integration to which the converter is dedicated", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "description": "Enable/disable debug. ", + "example": false + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object representing converter configuration. It 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'" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the converter" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template converter" + }, + "converterVersion": { + "type": "integer", + "format": "int32" + }, + "version": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "name", + "type" + ] + }, + "ConverterId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "CONVERTER" + ], + "example": "CONVERTER" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "ConvertersInfo": { + "properties": { + "library": { + "type": "boolean" + }, + "existing": { + "type": "boolean" + }, + "keys": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "CustomMenu": { + "properties": { + "id": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id that owns the menu.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id that owns the menu.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Custom menu name", + "example": "Customer A custom menu" + }, + "scope": { + "type": "string", + "description": "Custom menu scope. Possible values: SYSTEM, TENANT, CUSTOMER", + "enum": [ + "SYSTEM", + "TENANT", + "CUSTOMER" + ], + "example": "TENANT" + }, + "assigneeType": { + "type": "string", + "description": "Custom menu assignee type. Possible values are: All (all users of specified scope), CUSTOMERS (specified customers), USERS (specified list of users), NO_ASSIGN (no assignees)", + "enum": [ + "NO_ASSIGN", + "ALL", + "CUSTOMERS", + "USERS" + ], + "example": "ALL" + }, + "config": { + "$ref": "#/components/schemas/CustomMenuConfig", + "description": "Custom menu configuration" + } + }, + "required": [ + "assigneeType", + "name", + "scope" + ] + }, + "CustomMenuConfig": { + "description": "A JSON value representing the custom menu configuration", + "properties": { + "items": { + "type": "array", + "description": "List of custom menu items", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CustomMenuItem" + }, + { + "$ref": "#/components/schemas/DefaultMenuItem" + }, + { + "$ref": "#/components/schemas/HomeMenuItem" + } + ] + } + } + }, + "required": [ + "items" + ] + }, + "CustomMenuDeleteResult": { + "properties": { + "success": { + "type": "boolean" + }, + "assigneeType": { + "type": "string", + "enum": [ + "NO_ASSIGN", + "ALL", + "CUSTOMERS", + "USERS" + ] + }, + "assigneeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityInfo" + } + } + } + }, + "CustomMenuId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "CustomMenuInfo": { + "description": "A JSON value representing the custom menu basic info fields", + "properties": { + "id": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id that owns the menu.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id that owns the menu.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Custom menu name", + "example": "Customer A custom menu" + }, + "scope": { + "type": "string", + "description": "Custom menu scope. Possible values: SYSTEM, TENANT, CUSTOMER", + "enum": [ + "SYSTEM", + "TENANT", + "CUSTOMER" + ], + "example": "TENANT" + }, + "assigneeType": { + "type": "string", + "description": "Custom menu assignee type. Possible values are: All (all users of specified scope), CUSTOMERS (specified customers), USERS (specified list of users), NO_ASSIGN (no assignees)", + "enum": [ + "NO_ASSIGN", + "ALL", + "CUSTOMERS", + "USERS" + ], + "example": "ALL" + } + }, + "required": [ + "assigneeType", + "name", + "scope" + ] + }, + "CustomMenuItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MenuItem" + }, + { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the menu item", + "example": "My Custom Menu" + }, + "icon": { + "type": "string", + "description": "URL of the menu item icon. Overrides 'materialIcon'", + "example": "My Custom Menu" + }, + "menuItemType": { + "type": "string", + "description": "Type of menu item (LINK or SECTION). LINK type means item has no child items, SECTION type should have at least one child", + "enum": [ + "LINK", + "SECTION" + ], + "example": "LINK" + }, + "linkType": { + "type": "string", + "description": "Type of menu item (URL or DASHBOARD)", + "enum": [ + "URL", + "DASHBOARD" + ], + "example": "URL" + }, + "dashboardId": { + "type": "string", + "description": "Id of the Dashboard to open, when user clicks the menu item", + "example": "https://mycompany.com" + }, + "hideDashboardToolbar": { + "type": "boolean", + "description": "Hide the dashboard toolbar" + }, + "url": { + "type": "string", + "description": "URL to open in the iframe, when user clicks the menu item", + "example": "https://myexternalurl.com" + }, + "setAccessToken": { + "type": "boolean", + "description": "Set the access token of the current user to a new dashboard" + }, + "visible": { + "type": "boolean", + "description": "Mark if menu item is visible for user" + }, + "pages": { + "type": "array", + "description": "List of child menu items", + "items": { + "$ref": "#/components/schemas/CustomMenuItem" + } + } + } + } + ], + "required": [ + "menuItemType", + "name" + ] + }, + "CustomMobilePage": { + "allOf": [ + { + "$ref": "#/components/schemas/MobilePage" + }, + { + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "Path to custom page", + "example": "/alarmDetails/868c7083-032d-4f52-b8b4-7859aebb6a4e" + }, + "label": { + "type": "string", + "description": "Page label", + "example": "Air quality" + }, + "visible": { + "type": "boolean", + "description": "Indicates if page is visible", + "example": true + }, + "icon": { + "type": "string", + "description": "URL of the page icon", + "example": "home_icon" + } + } + } + ], + "required": [ + "visible" + ] + }, + "CustomTimeSchedule": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmSchedule" + }, + { + "type": "object", + "properties": { + "timezone": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomTimeScheduleItem" + } + } + } + } + ] + }, + "CustomTimeScheduleItem": { + "properties": { + "enabled": { + "type": "boolean" + }, + "dayOfWeek": { + "type": "integer", + "format": "int32" + }, + "startsOn": { + "type": "integer", + "format": "int64" + }, + "endsOn": { + "type": "integer", + "format": "int64" + } + } + }, + "Customer": { + "properties": { + "id": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with the customer Id. Specify this field to update the customer. Referencing non-existing customer Id will cause error. Omit this field to create new customer." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the customer creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "country": { + "type": "string", + "description": "Country", + "example": "US" + }, + "state": { + "type": "string", + "description": "State", + "example": "NY" + }, + "city": { + "type": "string", + "description": "City", + "example": "New York" + }, + "address": { + "type": "string", + "description": "Address Line 1", + "example": 42 + }, + "address2": { + "type": "string", + "description": "Address Line 2" + }, + "zip": { + "type": "string", + "description": "Zip code", + "example": 10004 + }, + "phone": { + "type": "string", + "description": "Phone number", + "example": "+1(415)777-7777" + }, + "email": { + "type": "string", + "description": "Email", + "example": "example@company.com" + }, + "title": { + "type": "string", + "description": "Title of the customer", + "example": "Company A" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "parentCustomerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with parent Customer Id" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "name": { + "type": "string", + "description": "Name of the customer. Read-only, duplicated from title for backward compatibility", + "example": "Company A", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with parent Customer Id", + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "email", + "title" + ] + }, + "CustomerId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "CUSTOMER" + ], + "example": "CUSTOMER" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "CustomerInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with the customer Id. Specify this field to update the customer. Referencing non-existing customer Id will cause error. Omit this field to create new customer." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the customer creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "country": { + "type": "string", + "description": "Country", + "example": "US" + }, + "state": { + "type": "string", + "description": "State", + "example": "NY" + }, + "city": { + "type": "string", + "description": "City", + "example": "New York" + }, + "address": { + "type": "string", + "description": "Address Line 1", + "example": 42 + }, + "address2": { + "type": "string", + "description": "Address Line 2" + }, + "zip": { + "type": "string", + "description": "Zip code", + "example": 10004 + }, + "phone": { + "type": "string", + "description": "Phone number", + "example": "+1(415)777-7777" + }, + "email": { + "type": "string", + "description": "Email", + "example": "example@company.com" + }, + "title": { + "type": "string", + "description": "Title of the customer", + "example": "Company A" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "parentCustomerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with parent Customer Id" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the customer. Read-only, duplicated from title for backward compatibility", + "example": "Company A", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with parent Customer Id", + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "email", + "title" + ] + }, + "CustomerUsersFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + }, + { + "type": "object", + "properties": { + "customerId": { + "type": "string", + "format": "uuid" + } + } + } + ], + "required": [ + "customerId" + ] + }, + "Dashboard": { + "properties": { + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "image": { + "type": "string", + "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", + "readOnly": 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", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." + }, + "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 + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } + }, + "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. " + }, + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + } + }, + "DashboardId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "DASHBOARD" + ], + "example": "DASHBOARD" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "DashboardInfo": { + "properties": { + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "image": { + "type": "string", + "description": "Thumbnail picture for rendering of the dashboards in a grid view on mobile devices.", + "readOnly": 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", + "description": "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. The JSON structure of the dashboard configuration is quite complex. The easiest way to learn it is to export existing dashboard to JSON." + }, + "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 + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } + }, + "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. " + }, + "assignedCustomers": { + "type": "array", + "description": "List of assigned customers with their info.", + "items": { + "$ref": "#/components/schemas/ShortCustomerInfo" + }, + "readOnly": true, + "uniqueItems": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + } + }, + "DashboardPage": { + "allOf": [ + { + "$ref": "#/components/schemas/MobilePage" + }, + { + "type": "object", + "properties": { + "dashboardId": { + "type": "string", + "description": "Dashboard id", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "label": { + "type": "string", + "description": "Page label", + "example": "Air quality" + }, + "visible": { + "type": "boolean", + "description": "Indicates if page is visible", + "example": true + }, + "icon": { + "type": "string", + "description": "URL of the page icon", + "example": "home_icon" + } + } + } + ], + "required": [ + "visible" + ] + }, + "DebugConverterEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "isError": { + "type": "boolean", + "writeOnly": true + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + }, + "type": { + "type": "string" + }, + "in": { + "type": "string" + }, + "out": { + "type": "string" + }, + "metadata": { + "type": "string" + }, + "error": { + "type": "boolean" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "DebugIntegrationEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "isError": { + "type": "boolean", + "writeOnly": true + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + }, + "type": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusIntegration": { + "type": "string" + }, + "error": { + "type": "boolean" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "DebugSettings": { + "properties": { + "failuresEnabled": { + "type": "boolean", + "description": "Debug failures. ", + "example": false + }, + "allEnabled": { + "type": "boolean", + "description": "Debug All. Used as a trigger for updating debugAllUntil.", + "example": false + }, + "allEnabledUntil": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the end time for the processing debug events." + } + } + }, + "DefaultCoapDeviceTypeConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/CoapDeviceTypeConfiguration" + }, + { + "type": "object", + "properties": { + "transportPayloadTypeConfiguration": { + "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" + } + } + } + ] + }, + "DefaultDashboardParams": { + "properties": { + "id": { + "type": "string", + "description": "Default dashboard Id to assign for the new user.", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "fullscreen": { + "type": "boolean", + "description": "Set default dashboard to full screen mode." + } + } + }, + "DefaultDeviceConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceConfiguration" + } + ] + }, + "DefaultDeviceProfileConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileConfiguration" + } + ] + }, + "DefaultDeviceProfileTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" + } + ] + }, + "DefaultDeviceTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceTransportConfiguration" + } + ] + }, + "DefaultMenuItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MenuItem" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for predefined menu items", + "example": "home", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the menu item", + "example": "My Custom Menu" + }, + "icon": { + "type": "string", + "description": "URL of the menu item icon. Overrides 'materialIcon'", + "example": "My Custom Menu" + }, + "visible": { + "type": "boolean", + "description": "Mark if menu item is visible for user" + }, + "pages": { + "type": "array", + "description": "List of child menu items", + "items": { + "$ref": "#/components/schemas/DefaultMenuItem" + } + } + } + } + ] + }, + "DefaultMobilePage": { + "allOf": [ + { + "$ref": "#/components/schemas/MobilePage" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier for default page", + "enum": [ + "HOME", + "ALARMS", + "DEVICES", + "CUSTOMERS", + "ASSETS", + "AUDIT_LOGS", + "NOTIFICATIONS", + "DEVICE_LIST", + "DASHBOARDS" + ], + "example": "HOME" + }, + "label": { + "type": "string", + "description": "Page label", + "example": "Air quality" + }, + "visible": { + "type": "boolean", + "description": "Indicates if page is visible", + "example": true + }, + "icon": { + "type": "string", + "description": "URL of the page icon", + "example": "home_icon" + } + } + } + ], + "required": [ + "visible" + ] + }, + "DefaultRuleChainCreateRequest": { + "description": "A JSON value representing the request.", + "properties": { + "name": { + "type": "string", + "description": "Name of the new rule chain", + "example": "Root Rule Chain" + } + }, + "required": [ + "name" + ] + }, + "DefaultTenantProfileConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/TenantProfileConfiguration" + }, + { + "type": "object", + "properties": { + "maxDevices": { + "type": "integer", + "format": "int64" + }, + "maxAssets": { + "type": "integer", + "format": "int64" + }, + "maxCustomers": { + "type": "integer", + "format": "int64" + }, + "maxUsers": { + "type": "integer", + "format": "int64" + }, + "maxDashboards": { + "type": "integer", + "format": "int64" + }, + "maxRuleChains": { + "type": "integer", + "format": "int64" + }, + "maxEdges": { + "type": "integer", + "format": "int64" + }, + "maxResourcesInBytes": { + "type": "integer", + "format": "int64" + }, + "maxOtaPackagesInBytes": { + "type": "integer", + "format": "int64" + }, + "maxResourceSize": { + "type": "integer", + "format": "int64" + }, + "maxIntegrations": { + "type": "integer", + "format": "int64" + }, + "maxConverters": { + "type": "integer", + "format": "int64" + }, + "maxSchedulerEvents": { + "type": "integer", + "format": "int64" + }, + "whiteLabelingEnabled": { + "type": "boolean" + }, + "trendzEnabled": { + "type": "boolean" + }, + "transportTenantMsgRateLimit": { + "type": "string", + "example": "1000:1,20000:60" + }, + "transportTenantTelemetryMsgRateLimit": { + "type": "string", + "example": "1000:1,20000:60" + }, + "transportTenantTelemetryDataPointsRateLimit": { + "type": "string", + "example": "1000:1,20000:60" + }, + "transportDeviceMsgRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportDeviceTelemetryMsgRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportDeviceTelemetryDataPointsRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportGatewayMsgRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportGatewayTelemetryMsgRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportGatewayTelemetryDataPointsRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportGatewayDeviceMsgRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportGatewayDeviceTelemetryMsgRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "transportGatewayDeviceTelemetryDataPointsRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "integrationMsgsPerTenantRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "integrationMsgsPerDeviceRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "integrationMsgsPerAssetRateLimit": { + "type": "string" + }, + "tenantEntityExportRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "tenantEntityImportRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "tenantNotificationRequestsRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "tenantNotificationRequestsPerRuleRateLimit": { + "type": "string", + "example": "20:1,600:60" + }, + "maxTransportMessages": { + "type": "integer", + "format": "int64", + "example": 10000000 + }, + "maxTransportDataPoints": { + "type": "integer", + "format": "int64", + "example": 10000000 + }, + "maxREExecutions": { + "type": "integer", + "format": "int64", + "example": 4000000 + }, + "maxJSExecutions": { + "type": "integer", + "format": "int64", + "example": 5000000 + }, + "maxTbelExecutions": { + "type": "integer", + "format": "int64", + "example": 5000000 + }, + "maxDPStorageDays": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "maxRuleNodeExecutionsPerMessage": { + "type": "integer", + "format": "int32", + "example": 50 + }, + "maxDebugModeDurationMinutes": { + "type": "integer", + "format": "int32", + "example": 15 + }, + "maxEmails": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "smsEnabled": { + "type": "boolean", + "example": true + }, + "maxSms": { + "type": "integer", + "format": "int64", + "example": 0 + }, + "maxCreatedAlarms": { + "type": "integer", + "format": "int64", + "example": 1000 + }, + "tenantServerRestLimitsConfiguration": { + "type": "string" + }, + "customerServerRestLimitsConfiguration": { + "type": "string" + }, + "maxWsSessionsPerTenant": { + "type": "integer", + "format": "int32" + }, + "maxWsSessionsPerCustomer": { + "type": "integer", + "format": "int32" + }, + "maxWsSessionsPerRegularUser": { + "type": "integer", + "format": "int32" + }, + "maxWsSessionsPerPublicUser": { + "type": "integer", + "format": "int32" + }, + "wsMsgQueueLimitPerSession": { + "type": "integer", + "format": "int32" + }, + "maxWsSubscriptionsPerTenant": { + "type": "integer", + "format": "int64" + }, + "maxWsSubscriptionsPerCustomer": { + "type": "integer", + "format": "int64" + }, + "maxWsSubscriptionsPerRegularUser": { + "type": "integer", + "format": "int64" + }, + "maxWsSubscriptionsPerPublicUser": { + "type": "integer", + "format": "int64" + }, + "wsUpdatesPerSessionRateLimit": { + "type": "string" + }, + "cassandraQueryTenantRateLimitsConfiguration": { + "type": "string" + }, + "edgeEventRateLimits": { + "type": "string" + }, + "edgeEventRateLimitsPerEdge": { + "type": "string" + }, + "edgeUplinkMessagesRateLimits": { + "type": "string" + }, + "edgeUplinkMessagesRateLimitsPerEdge": { + "type": "string" + }, + "defaultStorageTtlDays": { + "type": "integer", + "format": "int32" + }, + "alarmsTtlDays": { + "type": "integer", + "format": "int32" + }, + "rpcTtlDays": { + "type": "integer", + "format": "int32" + }, + "queueStatsTtlDays": { + "type": "integer", + "format": "int32" + }, + "ruleEngineExceptionsTtlDays": { + "type": "integer", + "format": "int32" + }, + "blobEntityTtlDays": { + "type": "integer", + "format": "int32" + }, + "warnThreshold": { + "type": "number", + "format": "double" + }, + "maxCalculatedFieldsPerEntity": { + "type": "integer", + "format": "int64", + "example": 5 + }, + "maxArgumentsPerCF": { + "type": "integer", + "format": "int64", + "example": 10 + }, + "maxDataPointsPerRollingArg": { + "type": "integer", + "format": "int64", + "example": 1000, + "minimum": 1 + }, + "maxStateSizeInKBytes": { + "type": "integer", + "format": "int64", + "example": 32 + }, + "maxSingleValueArgumentSizeInKBytes": { + "type": "integer", + "format": "int64", + "example": 2 + } + } + } + ] + }, + "DeleteTenantRequest": { + "properties": { + "reason": { + "type": "string" + }, + "additionalNotes": { + "type": "string" + } + } + }, + "DeliveryMethodNotificationTemplate": { + "discriminator": { + "propertyName": "method" + }, + "properties": { + "enabled": { + "type": "boolean" + }, + "body": { + "type": "string" + }, + "method": { + "type": "string" + } + }, + "required": [ + "body", + "method" + ] + }, + "Device": { + "properties": { + "id": { + "$ref": "#/components/schemas/DeviceId", + "description": "JSON object with the Device Id. Specify this field to update the Device. Referencing non-existing Device Id will cause error. Omit this field to create new Device." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the device creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Device Name in scope of Tenant", + "example": "A4B72CCDFF33" + }, + "type": { + "type": "string", + "description": "Device Profile Name", + "example": "Temperature Sensor" + }, + "label": { + "type": "string", + "description": "Label that may be used in widgets", + "example": "Room 234 Sensor" + }, + "deviceProfileId": { + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with Device Profile Id." + }, + "firmwareId": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with Ota Package Id." + }, + "softwareId": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with Ota Package Id." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "deviceData": { + "$ref": "#/components/schemas/DeviceData", + "description": "JSON object with content specific to type of transport in the device profile." + } + }, + "required": [ + "deviceProfileId" + ] + }, + "DeviceActivityNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "devices": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "deviceProfiles": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "notifyOn": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ACTIVE", + "INACTIVE" + ] + }, + "uniqueItems": true + } + } + } + ], + "required": [ + "notifyOn" + ] + }, + "DeviceConfiguration": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "DeviceCredentials": { + "description": "A JSON value representing the device credentials.", + "properties": { + "id": { + "$ref": "#/components/schemas/DeviceCredentialsId", + "description": "The Id is automatically generated during device creation. Use 'getDeviceCredentialsByDeviceId' to obtain the id based on device id. Use 'updateDeviceCredentials' to update device credentials. ", + "example": "784f394c-42b6-435a-983c-b7beff2784f9", + "readOnly": true + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the device credentials creation, in milliseconds", + "example": 1609459200000 + }, + "deviceId": { + "$ref": "#/components/schemas/DeviceId", + "description": "JSON object with the device Id." + }, + "credentialsType": { + "type": "string", + "description": "Type of the credentials", + "enum": [ + "ACCESS_TOKEN", + "X509_CERTIFICATE", + "MQTT_BASIC", + "LWM2M_CREDENTIALS" + ] + }, + "credentialsId": { + "type": "string", + "description": "Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials.", + "example": "Access token or other value that depends on the credentials type" + }, + "credentialsValue": { + "type": "string", + "description": "Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS", + "example": "Null in case of ACCESS_TOKEN. See model definition." + }, + "version": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "credentialsId", + "deviceId", + "id" + ] + }, + "DeviceCredentialsId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "DeviceData": { + "properties": { + "configuration": { + "description": "Device configuration for device profile type. DEFAULT is only supported value for now", + "oneOf": [ + { + "$ref": "#/components/schemas/DefaultDeviceConfiguration" + } + ] + }, + "transportConfiguration": { + "description": "Device transport configuration used to connect the device", + "oneOf": [ + { + "$ref": "#/components/schemas/CoapDeviceTransportConfiguration" + }, + { + "$ref": "#/components/schemas/DefaultDeviceTransportConfiguration" + }, + { + "$ref": "#/components/schemas/Lwm2mDeviceTransportConfiguration" + }, + { + "$ref": "#/components/schemas/MqttDeviceTransportConfiguration" + }, + { + "$ref": "#/components/schemas/SnmpDeviceTransportConfiguration" + } + ] + } + } + }, + "DeviceExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/Device" + }, + "credentials": { + "$ref": "#/components/schemas/DeviceCredentials" + } + } + } + ] + }, + "DeviceGroupOtaPackage": { + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "groupId": { + "$ref": "#/components/schemas/EntityGroupId" + }, + "otaPackageType": { + "type": "string", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ] + }, + "otaPackageId": { + "$ref": "#/components/schemas/OtaPackageId" + }, + "otaPackageUpdateTime": { + "type": "integer", + "format": "int64" + } + } + }, + "DeviceId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "DEVICE" + ], + "example": "DEVICE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "DeviceInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/DeviceId", + "description": "JSON object with the Device Id. Specify this field to update the Device. Referencing non-existing Device Id will cause error. Omit this field to create new Device." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the device creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignDeviceToCustomer' to change the Customer Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Device Name in scope of Tenant", + "example": "A4B72CCDFF33" + }, + "type": { + "type": "string", + "description": "Device Profile Name", + "example": "Temperature Sensor" + }, + "label": { + "type": "string", + "description": "Label that may be used in widgets", + "example": "Room 234 Sensor" + }, + "deviceProfileId": { + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with Device Profile Id." + }, + "firmwareId": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with Ota Package Id." + }, + "softwareId": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with Ota Package Id." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "active": { + "type": "boolean", + "description": "Device active flag.", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "deviceData": { + "$ref": "#/components/schemas/DeviceData", + "description": "JSON object with content specific to type of transport in the device profile." + } + }, + "required": [ + "deviceProfileId" + ] + }, + "DeviceProfile": { + "description": "A JSON value representing the device profile.", + "properties": { + "id": { + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with the device profile Id. Specify this field to update the device profile. Referencing non-existing device profile Id will cause error. Omit this field to create new device profile." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the profile creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id that owns the profile.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Device Profile Name in scope of Tenant.", + "example": "Moisture Sensor" + }, + "description": { + "type": "string", + "description": "Device Profile description. " + }, + "image": { + "type": "string", + "description": "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. " + }, + "type": { + "type": "string", + "description": "Type of the profile. Always 'DEFAULT' for now. Reserved for future use.", + "enum": [ + "DEFAULT" + ] + }, + "transportType": { + "type": "string", + "description": "Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + }, + "provisionType": { + "type": "string", + "description": "Provisioning strategy.", + "enum": [ + "DISABLED", + "ALLOW_CREATE_NEW_DEVICES", + "CHECK_PRE_PROVISIONED_DEVICES", + "X509_CERTIFICATE_CHAIN" + ] + }, + "defaultRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "Reference to the rule chain. If present, the specified rule chain will be used to process all messages related to device, including telemetry, attribute updates, etc. Otherwise, the root rule chain will be used to process those messages." + }, + "defaultDashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details." + }, + "defaultQueueName": { + "type": "string", + "description": "Rule engine queue name. If present, the specified queue will be used to store all unprocessed messages related to device, including telemetry, attribute updates, etc. Otherwise, the 'Main' queue will be used to store those messages." + }, + "provisionDeviceKey": { + "type": "string", + "description": "Unique provisioning key used by 'Device Provisioning' feature." + }, + "firmwareId": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "Reference to the firmware OTA package. If present, the specified package will be used as default device firmware. " + }, + "softwareId": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "Reference to the software OTA package. If present, the specified package will be used as default device software. " + }, + "defaultEdgeRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "Reference to the edge rule chain. If present, the specified edge rule chain will be used on the edge to process all messages related to device, including telemetry, attribute updates, etc. Otherwise, the edge root rule chain will be used to process those messages." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "default": { + "type": "boolean", + "description": "Used to mark the default profile. Default profile is used when the device profile is not specified during device creation." + }, + "profileData": { + "$ref": "#/components/schemas/DeviceProfileData", + "description": "Complex JSON object that includes addition device profile configuration (transport, alarm rules, etc)." + } + } + }, + "DeviceProfileAlarm": { + "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": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "DeviceProfileData": { + "properties": { + "configuration": { + "description": "JSON object of device profile configuration", + "oneOf": [ + { + "$ref": "#/components/schemas/DefaultDeviceProfileConfiguration" + } + ] + }, + "transportConfiguration": { + "description": "JSON object of device profile transport configuration", + "oneOf": [ + { + "$ref": "#/components/schemas/CoapDeviceProfileTransportConfiguration" + }, + { + "$ref": "#/components/schemas/DefaultDeviceProfileTransportConfiguration" + }, + { + "$ref": "#/components/schemas/Lwm2mDeviceProfileTransportConfiguration" + }, + { + "$ref": "#/components/schemas/MqttDeviceProfileTransportConfiguration" + }, + { + "$ref": "#/components/schemas/SnmpDeviceProfileTransportConfiguration" + } + ] + }, + "provisionConfiguration": { + "description": "JSON object of provisioning strategy type per device profile", + "oneOf": [ + { + "$ref": "#/components/schemas/AllowCreateNewDevicesDeviceProfileProvisionConfiguration" + }, + { + "$ref": "#/components/schemas/CheckPreProvisionedDevicesDeviceProfileProvisionConfiguration" + }, + { + "$ref": "#/components/schemas/DisabledDeviceProfileProvisionConfiguration" + }, + { + "$ref": "#/components/schemas/X509CertificateChainProvisionConfiguration" + } + ] + }, + "alarms": { + "type": "array", + "description": "JSON array of alarm rules configuration per device profile", + "items": { + "$ref": "#/components/schemas/DeviceProfileAlarm" + } + } + } + }, + "DeviceProfileId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "DEVICE_PROFILE" + ], + "example": "DEVICE_PROFILE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "DeviceProfileInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the entity Id. " + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "Tenant id." + }, + "name": { + "type": "string", + "description": "Entity Name" + }, + "image": { + "type": "string", + "description": "Either URL or Base64 data of the icon. Used in the mobile application to visualize set of device profiles in the grid view. " + }, + "defaultDashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "Reference to the dashboard. Used in the mobile application to open the default dashboard when user navigates to device details." + }, + "type": { + "type": "string", + "description": "Type of the profile. Always 'DEFAULT' for now. Reserved for future use.", + "enum": [ + "DEFAULT" + ] + }, + "transportType": { + "type": "string", + "description": "Type of the transport used to connect the device. Default transport supports HTTP, CoAP and MQTT.", + "enum": [ + "DEFAULT", + "MQTT", + "COAP", + "LWM2M", + "SNMP" + ] + } + } + }, + "DeviceProfileProvisionConfiguration": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "provisionDeviceSecret": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "DeviceProfileTransportConfiguration": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "DeviceSearchQuery": { + "description": "The device search query JSON", + "properties": { + "parameters": { + "$ref": "#/components/schemas/RelationsSearchParameters", + "description": "Main search parameters." + }, + "relationType": { + "type": "string", + "description": "Type of the relation between root entity and device (e.g. 'Contains' or 'Manages')." + }, + "deviceTypes": { + "type": "array", + "description": "Array of device types to filter the related entities (e.g. 'Temperature Sensor', 'Smoke Sensor').", + "items": { + "type": "string" + } + } + } + }, + "DeviceSearchQueryFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "rootEntity": { + "$ref": "#/components/schemas/EntityId" + }, + "relationType": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "FROM", + "TO" + ] + }, + "maxLevel": { + "type": "integer", + "format": "int32" + }, + "fetchLastLevelOnly": { + "type": "boolean" + }, + "deviceTypes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "DeviceTransportConfiguration": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "DeviceTypeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "deviceType": { + "type": "string", + "deprecated": true, + "writeOnly": true + }, + "deviceTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "deviceNameFilter": { + "type": "string" + } + } + } + ] + }, + "DisabledDeviceProfileProvisionConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" + } + ] + }, + "Domain": { + "description": "A JSON value representing the Domain.", + "properties": { + "id": { + "$ref": "#/components/schemas/DomainId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id" + }, + "name": { + "type": "string", + "description": "Domain name. Cannot be empty" + }, + "oauth2Enabled": { + "type": "boolean", + "description": "Whether OAuth2 settings are enabled or not" + }, + "propagateToEdge": { + "type": "boolean", + "description": "Whether OAuth2 settings are enabled on Edge or not" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "DomainId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ], + "example": "DEVICE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "DomainInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/DomainId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id" + }, + "name": { + "type": "string", + "description": "Domain name. Cannot be empty" + }, + "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", + "items": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + } + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "name" + ] + }, + "DurationAlarmConditionSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmConditionSpec" + }, + { + "type": "object", + "properties": { + "unit": { + "type": "string", + "enum": [ + "NANOSECONDS", + "MICROSECONDS", + "MILLISECONDS", + "SECONDS", + "MINUTES", + "HOURS", + "DAYS" + ] + }, + "predicate": { + "$ref": "#/components/schemas/FilterPredicateValueLong" + } + } + } + ] + }, + "DynamicValueBoolean": { + "properties": { + "sourceType": { + "type": "string", + "enum": [ + "CURRENT_TENANT", + "CURRENT_CUSTOMER", + "CURRENT_USER", + "CURRENT_DEVICE" + ] + }, + "sourceAttribute": { + "type": "string" + }, + "inherit": { + "type": "boolean" + }, + "resolvedValue": { + "type": "boolean" + } + } + }, + "DynamicValueDouble": { + "properties": { + "sourceType": { + "type": "string", + "enum": [ + "CURRENT_TENANT", + "CURRENT_CUSTOMER", + "CURRENT_USER", + "CURRENT_DEVICE" + ] + }, + "sourceAttribute": { + "type": "string" + }, + "inherit": { + "type": "boolean" + }, + "resolvedValue": { + "type": "number", + "format": "double" + } + } + }, + "DynamicValueInteger": { + "properties": { + "sourceType": { + "type": "string", + "enum": [ + "CURRENT_TENANT", + "CURRENT_CUSTOMER", + "CURRENT_USER", + "CURRENT_DEVICE" + ] + }, + "sourceAttribute": { + "type": "string" + }, + "inherit": { + "type": "boolean" + }, + "resolvedValue": { + "type": "integer", + "format": "int32" + } + } + }, + "DynamicValueLong": { + "properties": { + "sourceType": { + "type": "string", + "enum": [ + "CURRENT_TENANT", + "CURRENT_CUSTOMER", + "CURRENT_USER", + "CURRENT_DEVICE" + ] + }, + "sourceAttribute": { + "type": "string" + }, + "inherit": { + "type": "boolean" + }, + "resolvedValue": { + "type": "integer", + "format": "int64" + } + } + }, + "DynamicValueString": { + "properties": { + "sourceType": { + "type": "string", + "enum": [ + "CURRENT_TENANT", + "CURRENT_CUSTOMER", + "CURRENT_USER", + "CURRENT_DEVICE" + ] + }, + "sourceAttribute": { + "type": "string" + }, + "inherit": { + "type": "boolean" + }, + "resolvedValue": { + "type": "string" + } + } + }, + "Edge": { + "description": "A JSON value representing the edge.", + "properties": { + "id": { + "$ref": "#/components/schemas/EdgeId", + "description": "JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the edge creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", + "readOnly": true + }, + "rootRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Edge Name in scope of Tenant", + "example": "Silo_A_Edge" + }, + "type": { + "type": "string", + "description": "Edge type", + "example": "Silos" + }, + "label": { + "type": "string", + "description": "Label that may be used in widgets", + "example": "Silo Edge on far field" + }, + "routingKey": { + "type": "string", + "description": "Edge routing key ('username') to authorize on cloud" + }, + "secret": { + "type": "string", + "description": "Edge secret ('password') to authorize on cloud" + }, + "edgeLicenseKey": { + "type": "string", + "description": "Edge license key obtained from license portal", + "example": "AgcnI24Z06XC&m6Sxsdgf" + }, + "cloudEndpoint": { + "type": "string", + "description": "Edge uses this cloud URL to activate and periodically check it's license", + "example": "https://thingsboard.cloud" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + }, + "required": [ + "cloudEndpoint", + "edgeLicenseKey", + "name", + "routingKey", + "secret", + "type" + ] + }, + "EdgeCommunicationFailureNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "edges": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + } + } + ] + }, + "EdgeConnectionNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "edges": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "notifyOn": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CONNECTED", + "DISCONNECTED" + ] + }, + "uniqueItems": true + } + } + } + ] + }, + "EdgeEvent": { + "properties": { + "id": { + "$ref": "#/components/schemas/EdgeEventId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "seqId": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "edgeId": { + "$ref": "#/components/schemas/EdgeId" + }, + "action": { + "type": "string", + "enum": [ + "ADDED", + "UPDATED", + "DELETED", + "POST_ATTRIBUTES", + "ATTRIBUTES_UPDATED", + "ATTRIBUTES_DELETED", + "TIMESERIES_UPDATED", + "CREDENTIALS_UPDATED", + "RELATION_ADD_OR_UPDATE", + "RELATION_DELETED", + "RPC_CALL", + "ALARM_ACK", + "ALARM_CLEAR", + "ALARM_DELETE", + "ALARM_ASSIGNED", + "ALARM_UNASSIGNED", + "ADDED_COMMENT", + "UPDATED_COMMENT", + "DELETED_COMMENT", + "ASSIGNED_TO_EDGE", + "UNASSIGNED_FROM_EDGE", + "CREDENTIALS_REQUEST", + "ADDED_TO_ENTITY_GROUP", + "REMOVED_FROM_ENTITY_GROUP", + "CHANGE_OWNER", + "ENTITY_MERGE_REQUEST" + ] + }, + "entityId": { + "type": "string", + "format": "uuid" + }, + "uid": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "DASHBOARD", + "ASSET", + "DEVICE", + "DEVICE_PROFILE", + "ASSET_PROFILE", + "ENTITY_VIEW", + "ALARM", + "ALARM_COMMENT", + "RULE_CHAIN", + "RULE_CHAIN_METADATA", + "EDGE", + "USER", + "CUSTOMER", + "RELATION", + "TENANT", + "TENANT_PROFILE", + "WIDGETS_BUNDLE", + "WIDGET_TYPE", + "ADMIN_SETTINGS", + "OTA_PACKAGE", + "QUEUE", + "ENTITY_GROUP", + "SCHEDULER_EVENT", + "WHITE_LABELING", + "LOGIN_WHITE_LABELING", + "MAIL_TEMPLATES", + "CUSTOM_TRANSLATION", + "CUSTOM_MENU", + "ROLE", + "GROUP_PERMISSION", + "CONVERTER", + "INTEGRATION", + "NOTIFICATION_RULE", + "NOTIFICATION_TARGET", + "NOTIFICATION_TEMPLATE", + "TB_RESOURCE", + "DEVICE_GROUP_OTA", + "OAUTH2_CLIENT", + "DOMAIN" + ] + }, + "entityGroupId": { + "type": "string", + "format": "uuid" + }, + "body": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "EdgeEventId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "EdgeId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "EDGE" + ], + "example": "EDGE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "EdgeInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EdgeId", + "description": "JSON object with the Edge Id. Specify this field to update the Edge. Referencing non-existing Edge Id will cause error. Omit this field to create new Edge." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the edge creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Use 'assignDeviceToTenant' to change the Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", + "readOnly": true + }, + "rootRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "JSON object with Root Rule Chain Id. Use 'setEdgeRootRuleChain' to change the Root Rule Chain Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Unique Edge Name in scope of Tenant", + "example": "Silo_A_Edge" + }, + "type": { + "type": "string", + "description": "Edge type", + "example": "Silos" + }, + "label": { + "type": "string", + "description": "Label that may be used in widgets", + "example": "Silo Edge on far field" + }, + "routingKey": { + "type": "string", + "description": "Edge routing key ('username') to authorize on cloud" + }, + "secret": { + "type": "string", + "description": "Edge secret ('password') to authorize on cloud" + }, + "edgeLicenseKey": { + "type": "string", + "description": "Edge license key obtained from license portal", + "example": "AgcnI24Z06XC&m6Sxsdgf" + }, + "cloudEndpoint": { + "type": "string", + "description": "Edge uses this cloud URL to activate and periodically check it's license", + "example": "https://thingsboard.cloud" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + }, + "required": [ + "cloudEndpoint", + "edgeLicenseKey", + "name", + "routingKey", + "secret", + "type" + ] + }, + "EdgeInstructions": { + "properties": { + "instructions": { + "type": "string", + "description": "Markdown with install/upgrade instructions" + } + } + }, + "EdgeSearchQuery": { + "properties": { + "parameters": { + "$ref": "#/components/schemas/RelationsSearchParameters", + "description": "Main search parameters." + }, + "relationType": { + "type": "string", + "description": "Type of the relation between root entity and edge (e.g. 'Contains' or 'Manages')." + }, + "edgeTypes": { + "type": "array", + "description": "Array of edge types to filter the related entities (e.g. 'Silos', 'Stores').", + "items": { + "type": "string" + } + } + } + }, + "EdgeSearchQueryFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "rootEntity": { + "$ref": "#/components/schemas/EntityId" + }, + "relationType": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "FROM", + "TO" + ] + }, + "maxLevel": { + "type": "integer", + "format": "int32" + }, + "fetchLastLevelOnly": { + "type": "boolean" + }, + "edgeTypes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "EdgeTypeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "edgeType": { + "type": "string", + "deprecated": true, + "writeOnly": true + }, + "edgeTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "edgeNameFilter": { + "type": "string" + } + } + } + ] + }, + "EdqsSyncRequest": {}, + "EfentoCoapDeviceTypeConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/CoapDeviceTypeConfiguration" + } + ] + }, + "EmailDeliveryMethodNotificationTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" + }, + { + "type": "object", + "properties": { + "subject": { + "type": "string" + } + } + } + ], + "required": [ + "body", + "subject" + ] + }, + "EmailTwoFaAccountConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaAccountConfig" + }, + { + "type": "object", + "properties": { + "email": { + "type": "string" + } + } + } + ], + "required": [ + "email" + ] + }, + "EmailTwoFaProviderConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaProviderConfig" + }, + { + "type": "object", + "properties": { + "verificationCodeLifetime": { + "type": "integer", + "format": "int32", + "minimum": 1 + } + } + } + ] + }, + "EnterpriseCaptchaParams": { + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaParams" + }, + { + "type": "object", + "properties": { + "projectId": { + "type": "string", + "description": "Your Google Cloud project ID" + }, + "serviceAccountCredentials": { + "type": "string", + "description": "Service account credentials" + }, + "serviceAccountCredentialsFileName": { + "type": "string", + "description": "Service account credentials file name" + }, + "androidKey": { + "type": "string", + "description": "The reCAPTCHA key associated with android app." + }, + "iosKey": { + "type": "string", + "description": "The reCAPTCHA key associated with iOS app." + }, + "logActionName": { + "type": "string", + "description": "Optional action name used for logging" + } + } + } + ] + }, + "EntitiesByGroupNameFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "groupType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId" + }, + "entityGroupNameFilter": { + "type": "string" + } + } + } + ] + }, + "EntitiesLimitNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "entityTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "uniqueItems": true + }, + "threshold": { + "type": "number", + "format": "float", + "maximum": 1 + } + } + } + ] + }, + "EntityActionNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "entityTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "uniqueItems": true + }, + "created": { + "type": "boolean" + }, + "updated": { + "type": "boolean" + }, + "deleted": { + "type": "boolean" + } + } + } + ] + }, + "EntityCountQuery": { + "description": "A JSON value representing the entity count query. See API call notes above for more details.", + "properties": { + "entityFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApiUsageStateFilter" + }, + { + "$ref": "#/components/schemas/AssetSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/AssetTypeFilter" + }, + { + "$ref": "#/components/schemas/DeviceSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/DeviceTypeFilter" + }, + { + "$ref": "#/components/schemas/EdgeSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EdgeTypeFilter" + }, + { + "$ref": "#/components/schemas/EntitiesByGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupListFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityListFilter" + }, + { + "$ref": "#/components/schemas/EntityNameFilter" + }, + { + "$ref": "#/components/schemas/EntityTypeFilter" + }, + { + "$ref": "#/components/schemas/EntityViewSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EntityViewTypeFilter" + }, + { + "$ref": "#/components/schemas/RelationsQueryFilter" + }, + { + "$ref": "#/components/schemas/SchedulerEventFilter" + }, + { + "$ref": "#/components/schemas/SingleEntityFilter" + }, + { + "$ref": "#/components/schemas/StateEntityOwnerFilter" + } + ] + }, + "keyFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyFilter" + } + } + } + }, + "EntityData": { + "properties": { + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "readAttrs": { + "type": "boolean" + }, + "readTs": { + "type": "boolean" + }, + "latest": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/TsValue" + } + } + }, + "timeseries": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TsValue" + } + } + }, + "aggLatest": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComparisonTsValue" + } + } + } + }, + "EntityDataDiff": { + "properties": { + "currentVersion": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "$ref": "#/components/schemas/DeviceExportData" + }, + { + "$ref": "#/components/schemas/EntityGroupExportData" + }, + { + "$ref": "#/components/schemas/GroupEntityExportData" + }, + { + "$ref": "#/components/schemas/RuleChainExportData" + }, + { + "$ref": "#/components/schemas/WidgetTypeExportData" + }, + { + "$ref": "#/components/schemas/WidgetsBundleExportData" + } + ] + }, + "otherVersion": { + "oneOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "$ref": "#/components/schemas/DeviceExportData" + }, + { + "$ref": "#/components/schemas/EntityGroupExportData" + }, + { + "$ref": "#/components/schemas/GroupEntityExportData" + }, + { + "$ref": "#/components/schemas/RuleChainExportData" + }, + { + "$ref": "#/components/schemas/WidgetTypeExportData" + }, + { + "$ref": "#/components/schemas/WidgetsBundleExportData" + } + ] + } + } + }, + "EntityDataInfo": { + "properties": { + "hasRelations": { + "type": "boolean" + }, + "hasAttributes": { + "type": "boolean" + }, + "hasCredentials": { + "type": "boolean" + }, + "hasCalculatedFields": { + "type": "boolean" + }, + "hasPermissions": { + "type": "boolean" + }, + "hasGroupEntities": { + "type": "boolean" + } + } + }, + "EntityDataPageLink": { + "properties": { + "pageSize": { + "type": "integer", + "format": "int32" + }, + "page": { + "type": "integer", + "format": "int32" + }, + "textSearch": { + "type": "string" + }, + "sortOrder": { + "$ref": "#/components/schemas/EntityDataSortOrder" + }, + "dynamic": { + "type": "boolean" + } + } + }, + "EntityDataQuery": { + "description": "A JSON value representing the entity data query. See API call notes above for more details.", + "properties": { + "entityFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/ApiUsageStateFilter" + }, + { + "$ref": "#/components/schemas/AssetSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/AssetTypeFilter" + }, + { + "$ref": "#/components/schemas/DeviceSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/DeviceTypeFilter" + }, + { + "$ref": "#/components/schemas/EdgeSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EdgeTypeFilter" + }, + { + "$ref": "#/components/schemas/EntitiesByGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupListFilter" + }, + { + "$ref": "#/components/schemas/EntityGroupNameFilter" + }, + { + "$ref": "#/components/schemas/EntityListFilter" + }, + { + "$ref": "#/components/schemas/EntityNameFilter" + }, + { + "$ref": "#/components/schemas/EntityTypeFilter" + }, + { + "$ref": "#/components/schemas/EntityViewSearchQueryFilter" + }, + { + "$ref": "#/components/schemas/EntityViewTypeFilter" + }, + { + "$ref": "#/components/schemas/RelationsQueryFilter" + }, + { + "$ref": "#/components/schemas/SchedulerEventFilter" + }, + { + "$ref": "#/components/schemas/SingleEntityFilter" + }, + { + "$ref": "#/components/schemas/StateEntityOwnerFilter" + } + ] + }, + "keyFilters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KeyFilter" + } + }, + "pageLink": { + "$ref": "#/components/schemas/EntityDataPageLink" + }, + "entityFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityKey" + } + }, + "latestValues": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityKey" + } + } + } + }, + "EntityDataSortOrder": { + "properties": { + "key": { + "$ref": "#/components/schemas/EntityKey" + }, + "direction": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] + } + } + }, + "EntityExportDataObject": { + "discriminator": { + "propertyName": "entityType" + }, + "properties": { + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "entity": {}, + "relations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityRelation" + } + }, + "attributes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AttributeExportData" + } + } + }, + "calculatedFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalculatedField" + } + } + } + }, + "EntityFilter": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "EntityGroup": { + "description": "A JSON value representing the entity group.", + "properties": { + "id": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "JSON object with the EntityGroupId Id. Specify this field to update the Entity Group. Referencing non-existing Entity Group Id will cause error. Omit this field to create new Entity Group." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the entity group creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + }, + "name": { + "type": "string", + "description": "Name of the entity group", + "example": "Water meters" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the owner of the group - Tenant or Customer Id." + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Arbitrary JSON with additional information about the group" + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON with the configuration for UI components: list of columns, settings, actions, etc " + }, + "version": { + "type": "integer", + "format": "int64" + }, + "groupAll": { + "type": "boolean", + "description": "Indicates special group 'All' that contains all entities and can't be deleted." + }, + "edgeGroupAll": { + "type": "boolean", + "description": "Indicates special edge group 'All' that contains all entities and can't be deleted.", + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "writeOnly": true + } + }, + "required": [ + "name", + "type" + ] + }, + "EntityGroupExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/EntityGroup" + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + }, + "groupEntities": { + "type": "boolean" + } + } + } + ] + }, + "EntityGroupFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "groupType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "entityGroup": { + "type": "string" + } + } + } + ] + }, + "EntityGroupId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "ENTITY_GROUP" + ], + "example": "ENTITY_GROUP" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "EntityGroupInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "JSON object with the EntityGroupId Id. Specify this field to update the Entity Group. Referencing non-existing Entity Group Id will cause error. Omit this field to create new Entity Group." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the entity group creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "type": { + "type": "string", + "enum": [ + "CUSTOMER", + "ASSET", + "DEVICE", + "USER", + "ENTITY_VIEW", + "DASHBOARD", + "EDGE" + ] + }, + "name": { + "type": "string", + "description": "Name of the entity group", + "example": "Water meters" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the owner of the group - Tenant or Customer Id." + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Arbitrary JSON with additional information about the group" + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON with the configuration for UI components: list of columns, settings, actions, etc " + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerIds": { + "type": "array", + "description": "List of the entity group owners.", + "items": { + "$ref": "#/components/schemas/EntityId" + }, + "uniqueItems": true + }, + "groupAll": { + "type": "boolean", + "description": "Indicates special group 'All' that contains all entities and can't be deleted." + }, + "edgeGroupAll": { + "type": "boolean", + "description": "Indicates special edge group 'All' that contains all entities and can't be deleted.", + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "writeOnly": true + } + }, + "required": [ + "name", + "ownerIds", + "type" + ] + }, + "EntityGroupListFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "groupType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "entityGroupList": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "EntityGroupNameFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "groupType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "entityGroupNameFilter": { + "type": "string" + } + } + } + ] + }, + "EntityId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ], + "example": "DEVICE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "EntityInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the entity Id. " + }, + "name": { + "type": "string", + "description": "Entity Name" + } + } + }, + "EntityKey": { + "properties": { + "type": { + "type": "string", + "enum": [ + "ATTRIBUTE", + "CLIENT_ATTRIBUTE", + "SHARED_ATTRIBUTE", + "SERVER_ATTRIBUTE", + "TIME_SERIES", + "ENTITY_FIELD", + "ALARM_FIELD" + ] + }, + "key": { + "type": "string" + } + } + }, + "EntityListFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "entityList": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "EntityLoadError": { + "properties": { + "type": { + "type": "string" + }, + "source": { + "$ref": "#/components/schemas/EntityId" + }, + "target": { + "$ref": "#/components/schemas/EntityId" + }, + "message": { + "type": "string" + } + } + }, + "EntityNameFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "entityNameFilter": { + "type": "string" + } + } + } + ] + }, + "EntityRelation": { + "description": "A JSON value representing the relation.", + "properties": { + "from": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with [from] Entity Id.", + "readOnly": true + }, + "to": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with [to] Entity Id.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "String value of relation type.", + "example": "Contains" + }, + "typeGroup": { + "type": "string", + "description": "Represents the type group of the relation.", + "enum": [ + "COMMON", + "DASHBOARD", + "FROM_ENTITY_GROUP", + "RULE_CHAIN", + "RULE_NODE", + "EDGE", + "EDGE_AUTO_ASSIGN_RULE_CHAIN" + ], + "example": "COMMON" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the relation" + } + } + }, + "EntityRelationInfo": { + "properties": { + "from": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with [from] Entity Id.", + "readOnly": true + }, + "to": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with [to] Entity Id.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "String value of relation type.", + "example": "Contains" + }, + "typeGroup": { + "type": "string", + "description": "Represents the type group of the relation.", + "enum": [ + "COMMON", + "DASHBOARD", + "FROM_ENTITY_GROUP", + "RULE_CHAIN", + "RULE_NODE", + "EDGE", + "EDGE_AUTO_ASSIGN_RULE_CHAIN" + ], + "example": "COMMON" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "fromName": { + "type": "string", + "description": "Name of the entity for [from] direction.", + "example": "A4B72CCDFF33", + "readOnly": true + }, + "toName": { + "type": "string", + "description": "Name of the entity for [to] direction.", + "example": "A4B72CCDFF35", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the relation" + } + } + }, + "EntityRelationsQuery": { + "description": "A JSON value representing the entity relations query object.", + "properties": { + "parameters": { + "$ref": "#/components/schemas/RelationsSearchParameters", + "description": "Main search parameters." + }, + "filters": { + "type": "array", + "description": "Main filters.", + "items": { + "$ref": "#/components/schemas/RelationEntityTypeFilter" + } + } + } + }, + "EntitySubtype": { + "properties": { + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "type": { + "type": "string" + } + } + }, + "EntityTypeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + } + } + ] + }, + "EntityTypeLoadResult": { + "properties": { + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "created": { + "type": "integer", + "format": "int32" + }, + "updated": { + "type": "integer", + "format": "int32" + }, + "deleted": { + "type": "integer", + "format": "int32" + }, + "groupsCreated": { + "type": "integer", + "format": "int32" + }, + "groupsUpdated": { + "type": "integer", + "format": "int32" + }, + "groupsDeleted": { + "type": "integer", + "format": "int32" + } + } + }, + "EntityTypeVersionCreateConfig": { + "properties": { + "saveRelations": { + "type": "boolean" + }, + "saveAttributes": { + "type": "boolean" + }, + "saveCredentials": { + "type": "boolean" + }, + "saveCalculatedFields": { + "type": "boolean" + }, + "savePermissions": { + "type": "boolean" + }, + "saveGroupEntities": { + "type": "boolean" + }, + "syncStrategy": { + "type": "string", + "enum": [ + "MERGE", + "OVERWRITE" + ] + }, + "entityIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "allEntities": { + "type": "boolean" + } + } + }, + "EntityTypeVersionLoadConfig": { + "properties": { + "loadRelations": { + "type": "boolean" + }, + "loadAttributes": { + "type": "boolean" + }, + "loadCredentials": { + "type": "boolean" + }, + "loadCalculatedFields": { + "type": "boolean" + }, + "loadPermissions": { + "type": "boolean" + }, + "loadGroupEntities": { + "type": "boolean" + }, + "autoGenerateIntegrationKey": { + "type": "boolean" + }, + "removeOtherEntities": { + "type": "boolean" + }, + "findExistingEntityByName": { + "type": "boolean" + } + } + }, + "EntityTypeVersionLoadRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionLoadRequest" + }, + { + "type": "object", + "properties": { + "entityTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/EntityTypeVersionLoadConfig" + } + }, + "rollbackOnError": { + "type": "boolean" + } + } + } + ] + }, + "EntityVersion": { + "properties": { + "timestamp": { + "type": "integer", + "format": "int64" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "author": { + "type": "string" + } + } + }, + "EntityView": { + "description": "A JSON object representing the entity view.", + "properties": { + "entityId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the referenced Entity Id (Device or Asset)." + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Entity View name", + "example": "A4B72CCDFF33" + }, + "type": { + "type": "string", + "description": "Device Profile Name", + "example": "Temperature Sensor" + }, + "keys": { + "$ref": "#/components/schemas/TelemetryEntityView", + "description": "Set of telemetry and attribute keys to expose via Entity View." + }, + "startTimeMs": { + "type": "integer", + "format": "int64", + "description": "Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;" + }, + "endTimeMs": { + "type": "integer", + "format": "int64", + "description": "Represents the end time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "id": { + "$ref": "#/components/schemas/EntityViewId", + "description": "JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the Entity View creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "entityId", + "name", + "type" + ] + }, + "EntityViewId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "ENTITY_VIEW" + ], + "example": "ENTITY_VIEW" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "EntityViewInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityViewId", + "description": "JSON object with the Entity View Id. Specify this field to update the Entity View. Referencing non-existing Entity View Id will cause error. Omit this field to create new Entity View." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the Entity View creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "entityId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the referenced Entity Id (Device or Asset)." + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Use 'assignEntityViewToCustomer' to change the Customer Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Entity View name", + "example": "A4B72CCDFF33" + }, + "type": { + "type": "string", + "description": "Device Profile Name", + "example": "Temperature Sensor" + }, + "keys": { + "$ref": "#/components/schemas/TelemetryEntityView", + "description": "Set of telemetry and attribute keys to expose via Entity View." + }, + "startTimeMs": { + "type": "integer", + "format": "int64", + "description": "Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;" + }, + "endTimeMs": { + "type": "integer", + "format": "int64", + "description": "Represents the end time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "entityId", + "name", + "type" + ] + }, + "EntityViewSearchQuery": { + "description": "The entity view search query JSON", + "properties": { + "parameters": { + "$ref": "#/components/schemas/RelationsSearchParameters", + "description": "Main search parameters." + }, + "relationType": { + "type": "string", + "description": "Type of the relation between root entity and device (e.g. 'Contains' or 'Manages')." + }, + "entityViewTypes": { + "type": "array", + "description": "Array of entity view types to filter the related entities (e.g. 'Temperature Sensor', 'Smoke Sensor').", + "items": { + "type": "string" + } + } + } + }, + "EntityViewSearchQueryFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "rootEntity": { + "$ref": "#/components/schemas/EntityId" + }, + "relationType": { + "type": "string" + }, + "direction": { + "type": "string", + "enum": [ + "FROM", + "TO" + ] + }, + "maxLevel": { + "type": "integer", + "format": "int32" + }, + "fetchLastLevelOnly": { + "type": "boolean" + }, + "entityViewTypes": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "EntityViewTypeFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "entityViewType": { + "type": "string", + "deprecated": true, + "writeOnly": true + }, + "entityViewTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "entityViewNameFilter": { + "type": "string" + } + } + } + ] + }, + "ErrorEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "method": { + "type": "string", + "description": "String value representing the method name when the error happened", + "example": "onClusterEventMsg" + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "EscalatedNotificationRuleRecipientsConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleRecipientsConfig" + }, + { + "type": "object", + "properties": { + "escalationTable": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + } + ], + "required": [ + "escalationTable", + "triggerType" + ] + }, + "EventFilter": { + "discriminator": { + "propertyName": "eventType" + }, + "properties": { + "eventType": { + "type": "string", + "description": "String value representing the event type", + "enum": [ + "ERROR", + "LC_EVENT", + "STATS", + "RAW_DATA", + "DEBUG_RULE_NODE", + "DEBUG_RULE_CHAIN", + "DEBUG_CONVERTER", + "DEBUG_INTEGRATION", + "DEBUG_CALCULATED_FIELD" + ], + "example": "STATS" + }, + "notEmpty": { + "type": "boolean" + } + }, + "required": [ + "eventType" + ] + }, + "EventId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "EventInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EventId" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the event creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Event type", + "example": "STATS" + }, + "uid": { + "type": "string", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Entity Id for which event is created.", + "readOnly": true + }, + "body": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "ExportableEntityEntityId": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId" + }, + "name": { + "type": "string" + } + } + }, + "Favicon": { + "properties": { + "url": { + "type": "string" + } + } + }, + "FeaturesInfo": { + "properties": { + "smsEnabled": { + "type": "boolean" + }, + "oauthEnabled": { + "type": "boolean" + }, + "notificationEnabled": { + "type": "boolean" + }, + "twoFaEnabled": { + "type": "boolean" + }, + "whiteLabelingEnabled": { + "type": "boolean" + }, + "emailEnabled": { + "type": "boolean" + } + } + }, + "FilterPredicateValueBoolean": { + "properties": { + "defaultValue": { + "type": "boolean" + }, + "userValue": { + "type": "boolean" + }, + "dynamicValue": { + "$ref": "#/components/schemas/DynamicValueBoolean" + } + } + }, + "FilterPredicateValueDouble": { + "properties": { + "defaultValue": { + "type": "number", + "format": "double" + }, + "userValue": { + "type": "number", + "format": "double" + }, + "dynamicValue": { + "$ref": "#/components/schemas/DynamicValueDouble" + } + } + }, + "FilterPredicateValueInteger": { + "properties": { + "defaultValue": { + "type": "integer", + "format": "int32" + }, + "userValue": { + "type": "integer", + "format": "int32" + }, + "dynamicValue": { + "$ref": "#/components/schemas/DynamicValueInteger" + } + } + }, + "FilterPredicateValueLong": { + "properties": { + "defaultValue": { + "type": "integer", + "format": "int64" + }, + "userValue": { + "type": "integer", + "format": "int64" + }, + "dynamicValue": { + "$ref": "#/components/schemas/DynamicValueLong" + } + } + }, + "FilterPredicateValueString": { + "properties": { + "defaultValue": { + "type": "string" + }, + "userValue": { + "type": "string" + }, + "dynamicValue": { + "$ref": "#/components/schemas/DynamicValueString" + } + } + }, + "GroupEntityExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/ExportableEntityEntityId" + } + } + } + ] + }, + "GroupPermission": { + "description": "A JSON value representing the group permission.", + "properties": { + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with the Tenant Id.", + "readOnly": true + }, + "userGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "JSON object with the User Group Id. Represent user group that will have permissions to perform operations against corresponding Entity Group." + }, + "roleId": { + "$ref": "#/components/schemas/RoleId", + "description": "JSON object with the Role Id. Represent set of permissions." + }, + "entityGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "JSON object with the Entity Group Id. Represent entity (device, asset, etc.) group." + }, + "entityGroupType": { + "type": "string", + "description": "Type of the entities in the group: DEVICE, ASSET, CUSTOMER, etc.", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "isPublic": { + "type": "boolean", + "writeOnly": true + }, + "id": { + "$ref": "#/components/schemas/GroupPermissionId", + "description": "JSON object with the Group Permission Id. Specify this field to update the Group Permission. Referencing non-existing Group Permission Id will cause error. Omit this field to create new Group Permission." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the group permission creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the Group Permissions. Auto-generated", + "readOnly": true + }, + "public": { + "type": "boolean" + } + } + }, + "GroupPermissionId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "GROUP_PERMISSION" + ], + "example": "GROUP_PERMISSION" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "GroupPermissionInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/GroupPermissionId", + "description": "JSON object with the Group Permission Id. Specify this field to update the Group Permission. Referencing non-existing Group Permission Id will cause error. Omit this field to create new Group Permission." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the group permission creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with the Tenant Id.", + "readOnly": true + }, + "userGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "JSON object with the User Group Id. Represent user group that will have permissions to perform operations against corresponding Entity Group." + }, + "roleId": { + "$ref": "#/components/schemas/RoleId", + "description": "JSON object with the Role Id. Represent set of permissions." + }, + "entityGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "JSON object with the Entity Group Id. Represent entity (device, asset, etc.) group." + }, + "entityGroupType": { + "type": "string", + "description": "Type of the entities in the group: DEVICE, ASSET, CUSTOMER, etc.", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "role": { + "$ref": "#/components/schemas/Role", + "description": "Represent set of permissions." + }, + "entityGroupName": { + "type": "string", + "description": "Entity Group Name." + }, + "entityGroupOwnerId": { + "$ref": "#/components/schemas/EntityId", + "description": "Entity Group Owner Id (Tenant or Customer)." + }, + "entityGroupOwnerName": { + "type": "string", + "description": "Name of the entity group owner (Tenant or Customer title)." + }, + "userGroupName": { + "type": "string", + "description": "User Group Name." + }, + "userGroupOwnerId": { + "$ref": "#/components/schemas/EntityId", + "description": "User Group Owner Id (Tenant or Customer)." + }, + "userGroupOwnerName": { + "type": "string", + "description": "Name of the user group owner (Tenant or Customer title)." + }, + "readOnly": { + "type": "boolean" + }, + "name": { + "type": "string", + "description": "Name of the Group Permissions. Auto-generated", + "readOnly": true + }, + "public": { + "type": "boolean" + } + } + }, + "HasIdObject": { + "properties": { + "id": {} + } + }, + "HomeDashboardInfo": { + "description": "A JSON object that represents home dashboard id and other parameters", + "properties": { + "dashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "JSON object with the dashboard Id." + }, + "hideDashboardToolbar": { + "type": "boolean", + "description": "Hide dashboard toolbar flag. Useful for rendering dashboards on mobile." + } + } + }, + "HomeDashboardParams": { + "properties": { + "id": { + "type": "string", + "description": "Home dashboard Id to assign for the new user.", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "hideToolbar": { + "type": "boolean", + "description": "Indicates if hide toolbar should be hidden." + } + } + }, + "HomeMenuItem": { + "allOf": [ + { + "$ref": "#/components/schemas/MenuItem" + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for predefined menu items", + "example": "home", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the menu item", + "example": "My Custom Menu" + }, + "icon": { + "type": "string", + "description": "URL of the menu item icon. Overrides 'materialIcon'", + "example": "My Custom Menu" + }, + "visible": { + "type": "boolean", + "description": "Mark if menu item is visible for user" + }, + "pages": { + "type": "array", + "description": "List of child menu items", + "items": { + "$ref": "#/components/schemas/DefaultMenuItem" + } + }, + "homeType": { + "type": "string", + "description": "DEFAULT or DASHBOARD. DASHBOARD means default home page presentation changed to refer to dashboard", + "enum": [ + "DEFAULT", + "DASHBOARD" + ] + }, + "dashboardId": { + "type": "string", + "description": "Id of the Dashboard to open, when user clicks the menu item" + }, + "hideDashboardToolbar": { + "type": "boolean", + "description": "Hide the dashboard toolbar" + } + } + } + ] + }, + "Integration": { + "description": "A JSON value representing the integration.", + "properties": { + "id": { + "$ref": "#/components/schemas/IntegrationId", + "description": "JSON object with the Integration Id. Specify this field to update the Integration. Referencing non-existing Integration Id will cause error. Omit this field to create new Integration." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the integration creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Integration Name", + "example": "Http Integration" + }, + "type": { + "type": "string", + "description": "The type of the integration", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "description": "Enable/disable debug. ", + "example": false + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "enabled": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration" + }, + "allowCreateDevicesOrAssets": { + "type": "boolean", + "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "defaultConverterId": { + "$ref": "#/components/schemas/ConverterId", + "description": "JSON object with the Uplink Converter Id" + }, + "downlinkConverterId": { + "$ref": "#/components/schemas/ConverterId", + "description": "JSON object with the Downlink Converter Id" + }, + "routingKey": { + "type": "string", + "description": "String value used by HTTP based integrations for the base URL construction and by the remote integrations. Remote integration uses this value along with the 'secret' for kind of security and validation to be able to connect to the platform using Grpc", + "example": "ca1a01b6-4ca1-3da5-54e4-a07090b65644" + }, + "secret": { + "type": "string", + "description": "String value used by the remote integrations. Remote integration uses this value along with the 'routingKey' for kind of security and validation to be able to connect to the platform using Grpc", + "example": "nl83m1ktpwpwwmww29sm" + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object representing integration configuration. Each integration type has specific configuration with the connectivity parameters (like 'host' and 'port' for MQTT type or 'baseUrl' for HTTP based type, etc.) and other important parameters dependent on the integration type" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the integration" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" + } + }, + "required": [ + "configuration", + "defaultConverterId", + "name", + "routingKey", + "type" + ] + }, + "IntegrationConvertersInfo": { + "properties": { + "uplink": { + "$ref": "#/components/schemas/ConvertersInfo" + }, + "downlink": { + "$ref": "#/components/schemas/ConvertersInfo" + } + } + }, + "IntegrationId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "INTEGRATION" + ], + "example": "INTEGRATION" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "IntegrationInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/IntegrationId", + "description": "JSON object with the Integration Id. Specify this field to update the Integration. Referencing non-existing Integration Id will cause error. Omit this field to create new Integration." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the integration creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Integration Name", + "example": "Http Integration" + }, + "type": { + "type": "string", + "description": "The type of the integration", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "description": "Enable/disable debug. ", + "example": false + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "enabled": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration" + }, + "allowCreateDevicesOrAssets": { + "type": "boolean", + "description": "Boolean flag to allow/disallow the integration to create devices or assets that send message and do not exist in the system yet" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "status": { + "type": "object" + }, + "stats": { + "$ref": "#/components/schemas/ArrayNode" + }, + "edgeTemplate": { + "type": "boolean", + "description": "Boolean flag that specifies that is regular or edge template integration" + }, + "remote": { + "type": "boolean", + "description": "Boolean flag to enable/disable the integration to be executed remotely. Remote integration is launched in a separate microservice. Local integration is executed by the platform core" + } + }, + "required": [ + "name", + "type" + ] + }, + "IntegrationLifecycleEventNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "integrationTypes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "OCEANCONNECT", + "SIGFOX", + "THINGPARK", + "TPE", + "CHIRPSTACK", + "PARTICLE", + "TMOBILE_IOT_CDP", + "HTTP", + "MQTT", + "PUB_SUB", + "AWS_IOT", + "AWS_SQS", + "AWS_KINESIS", + "IBM_WATSON_IOT", + "TTN", + "TTI", + "AZURE_EVENT_HUB", + "OPC_UA", + "CUSTOM", + "UDP", + "TCP", + "KAFKA", + "AZURE_IOT_HUB", + "APACHE_PULSAR", + "RABBITMQ", + "LORIOT", + "COAP", + "TUYA", + "AZURE_SERVICE_BUS", + "KPN" + ] + }, + "uniqueItems": true + }, + "integrations": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "notifyOn": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATED", + "STARTED", + "ACTIVATED", + "SUSPENDED", + "UPDATED", + "STOPPED", + "DELETED", + "FAILED", + "DEACTIVATED" + ] + }, + "uniqueItems": true + }, + "onlyOnError": { + "type": "boolean" + } + } + } + ] + }, + "JsonNode": { + "description": "A JSON value representing the custom translation. See API call notes above for valid example.", + "examples": [ + {} + ] + }, + "JsonTransportPayloadConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" + } + ] + }, + "JwtPair": { + "description": "JWT Pair", + "properties": { + "token": { + "type": "string", + "description": "The JWT Access Token. Used to perform API calls.", + "example": "AAB254FF67D.." + }, + "refreshToken": { + "type": "string", + "description": "The JWT Refresh Token. Used to get new JWT Access Token if old one has expired.", + "example": "AAB254FF67D.." + }, + "scope": { + "type": "string", + "enum": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER", + "BILLING_ADMIN", + "BILLING_SERVICE", + "REFRESH_TOKEN", + "PRE_VERIFICATION_TOKEN" + ] + } + } + }, + "JwtSettings": { + "description": "A JSON value representing the JWT Settings.", + "properties": { + "tokenExpirationTime": { + "type": "integer", + "format": "int32", + "description": "The JWT will expire after seconds.", + "example": 9000 + }, + "refreshTokenExpTime": { + "type": "integer", + "format": "int32", + "description": "The JWT can be refreshed during seconds.", + "example": 604800 + }, + "tokenIssuer": { + "type": "string", + "description": "The JWT issuer.", + "example": "thingsboard.io" + }, + "tokenSigningKey": { + "type": "string", + "description": "The JWT key is used to sing token. Base64 encoded.", + "example": "dkVTUzU2M2VMWUNwVVltTUhQU2o5SUM0Tkc3M0k2Ykdwcm85QTl6R0RaQ252OFlmVDk2OEptZXBNcndGeExFZg==" + } + } + }, + "KeyFilter": { + "properties": { + "key": { + "$ref": "#/components/schemas/EntityKey" + }, + "valueType": { + "type": "string", + "enum": [ + "STRING", + "NUMERIC", + "BOOLEAN", + "DATE_TIME" + ] + }, + "predicate": { + "oneOf": [ + { + "$ref": "#/components/schemas/BooleanFilterPredicate" + }, + { + "$ref": "#/components/schemas/ComplexFilterPredicate" + }, + { + "$ref": "#/components/schemas/NumericFilterPredicate" + }, + { + "$ref": "#/components/schemas/StringFilterPredicate" + } + ] + } + } + }, + "KeyFilterPredicate": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "LastVisitedDashboardInfo": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "JSON object with Dashboard id.", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "starred": { + "type": "boolean", + "description": "Starred flag" + }, + "lastVisited": { + "type": "integer", + "format": "int64", + "description": "Last visit timestamp" + } + } + }, + "LicenseUsageInfo": { + "properties": { + "maxDevices": { + "type": "integer", + "format": "int64" + }, + "maxAssets": { + "type": "integer", + "format": "int64" + }, + "whiteLabelingEnabled": { + "type": "boolean" + }, + "development": { + "type": "boolean" + }, + "plan": { + "type": "string" + }, + "devicesCount": { + "type": "integer", + "format": "int64" + }, + "assetsCount": { + "type": "integer", + "format": "int64" + }, + "dashboardsCount": { + "type": "integer", + "format": "int64" + }, + "integrationsCount": { + "type": "integer", + "format": "int64" + } + } + }, + "LifeCycleEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "event": { + "type": "string", + "description": "String value representing the lifecycle event type", + "example": "STARTED" + }, + "status": { + "type": "string", + "description": "String value representing status of the lifecycle event", + "enum": [ + "Success", + "Failure" + ] + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "LoginMobileInfo": { + "properties": { + "oAuth2ClientLoginInfos": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OAuth2ClientLoginInfo" + } + }, + "selfRegistrationParams": { + "$ref": "#/components/schemas/SignUpSelfRegistrationParams" + }, + "storeInfo": { + "$ref": "#/components/schemas/StoreInfo" + }, + "versionInfo": { + "$ref": "#/components/schemas/MobileAppVersionInfo" + } + } + }, + "LoginRequest": { + "properties": { + "username": { + "type": "string", + "description": "User email", + "example": "tenant@thingsboard.org" + }, + "password": { + "type": "string", + "description": "User password", + "example": "tenant" + } + }, + "required": [ + "password", + "username" + ] + }, + "LoginResponse": { + "properties": { + "token": { + "type": "string", + "description": "JWT token", + "example": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi..." + }, + "refreshToken": { + "type": "string", + "description": "Refresh token", + "example": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZW5hbnRAdGhpbmdzYm9hcmQub3JnIi..." + } + }, + "required": [ + "refreshToken", + "token" + ] + }, + "LoginWhiteLabelingParams": { + "description": "A JSON value representing the login white labeling configuration", + "properties": { + "logoImageUrl": { + "type": "string", + "description": "Logo image URL", + "example": "https://company.com/images/logo.png" + }, + "logoImageHeight": { + "type": "integer", + "format": "int32", + "description": "The height of a logo container. Logo image will be automatically scaled." + }, + "appTitle": { + "type": "string", + "description": "White-labeled name of the platform", + "example": "My Company IoT Platform" + }, + "favicon": { + "$ref": "#/components/schemas/Favicon", + "description": "JSON object that contains website icon url and type" + }, + "paletteSettings": { + "$ref": "#/components/schemas/PaletteSettings", + "description": "Complex JSON that describes structure of the Angular Material Palette. See [theming](https://material.angular.io/guide/theming) for more details" + }, + "helpLinkBaseUrl": { + "type": "string", + "description": "Base URL for help link" + }, + "uiHelpBaseUrl": { + "type": "string", + "description": "Base URL for the repository with the UI help components (markdown)" + }, + "enableHelpLinks": { + "type": "boolean", + "description": "Enable or Disable help links" + }, + "whiteLabelingEnabled": { + "type": "boolean", + "description": "Enable white-labeling", + "readOnly": true + }, + "showNameVersion": { + "type": "boolean", + "description": "Show platform name and version on UI and login screen" + }, + "platformName": { + "type": "string", + "description": "White-labeled platform name" + }, + "platformVersion": { + "type": "string", + "description": "White-labeled platform version" + }, + "customCss": { + "type": "string", + "description": "Custom CSS content" + }, + "hideConnectivityDialog": { + "type": "boolean", + "description": "Hide device connectivity dialog" + }, + "pageBackgroundColor": { + "type": "string", + "description": "Login page background color", + "example": "#d90f0f" + }, + "darkForeground": { + "type": "boolean", + "description": "Enable/Disable dark foreground" + }, + "domainId": { + "$ref": "#/components/schemas/DomainId", + "description": "Domain id" + }, + "baseUrl": { + "type": "string", + "description": "Base URL for the activation link, etc", + "example": "https://iot.mycompany.com" + }, + "prohibitDifferentUrl": { + "type": "boolean", + "description": "Prohibit use of other URLs. It is recommended to enable this setting", + "example": true + }, + "adminSettingsId": { + "type": "string", + "description": "Id of the settings object that store this parameters" + }, + "showNameBottom": { + "type": "boolean", + "description": "Show platform name and version on login page" + } + } + }, + "LwM2MBootstrapServerCredential": { + "discriminator": { + "propertyName": "securityMode" + }, + "properties": { + "securityMode": { + "type": "string" + } + }, + "required": [ + "securityMode" + ] + }, + "LwM2MServerSecurityConfigDefault": { + "properties": { + "shortServerId": { + "type": "integer", + "format": "int32", + "description": "Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + "example": 123, + "readOnly": true + }, + "bootstrapServerIs": { + "type": "boolean", + "description": "Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.", + "example": true, + "readOnly": true + }, + "host": { + "type": "string", + "description": "Host for 'No Security' mode", + "example": "0.0.0.0", + "readOnly": true + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + "example": "'5685' or '5687'", + "readOnly": true + }, + "clientHoldOffTime": { + "type": "integer", + "format": "int32", + "description": "Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)", + "example": 1, + "readOnly": true + }, + "serverPublicKey": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + "example": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==", + "readOnly": true + }, + "serverCertificate": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + "example": "MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=", + "readOnly": true + }, + "bootstrapServerAccountTimeout": { + "type": "integer", + "format": "int32", + "description": "Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)", + "example": 0, + "readOnly": true + }, + "lifetime": { + "type": "integer", + "format": "int32", + "description": "Specify the lifetime of the registration in seconds.", + "example": 300, + "readOnly": true + }, + "defaultMinPeriod": { + "type": "integer", + "format": "int32", + "description": "The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.", + "example": 1, + "readOnly": true + }, + "notifIfDisabled": { + "type": "boolean", + "description": "If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.", + "example": true, + "readOnly": true + }, + "binding": { + "type": "string", + "description": "This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.", + "example": "U", + "readOnly": true + }, + "securityHost": { + "type": "string", + "description": "Host for 'Security' mode (DTLS)", + "example": "0.0.0.0", + "readOnly": true + }, + "securityPort": { + "type": "integer", + "format": "int32", + "description": "Port for 'Security' mode (DTLS): Lwm2m Server or Bootstrap Server", + "example": 5686, + "readOnly": true + } + } + }, + "LwM2mInstance": { + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "LwM2M Instance id.", + "example": 0 + }, + "resources": { + "type": "array", + "description": "LwM2M Resource observe.", + "items": { + "$ref": "#/components/schemas/LwM2mResourceObserve" + } + } + } + }, + "LwM2mObject": { + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "LwM2M Object id.", + "example": 19 + }, + "keyId": { + "type": "string", + "description": "LwM2M Object key id.", + "example": "19_1.0" + }, + "name": { + "type": "string", + "description": "LwM2M Object name.", + "example": "BinaryAppDataContainer" + }, + "multiple": { + "type": "boolean", + "description": "LwM2M Object multiple.", + "example": true + }, + "mandatory": { + "type": "boolean", + "description": "LwM2M Object mandatory.", + "example": false + }, + "instances": { + "type": "array", + "description": "LwM2M Object instances.", + "items": { + "$ref": "#/components/schemas/LwM2mInstance" + } + } + } + }, + "LwM2mResourceObserve": { + "properties": { + "id": { + "type": "integer", + "format": "int32", + "description": "LwM2M Resource Observe id.", + "example": 0 + }, + "name": { + "type": "string", + "description": "LwM2M Resource Observe name.", + "example": "Data" + }, + "observe": { + "type": "boolean", + "description": "LwM2M Resource Observe observe.", + "example": false + }, + "attribute": { + "type": "boolean", + "description": "LwM2M Resource Observe attribute.", + "example": false + }, + "telemetry": { + "type": "boolean", + "description": "LwM2M Resource Observe telemetry.", + "example": false + }, + "keyName": { + "type": "string", + "description": "LwM2M Resource Observe key name.", + "example": "data" + } + } + }, + "LwM2mVersion": { + "properties": { + "supported": { + "type": "boolean" + } + } + }, + "Lwm2mDeviceProfileTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" + }, + { + "type": "object", + "properties": { + "observeAttr": { + "$ref": "#/components/schemas/TelemetryMappingConfiguration" + }, + "bootstrapServerUpdateEnable": { + "type": "boolean" + }, + "bootstrap": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LwM2MBootstrapServerCredential" + } + }, + "clientLwM2mSettings": { + "$ref": "#/components/schemas/OtherConfiguration" + } + } + } + ] + }, + "Lwm2mDeviceTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceTransportConfiguration" + }, + { + "type": "object", + "properties": { + "powerMode": { + "type": "string", + "enum": [ + "PSM", + "DRX", + "E_DRX" + ] + }, + "psmActivityTimer": { + "type": "integer", + "format": "int64" + }, + "edrxCycle": { + "type": "integer", + "format": "int64" + }, + "pagingTransmissionWindow": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "Mapping": { + "properties": { + "columns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ColumnMapping" + } + }, + "delimiter": { + "type": "string" + }, + "update": { + "type": "boolean" + }, + "header": { + "type": "boolean" + } + } + }, + "MenuItem": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "HOME", + "DEFAULT", + "CUSTOM" + ] + }, + "visible": { + "type": "boolean" + } + } + }, + "MergedGroupPermissionInfo": { + "properties": { + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "operations": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ALL", + "CREATE", + "READ", + "WRITE", + "DELETE", + "RPC_CALL", + "READ_CREDENTIALS", + "WRITE_CREDENTIALS", + "READ_ATTRIBUTES", + "WRITE_ATTRIBUTES", + "READ_TELEMETRY", + "WRITE_TELEMETRY", + "ADD_TO_GROUP", + "REMOVE_FROM_GROUP", + "CHANGE_OWNER", + "IMPERSONATE", + "CLAIM_DEVICES", + "SHARE_GROUP", + "ASSIGN_TO_TENANT", + "READ_CALCULATED_FIELD", + "WRITE_CALCULATED_FIELD" + ] + }, + "uniqueItems": true + } + } + }, + "MergedGroupTypePermissionInfo": { + "properties": { + "entityGroupIds": { + "type": "array", + "description": "List of Entity Groups in case of group roles are assigned to the user (user group)", + "items": { + "$ref": "#/components/schemas/EntityGroupId" + } + }, + "hasGenericRead": { + "type": "boolean", + "description": "Indicates if generic permission assigned to the user group." + } + } + }, + "MergedUserPermissions": { + "properties": { + "genericPermissions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ALL", + "CREATE", + "READ", + "WRITE", + "DELETE", + "RPC_CALL", + "READ_CREDENTIALS", + "WRITE_CREDENTIALS", + "READ_ATTRIBUTES", + "WRITE_ATTRIBUTES", + "READ_TELEMETRY", + "WRITE_TELEMETRY", + "ADD_TO_GROUP", + "REMOVE_FROM_GROUP", + "CHANGE_OWNER", + "IMPERSONATE", + "CLAIM_DEVICES", + "SHARE_GROUP", + "ASSIGN_TO_TENANT", + "READ_CALCULATED_FIELD", + "WRITE_CALCULATED_FIELD" + ] + }, + "uniqueItems": true + }, + "description": "Map of permissions defined using generic roles ('Customer Administrator', etc)" + }, + "groupPermissions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MergedGroupPermissionInfo" + }, + "description": "Map of permissions defined using group roles ('Read' or 'Write' access to specific entity group, etc)" + }, + "readGroupPermissions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MergedGroupTypePermissionInfo" + }, + "description": "Map of read permissions per entity type. Used on the UI to enable/disable certain components." + }, + "readEntityPermissions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MergedGroupTypePermissionInfo" + }, + "description": "Map of read permissions per resource. Used on the UI to enable/disable certain components." + }, + "readAttrPermissions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MergedGroupTypePermissionInfo" + }, + "description": "Map of read entity attributes permissions per resource. Used on the UI to enable/disable certain tabs." + }, + "readTsPermissions": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/MergedGroupTypePermissionInfo" + }, + "description": "Map of read entity time-series permissions per resource. Used on the UI to enable/disable certain tabs." + } + } + }, + "MicrosoftTeamsDeliveryMethodNotificationTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" + }, + { + "type": "object", + "properties": { + "subject": { + "type": "string" + }, + "themeColor": { + "type": "string" + }, + "button": { + "$ref": "#/components/schemas/Button" + } + } + } + ], + "required": [ + "body" + ] + }, + "MicrosoftTeamsNotificationTargetConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationTargetConfig" + }, + { + "type": "object", + "properties": { + "webhookUrl": { + "type": "string" + }, + "channelName": { + "type": "string" + }, + "useOldApi": { + "type": "boolean" + }, + "id": {}, + "title": { + "type": "string" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "email": { + "type": "string" + } + } + } + ], + "required": [ + "channelName", + "webhookUrl" + ] + }, + "MobileApp": { + "description": "A JSON value representing the Mobile Application.", + "properties": { + "id": { + "$ref": "#/components/schemas/MobileAppId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "pkgName": { + "type": "string", + "description": "Application package name. Cannot be empty" + }, + "appSecret": { + "type": "string", + "description": "Application secret. The length must be at least 16 characters" + }, + "platformType": { + "type": "string", + "description": "Application platform type: ANDROID or IOS", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + }, + "status": { + "type": "string", + "description": "Application status: PUBLISHED, DEPRECATED, SUSPENDED, DRAFT", + "enum": [ + "DRAFT", + "PUBLISHED", + "DEPRECATED", + "SUSPENDED" + ] + }, + "versionInfo": { + "$ref": "#/components/schemas/MobileAppVersionInfo", + "description": "Application version info" + }, + "storeInfo": { + "$ref": "#/components/schemas/StoreInfo", + "description": "Application store information" + }, + "name": { + "type": "string", + "description": "Mobile app package name", + "example": "my.mobile.app", + "readOnly": true + } + }, + "required": [ + "appSecret", + "pkgName", + "platformType", + "status" + ] + }, + "MobileAppBundle": { + "description": "A JSON value representing the Mobile Application Bundle.", + "properties": { + "id": { + "$ref": "#/components/schemas/MobileAppBundleId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "title": { + "type": "string", + "description": "Application bundle title. Cannot be empty" + }, + "description": { + "type": "string", + "description": "Application bundle description." + }, + "androidAppId": { + "$ref": "#/components/schemas/MobileAppId", + "description": "Android application id" + }, + "iosAppId": { + "$ref": "#/components/schemas/MobileAppId", + "description": "IOS application id" + }, + "layoutConfig": { + "$ref": "#/components/schemas/MobileLayoutConfig", + "description": "Application layout configuration" + }, + "selfRegistrationParams": { + "$ref": "#/components/schemas/MobileSelfRegistrationParams", + "description": "Application self registration configuration" + }, + "oauth2Enabled": { + "type": "boolean", + "description": "Whether OAuth2 settings are enabled or not" + }, + "name": { + "type": "string", + "description": "Mobile app bundle title", + "example": "My main application", + "readOnly": true + } + }, + "required": [ + "title" + ] + }, + "MobileAppBundleId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ], + "example": "DEVICE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "MobileAppBundleInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/MobileAppBundleId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "title": { + "type": "string", + "description": "Application bundle title. Cannot be empty" + }, + "description": { + "type": "string", + "description": "Application bundle description." + }, + "androidAppId": { + "$ref": "#/components/schemas/MobileAppId", + "description": "Android application id" + }, + "iosAppId": { + "$ref": "#/components/schemas/MobileAppId", + "description": "IOS application id" + }, + "layoutConfig": { + "$ref": "#/components/schemas/MobileLayoutConfig", + "description": "Application layout configuration" + }, + "selfRegistrationParams": { + "$ref": "#/components/schemas/MobileSelfRegistrationParams", + "description": "Application self registration configuration" + }, + "oauth2Enabled": { + "type": "boolean", + "description": "Whether OAuth2 settings are enabled or not" + }, + "androidPkgName": { + "type": "string", + "description": "Android package name" + }, + "iosPkgName": { + "type": "string", + "description": "IOS package name" + }, + "oauth2ClientInfos": { + "type": "array", + "description": "List of available oauth2 clients", + "items": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + } + }, + "qrCodeEnabled": { + "type": "boolean", + "description": "Indicates if qr code is available for bundle" + }, + "name": { + "type": "string", + "description": "Mobile app bundle title", + "example": "My main application", + "readOnly": true + } + }, + "required": [ + "title" + ] + }, + "MobileAppDeliveryMethodNotificationTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" + }, + { + "type": "object", + "properties": { + "subject": { + "type": "string" + }, + "additionalConfig": {} + } + } + ], + "required": [ + "body", + "subject" + ] + }, + "MobileAppId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ], + "example": "DEVICE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "MobileAppNotificationDeliveryMethodConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationDeliveryMethodConfig" + }, + { + "type": "object", + "properties": { + "firebaseServiceAccountCredentialsFileName": { + "type": "string" + }, + "firebaseServiceAccountCredentials": { + "type": "string" + }, + "useSystemSettings": { + "type": "boolean" + } + } + } + ] + }, + "MobileAppVersionInfo": { + "properties": { + "minVersion": { + "type": "string", + "description": "Minimum supported version" + }, + "minVersionReleaseNotes": { + "type": "string", + "description": "Release notes of minimum supported version" + }, + "latestVersion": { + "type": "string", + "description": "Latest supported version" + }, + "latestVersionReleaseNotes": { + "type": "string", + "description": "Release notes of latest supported version" + } + } + }, + "MobileLayoutConfig": { + "properties": { + "pages": { + "type": "array", + "description": "List of pages", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/CustomMobilePage" + }, + { + "$ref": "#/components/schemas/DashboardPage" + }, + { + "$ref": "#/components/schemas/DefaultMobilePage" + }, + { + "$ref": "#/components/schemas/WebViewPage" + } + ] + } + } + } + }, + "MobilePage": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string", + "enum": [ + "DEFAULT", + "DASHBOARD", + "WEB_VIEW", + "CUSTOM" + ] + }, + "visible": { + "type": "boolean" + } + } + }, + "MobileRedirectParams": { + "properties": { + "scheme": { + "type": "string", + "description": "Mobile application verification settings. Used for callback to mobile application once user is registered." + }, + "host": { + "type": "string", + "description": "Mobile application verification settings. Used for callback to mobile application once user is registered." + } + } + }, + "MobileSelfRegistrationParams": { + "allOf": [ + { + "$ref": "#/components/schemas/SelfRegistrationParams" + }, + { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates if self-registration is allowed via sign-up form" + }, + "title": { + "type": "string", + "description": "The text message to appear on login form" + }, + "captcha": { + "$ref": "#/components/schemas/CaptchaParams", + "description": "Captcha site key for 'I'm not a robot' validation" + }, + "signUpFields": { + "type": "array", + "description": "List of sign-up form fields", + "items": { + "$ref": "#/components/schemas/SignUpField" + } + }, + "showPrivacyPolicy": { + "type": "boolean", + "description": "Show or hide 'Privacy Policy'" + }, + "showTermsOfUse": { + "type": "boolean", + "description": "Show or hide 'Terms of Use'" + }, + "notificationRecipient": { + "$ref": "#/components/schemas/NotificationTargetId", + "description": "Recipient to use for notifications when new user self-registered." + }, + "customerTitlePrefix": { + "type": "string", + "description": "Prefix to add to created customer" + }, + "customerGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "Id of the customer group customer wil be added to." + }, + "permissions": { + "type": "array", + "description": "Group Permissions to assign for the new customer user.", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + }, + "defaultDashboard": { + "$ref": "#/components/schemas/DefaultDashboardParams", + "description": "Default dashboard params" + }, + "homeDashboard": { + "$ref": "#/components/schemas/HomeDashboardParams", + "description": "Home dashboard params" + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId", + "description": "Custom menu id" + }, + "privacyPolicy": { + "type": "string", + "description": "Privacy policy text. Supports HTML." + }, + "termsOfUse": { + "type": "string", + "description": "Terms of User text. Supports HTML." + }, + "redirect": { + "$ref": "#/components/schemas/MobileRedirectParams", + "description": "Mobile redirect params." + } + } + } + ], + "required": [ + "captcha", + "permissions", + "redirect", + "signUpFields", + "title" + ] + }, + "MobileSessionInfo": { + "properties": { + "fcmTokenTimestamp": { + "type": "integer", + "format": "int64" + } + } + }, + "Model": { + "properties": { + "name": { + "type": "string" + }, + "info": { + "$ref": "#/components/schemas/JsonNode" + }, + "photo": { + "type": "string" + } + } + }, + "MqttDeviceProfileTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" + }, + { + "type": "object", + "properties": { + "deviceTelemetryTopic": { + "type": "string" + }, + "deviceAttributesTopic": { + "type": "string" + }, + "deviceAttributesSubscribeTopic": { + "type": "string" + }, + "transportPayloadTypeConfiguration": { + "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" + }, + "sparkplug": { + "type": "boolean" + }, + "sparkplugAttributesMetricNames": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "sendAckOnValidationException": { + "type": "boolean" + } + } + } + ] + }, + "MqttDeviceTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceTransportConfiguration" + } + ] + }, + "NewPlatformVersionNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + } + ] + }, + "NoSecLwM2MBootstrapServerCredential": { + "allOf": [ + { + "$ref": "#/components/schemas/LwM2MBootstrapServerCredential" + }, + { + "type": "object", + "properties": { + "shortServerId": { + "type": "integer", + "format": "int32", + "description": "Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + "example": 123, + "readOnly": true + }, + "bootstrapServerIs": { + "type": "boolean", + "description": "Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.", + "example": true, + "readOnly": true + }, + "host": { + "type": "string", + "description": "Host for 'No Security' mode", + "example": "0.0.0.0", + "readOnly": true + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + "example": "'5685' or '5687'", + "readOnly": true + }, + "clientHoldOffTime": { + "type": "integer", + "format": "int32", + "description": "Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)", + "example": 1, + "readOnly": true + }, + "serverPublicKey": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + "example": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==", + "readOnly": true + }, + "serverCertificate": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + "example": "MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=", + "readOnly": true + }, + "bootstrapServerAccountTimeout": { + "type": "integer", + "format": "int32", + "description": "Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)", + "example": 0, + "readOnly": true + }, + "lifetime": { + "type": "integer", + "format": "int32", + "description": "Specify the lifetime of the registration in seconds.", + "example": 300, + "readOnly": true + }, + "defaultMinPeriod": { + "type": "integer", + "format": "int32", + "description": "The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.", + "example": 1, + "readOnly": true + }, + "notifIfDisabled": { + "type": "boolean", + "description": "If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.", + "example": true, + "readOnly": true + }, + "binding": { + "type": "string", + "description": "This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.", + "example": "U", + "readOnly": true + } + } + } + ] + }, + "NodeConnectionInfo": { + "properties": { + "fromIndex": { + "type": "integer", + "format": "int32", + "description": "Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection." + }, + "toIndex": { + "type": "integer", + "format": "int32", + "description": "Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'to' part of the connection." + }, + "type": { + "type": "string", + "description": "Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'" + } + }, + "required": [ + "fromIndex", + "toIndex", + "type" + ] + }, + "Notification": { + "properties": { + "requestId": { + "$ref": "#/components/schemas/NotificationRequestId" + }, + "recipientId": { + "$ref": "#/components/schemas/UserId" + }, + "type": { + "type": "string", + "enum": [ + "GENERAL", + "ALARM", + "DEVICE_ACTIVITY", + "ENTITY_ACTION", + "ALARM_COMMENT", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "ALARM_ASSIGNMENT", + "NEW_PLATFORM_VERSION", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RULE_NODE", + "INTEGRATION_LIFECYCLE_EVENT", + "RATE_LIMITS", + "EDGE_CONNECTION", + "EDGE_COMMUNICATION_FAILURE", + "TASK_PROCESSING_FAILURE", + "USER_ACTIVATED", + "USER_REGISTERED" + ] + }, + "deliveryMethod": { + "type": "string", + "enum": [ + "WEB", + "EMAIL", + "SMS", + "SLACK", + "MICROSOFT_TEAMS", + "MOBILE_APP" + ] + }, + "subject": { + "type": "string" + }, + "text": { + "type": "string" + }, + "additionalConfig": { + "$ref": "#/components/schemas/JsonNode" + }, + "info": { + "$ref": "#/components/schemas/NotificationInfo" + }, + "status": { + "type": "string", + "enum": [ + "SENT", + "READ" + ] + }, + "id": { + "$ref": "#/components/schemas/NotificationId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + } + } + }, + "NotificationDeliveryMethodConfig": { + "discriminator": { + "propertyName": "method" + }, + "properties": { + "method": { + "type": "string" + } + }, + "required": [ + "method" + ] + }, + "NotificationId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "NOTIFICATION" + ], + "example": "NOTIFICATION" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "NotificationInfo": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "stateEntityId": { + "$ref": "#/components/schemas/EntityId" + }, + "dashboardId": { + "$ref": "#/components/schemas/DashboardId" + }, + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "NotificationPref": { + "properties": { + "enabled": { + "type": "boolean" + }, + "enabledDeliveryMethods": { + "type": "object", + "additionalProperties": { + "type": "boolean" + } + } + }, + "required": [ + "enabledDeliveryMethods" + ] + }, + "NotificationRequest": { + "properties": { + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "templateId": { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + "template": { + "$ref": "#/components/schemas/NotificationTemplate" + }, + "info": { + "$ref": "#/components/schemas/NotificationInfo" + }, + "additionalConfig": { + "$ref": "#/components/schemas/NotificationRequestConfig" + }, + "originatorEntityId": { + "$ref": "#/components/schemas/EntityId" + }, + "ruleId": { + "$ref": "#/components/schemas/NotificationRuleId" + }, + "status": { + "type": "string", + "enum": [ + "PROCESSING", + "SENT", + "SCHEDULED" + ] + }, + "stats": { + "$ref": "#/components/schemas/NotificationRequestStats" + }, + "id": { + "$ref": "#/components/schemas/NotificationRequestId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + } + }, + "required": [ + "targets" + ] + }, + "NotificationRequestConfig": { + "properties": { + "sendingDelayInSec": { + "type": "integer", + "format": "int32", + "maximum": 604800 + } + } + }, + "NotificationRequestId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "NOTIFICATION_REQUEST" + ], + "example": "NOTIFICATION_REQUEST" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "NotificationRequestInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/NotificationRequestId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "targets": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + }, + "templateId": { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + "template": { + "$ref": "#/components/schemas/NotificationTemplate" + }, + "info": { + "$ref": "#/components/schemas/NotificationInfo" + }, + "additionalConfig": { + "$ref": "#/components/schemas/NotificationRequestConfig" + }, + "originatorEntityId": { + "$ref": "#/components/schemas/EntityId" + }, + "ruleId": { + "$ref": "#/components/schemas/NotificationRuleId" + }, + "status": { + "type": "string", + "enum": [ + "PROCESSING", + "SENT", + "SCHEDULED" + ] + }, + "stats": { + "$ref": "#/components/schemas/NotificationRequestStats" + }, + "templateName": { + "type": "string" + }, + "deliveryMethods": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "WEB", + "EMAIL", + "SMS", + "SLACK", + "MICROSOFT_TEAMS", + "MOBILE_APP" + ] + } + } + }, + "required": [ + "targets" + ] + }, + "NotificationRequestPreview": { + "properties": { + "processedTemplates": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/EmailDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/MicrosoftTeamsDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/MobileAppDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/SlackDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/SmsDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/WebDeliveryMethodNotificationTemplate" + } + ] + } + }, + "totalRecipientsCount": { + "type": "integer", + "format": "int32" + }, + "recipientsCountByTarget": { + "type": "object", + "additionalProperties": { + "type": "integer", + "format": "int32" + } + }, + "recipientsPreview": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "NotificationRequestStats": { + "properties": { + "sent": { + "type": "object", + "additionalProperties": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + } + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "totalErrors": { + "properties": { + "opaque": { + "type": "integer", + "format": "int32" + }, + "acquire": { + "type": "integer", + "format": "int32" + }, + "release": { + "type": "integer", + "format": "int32", + "writeOnly": true + }, + "andIncrement": { + "type": "integer", + "format": "int32" + }, + "andDecrement": { + "type": "integer", + "format": "int32" + }, + "plain": { + "type": "integer", + "format": "int32" + } + } + }, + "error": { + "type": "string" + } + } + }, + "NotificationRule": { + "properties": { + "id": { + "$ref": "#/components/schemas/NotificationRuleId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "templateId": { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + "triggerType": { + "type": "string", + "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", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RATE_LIMITS", + "TASK_PROCESSING_FAILURE" + ] + }, + "triggerConfig": { + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmAssignmentNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/AlarmCommentNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/AlarmNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/ApiUsageLimitNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/DeviceActivityNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EdgeCommunicationFailureNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EdgeConnectionNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EntitiesLimitNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EntityActionNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/IntegrationLifecycleEventNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/NewPlatformVersionNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/RateLimitsNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/TaskProcessingFailureNotificationRuleTriggerConfig" + } + ] + }, + "recipientsConfig": { + "oneOf": [ + { + "$ref": "#/components/schemas/EscalatedNotificationRuleRecipientsConfig" + } + ] + }, + "additionalConfig": { + "$ref": "#/components/schemas/NotificationRuleConfig" + } + }, + "required": [ + "name", + "recipientsConfig", + "templateId", + "triggerConfig", + "triggerType" + ] + }, + "NotificationRuleConfig": { + "properties": { + "description": { + "type": "string" + } + } + }, + "NotificationRuleId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "NOTIFICATION_RULE" + ], + "example": "NOTIFICATION_RULE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "NotificationRuleInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/NotificationRuleId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "name": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "templateId": { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + "triggerType": { + "type": "string", + "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", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RATE_LIMITS", + "TASK_PROCESSING_FAILURE" + ] + }, + "triggerConfig": { + "oneOf": [ + { + "$ref": "#/components/schemas/AlarmAssignmentNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/AlarmCommentNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/AlarmNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/ApiUsageLimitNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/DeviceActivityNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EdgeCommunicationFailureNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EdgeConnectionNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EntitiesLimitNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/EntityActionNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/IntegrationLifecycleEventNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/NewPlatformVersionNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/RateLimitsNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig" + }, + { + "$ref": "#/components/schemas/TaskProcessingFailureNotificationRuleTriggerConfig" + } + ] + }, + "recipientsConfig": { + "oneOf": [ + { + "$ref": "#/components/schemas/EscalatedNotificationRuleRecipientsConfig" + } + ] + }, + "additionalConfig": { + "$ref": "#/components/schemas/NotificationRuleConfig" + }, + "templateName": { + "type": "string" + }, + "deliveryMethods": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "WEB", + "EMAIL", + "SMS", + "SLACK", + "MICROSOFT_TEAMS", + "MOBILE_APP" + ] + } + } + }, + "required": [ + "name", + "recipientsConfig", + "templateId", + "triggerConfig", + "triggerType" + ] + }, + "NotificationRuleRecipientsConfig": { + "discriminator": { + "propertyName": "triggerType" + }, + "properties": { + "triggerType": { + "type": "string", + "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", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RATE_LIMITS", + "TASK_PROCESSING_FAILURE" + ] + } + }, + "required": [ + "triggerType" + ] + }, + "NotificationRuleTriggerConfig": { + "discriminator": { + "propertyName": "triggerType" + }, + "properties": { + "triggerType": { + "type": "string", + "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", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RATE_LIMITS", + "TASK_PROCESSING_FAILURE" + ] + } + } + }, + "NotificationSettings": { + "properties": { + "deliveryMethodsConfigs": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/MobileAppNotificationDeliveryMethodConfig" + }, + { + "$ref": "#/components/schemas/SlackNotificationDeliveryMethodConfig" + } + ] + } + } + }, + "required": [ + "deliveryMethodsConfigs" + ] + }, + "NotificationTarget": { + "properties": { + "id": { + "$ref": "#/components/schemas/NotificationTargetId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "name": { + "type": "string" + }, + "configuration": { + "oneOf": [ + { + "$ref": "#/components/schemas/MicrosoftTeamsNotificationTargetConfig" + }, + { + "$ref": "#/components/schemas/PlatformUsersNotificationTargetConfig" + }, + { + "$ref": "#/components/schemas/SlackNotificationTargetConfig" + } + ] + } + }, + "required": [ + "configuration", + "name" + ] + }, + "NotificationTargetConfig": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "NotificationTargetId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "NOTIFICATION_TARGET" + ], + "example": "NOTIFICATION_TARGET" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "NotificationTemplate": { + "properties": { + "id": { + "$ref": "#/components/schemas/NotificationTemplateId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "name": { + "type": "string" + }, + "notificationType": { + "type": "string", + "enum": [ + "GENERAL", + "ALARM", + "DEVICE_ACTIVITY", + "ENTITY_ACTION", + "ALARM_COMMENT", + "RULE_ENGINE_COMPONENT_LIFECYCLE_EVENT", + "ALARM_ASSIGNMENT", + "NEW_PLATFORM_VERSION", + "ENTITIES_LIMIT", + "API_USAGE_LIMIT", + "RULE_NODE", + "INTEGRATION_LIFECYCLE_EVENT", + "RATE_LIMITS", + "EDGE_CONNECTION", + "EDGE_COMMUNICATION_FAILURE", + "TASK_PROCESSING_FAILURE", + "USER_ACTIVATED", + "USER_REGISTERED" + ] + }, + "configuration": { + "$ref": "#/components/schemas/NotificationTemplateConfig" + } + }, + "required": [ + "configuration", + "name", + "notificationType" + ] + }, + "NotificationTemplateConfig": { + "properties": { + "deliveryMethodsTemplates": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/EmailDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/MicrosoftTeamsDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/MobileAppDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/SlackDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/SmsDeliveryMethodNotificationTemplate" + }, + { + "$ref": "#/components/schemas/WebDeliveryMethodNotificationTemplate" + } + ] + } + } + }, + "required": [ + "deliveryMethodsTemplates" + ] + }, + "NotificationTemplateId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "NOTIFICATION_TEMPLATE" + ], + "example": "NOTIFICATION_TEMPLATE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "NumericFilterPredicate": { + "allOf": [ + { + "$ref": "#/components/schemas/KeyFilterPredicate" + }, + { + "type": "object", + "properties": { + "operation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL", + "GREATER", + "LESS", + "GREATER_OR_EQUAL", + "LESS_OR_EQUAL" + ] + }, + "value": { + "$ref": "#/components/schemas/FilterPredicateValueDouble" + } + } + } + ] + }, + "OAuth2BasicMapperConfig": { + "properties": { + "emailAttributeKey": { + "type": "string", + "description": "Email attribute key of OAuth2 principal attributes. Must be specified for BASIC mapper type and cannot be specified for GITHUB type" + }, + "firstNameAttributeKey": { + "type": "string", + "description": "First name attribute key" + }, + "lastNameAttributeKey": { + "type": "string", + "description": "Last name attribute key" + }, + "tenantNameStrategy": { + "type": "string", + "description": "Tenant naming strategy. For DOMAIN type, domain for tenant name will be taken from the email (substring before '@')", + "enum": [ + "DOMAIN", + "EMAIL", + "CUSTOM" + ] + }, + "tenantNamePattern": { + "type": "string", + "description": "Tenant name pattern for CUSTOM naming strategy. OAuth2 attributes in the pattern can be used by enclosing attribute key in '%{' and '}'", + "example": "%{email}" + }, + "customerNamePattern": { + "type": "string", + "description": "Customer name pattern. When creating a user on the first OAuth2 log in, if specified, customer name will be used to create or find existing customer in the platform and assign customerId to the user" + }, + "defaultDashboardName": { + "type": "string", + "description": "Name of the tenant's dashboard to set as default dashboard for newly created user" + }, + "alwaysFullScreen": { + "type": "boolean", + "description": "Whether default dashboard should be open in full screen" + }, + "parentCustomerNamePattern": { + "type": "string" + }, + "userGroupsNamePattern": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "tenantNameStrategy" + ] + }, + "OAuth2Client": { + "properties": { + "id": { + "$ref": "#/components/schemas/OAuth2ClientId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional info of OAuth2 client (e.g. providerName)" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id" + }, + "title": { + "type": "string", + "description": "Oauth2 client title" + }, + "mapperConfig": { + "$ref": "#/components/schemas/OAuth2MapperConfig", + "description": "Config for mapping OAuth2 log in response to platform entities" + }, + "clientId": { + "type": "string", + "description": "OAuth2 client ID. Cannot be empty" + }, + "clientSecret": { + "type": "string", + "description": "OAuth2 client secret. Cannot be empty" + }, + "authorizationUri": { + "type": "string", + "description": "Authorization URI of the OAuth2 provider. Cannot be empty" + }, + "accessTokenUri": { + "type": "string", + "description": "Access token URI of the OAuth2 provider. Cannot be empty" + }, + "scope": { + "type": "array", + "description": "OAuth scopes that will be requested from OAuth2 platform. Cannot be empty", + "items": { + "type": "string" + } + }, + "userInfoUri": { + "type": "string", + "description": "User info URI of the OAuth2 provider" + }, + "userNameAttributeName": { + "type": "string", + "description": "Name of the username attribute in OAuth2 provider response. Cannot be empty" + }, + "jwkSetUri": { + "type": "string", + "description": "JSON Web Key URI of the OAuth2 provider" + }, + "clientAuthenticationMethod": { + "type": "string", + "description": "Client authentication method to use: 'BASIC' or 'POST'. Cannot be empty" + }, + "loginButtonLabel": { + "type": "string", + "description": "OAuth2 provider label. Cannot be empty" + }, + "loginButtonIcon": { + "type": "string", + "description": "Log in button icon for OAuth2 provider" + }, + "platforms": { + "type": "array", + "description": "List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed)", + "items": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } + }, + "name": { + "type": "string", + "readOnly": true + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "readOnly": true + } + }, + "required": [ + "accessTokenUri", + "additionalInfo", + "authorizationUri", + "clientAuthenticationMethod", + "clientId", + "clientSecret", + "loginButtonLabel", + "mapperConfig", + "scope", + "title", + "userNameAttributeName" + ] + }, + "OAuth2ClientId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ], + "example": "DEVICE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "OAuth2ClientInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/OAuth2ClientId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "title": { + "type": "string", + "description": "Oauth2 client registration title (e.g. My google)" + }, + "providerName": { + "type": "string", + "description": "Oauth2 client provider name (e.g. Google)" + }, + "platforms": { + "type": "array", + "description": "List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed)", + "items": { + "type": "string", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + } + }, + "name": { + "type": "string", + "readOnly": true + } + } + }, + "OAuth2ClientLoginInfo": { + "properties": { + "name": { + "type": "string", + "description": "OAuth2 client name", + "example": "GitHub" + }, + "icon": { + "type": "string", + "description": "Name of the icon, displayed on OAuth2 log in button", + "example": "github-logo" + }, + "url": { + "type": "string", + "description": "URI for OAuth2 log in. On HTTP GET request to this URI, it redirects to the OAuth2 provider page", + "example": "/oauth2/authorization/8352f191-2b4d-11ec-9ed1-cbf57c026ecc" + } + } + }, + "OAuth2ClientRegistrationTemplate": { + "properties": { + "id": { + "$ref": "#/components/schemas/OAuth2ClientRegistrationTemplateId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "providerId": { + "type": "string", + "description": "OAuth2 provider identifier (e.g. its name)" + }, + "mapperConfig": { + "$ref": "#/components/schemas/OAuth2MapperConfig", + "description": "Default config for mapping OAuth2 log in response to platform entities" + }, + "authorizationUri": { + "type": "string", + "description": "Default authorization URI of the OAuth2 provider" + }, + "accessTokenUri": { + "type": "string", + "description": "Default access token URI of the OAuth2 provider" + }, + "scope": { + "type": "array", + "description": "Default OAuth scopes that will be requested from OAuth2 platform", + "items": { + "type": "string" + } + }, + "userInfoUri": { + "type": "string", + "description": "Default user info URI of the OAuth2 provider" + }, + "userNameAttributeName": { + "type": "string", + "description": "Default name of the username attribute in OAuth2 provider log in response" + }, + "jwkSetUri": { + "type": "string", + "description": "Default JSON Web Key URI of the OAuth2 provider" + }, + "clientAuthenticationMethod": { + "type": "string", + "description": "Default client authentication method to use: 'BASIC' or 'POST'" + }, + "comment": { + "type": "string", + "description": "Comment for OAuth2 provider" + }, + "loginButtonIcon": { + "type": "string", + "description": "Default log in button icon for OAuth2 provider" + }, + "loginButtonLabel": { + "type": "string", + "description": "Default OAuth2 provider label" + }, + "helpLink": { + "type": "string", + "description": "Help link for OAuth2 provider" + }, + "name": { + "type": "string" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + }, + "required": [ + "providerId" + ] + }, + "OAuth2ClientRegistrationTemplateId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "OAuth2CustomMapperConfig": { + "properties": { + "url": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "sendToken": { + "type": "boolean" + } + } + }, + "OAuth2MapperConfig": { + "properties": { + "allowUserCreation": { + "type": "boolean", + "description": "Whether user should be created if not yet present on the platform after successful authentication" + }, + "activateUser": { + "type": "boolean", + "description": "Whether user credentials should be activated when user is created after successful authentication" + }, + "type": { + "type": "string", + "description": "Type of OAuth2 mapper. Depending on this param, different mapper config fields must be specified", + "enum": [ + "BASIC", + "CUSTOM", + "GITHUB", + "APPLE" + ] + }, + "basic": { + "$ref": "#/components/schemas/OAuth2BasicMapperConfig", + "description": "Mapper config for BASIC and GITHUB mapper types" + }, + "custom": { + "$ref": "#/components/schemas/OAuth2CustomMapperConfig", + "description": "Mapper config for CUSTOM mapper type" + } + }, + "required": [ + "type" + ] + }, + "ObjectAttributes": { + "properties": { + "dim": { + "type": "integer", + "format": "int64" + }, + "ssid": { + "type": "integer", + "format": "int64" + }, + "uri": { + "type": "string" + }, + "ver": {}, + "lwm2m": { + "$ref": "#/components/schemas/LwM2mVersion" + }, + "pmin": { + "type": "integer", + "format": "int64" + }, + "pmax": { + "type": "integer", + "format": "int64" + }, + "gt": { + "type": "number", + "format": "double" + }, + "lt": { + "type": "number", + "format": "double" + }, + "st": { + "type": "number", + "format": "double" + }, + "epmin": { + "type": "integer", + "format": "int64" + }, + "epmax": { + "type": "integer", + "format": "int64" + } + } + }, + "OriginatorEntityOwnerUsersFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + } + ] + }, + "OtaPackage": { + "properties": { + "id": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the ota package creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the ota package can't be changed.", + "readOnly": true + }, + "deviceProfileId": { + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "OTA Package type.", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ], + "example": "FIRMWARE", + "readOnly": true + }, + "title": { + "type": "string", + "description": "OTA Package title.", + "example": "fw", + "readOnly": true + }, + "version": { + "type": "string", + "description": "OTA Package version.", + "example": 1.0, + "readOnly": true + }, + "tag": { + "type": "string", + "description": "OTA Package tag.", + "example": "fw_1.0", + "readOnly": true + }, + "url": { + "type": "string", + "description": "OTA Package url.", + "example": "http://thingsboard.org/fw/1", + "readOnly": true + }, + "hasData": { + "type": "boolean", + "description": "Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.", + "example": true, + "readOnly": true + }, + "fileName": { + "type": "string", + "description": "OTA Package file name.", + "example": "fw_1.0", + "readOnly": true + }, + "contentType": { + "type": "string", + "description": "OTA Package content type.", + "example": "APPLICATION_OCTET_STREAM", + "readOnly": true + }, + "checksumAlgorithm": { + "type": "string", + "description": "OTA Package checksum algorithm.", + "enum": [ + "MD5", + "SHA256", + "SHA384", + "SHA512", + "CRC32", + "MURMUR3_32", + "MURMUR3_128" + ], + "example": "CRC32", + "readOnly": true + }, + "checksum": { + "type": "string", + "description": "OTA Package checksum.", + "example": "0xd87f7e0c", + "readOnly": true + }, + "dataSize": { + "type": "integer", + "format": "int64", + "description": "OTA Package data size.", + "example": 8, + "readOnly": true + }, + "data": { + "properties": { + "short": { + "type": "integer", + "format": "int32" + }, + "char": { + "type": "string" + }, + "int": { + "type": "integer", + "format": "int32" + }, + "long": { + "type": "integer", + "format": "int64" + }, + "float": { + "type": "number", + "format": "float" + }, + "double": { + "type": "number", + "format": "double" + }, + "direct": { + "type": "boolean" + }, + "readOnly": { + "type": "boolean" + } + } + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "OTA Package description.", + "example": "Description for the OTA Package fw_1.0" + } + } + }, + "OtaPackageId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "OTA_PACKAGE" + ], + "example": "OTA_PACKAGE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "OtaPackageInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the ota package creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the ota package can't be changed.", + "readOnly": true + }, + "deviceProfileId": { + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "OTA Package type.", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ], + "example": "FIRMWARE", + "readOnly": true + }, + "title": { + "type": "string", + "description": "OTA Package title.", + "example": "fw", + "readOnly": true + }, + "version": { + "type": "string", + "description": "OTA Package version.", + "example": 1.0, + "readOnly": true + }, + "tag": { + "type": "string", + "description": "OTA Package tag.", + "example": "fw_1.0", + "readOnly": true + }, + "url": { + "type": "string", + "description": "OTA Package url.", + "example": "http://thingsboard.org/fw/1", + "readOnly": true + }, + "hasData": { + "type": "boolean", + "description": "Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.", + "example": true, + "readOnly": true + }, + "fileName": { + "type": "string", + "description": "OTA Package file name.", + "example": "fw_1.0", + "readOnly": true + }, + "contentType": { + "type": "string", + "description": "OTA Package content type.", + "example": "APPLICATION_OCTET_STREAM", + "readOnly": true + }, + "checksumAlgorithm": { + "type": "string", + "description": "OTA Package checksum algorithm.", + "enum": [ + "MD5", + "SHA256", + "SHA384", + "SHA512", + "CRC32", + "MURMUR3_32", + "MURMUR3_128" + ], + "example": "CRC32", + "readOnly": true + }, + "checksum": { + "type": "string", + "description": "OTA Package checksum.", + "example": "0xd87f7e0c", + "readOnly": true + }, + "dataSize": { + "type": "integer", + "format": "int64", + "description": "OTA Package data size.", + "example": 8, + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "OTA Package description.", + "example": "Description for the OTA Package fw_1.0" + } + } + }, + "OtherConfiguration": { + "properties": { + "fwUpdateStrategy": { + "type": "integer", + "format": "int32" + }, + "swUpdateStrategy": { + "type": "integer", + "format": "int32" + }, + "clientOnlyObserveAfterConnect": { + "type": "integer", + "format": "int32" + }, + "powerMode": { + "type": "string", + "enum": [ + "PSM", + "DRX", + "E_DRX" + ] + }, + "psmActivityTimer": { + "type": "integer", + "format": "int64" + }, + "edrxCycle": { + "type": "integer", + "format": "int64" + }, + "pagingTransmissionWindow": { + "type": "integer", + "format": "int64" + }, + "fwUpdateResource": { + "type": "string" + }, + "swUpdateResource": { + "type": "string" + }, + "defaultObjectIDVer": { + "type": "string" + } + } + }, + "Output": { + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "TIME_SERIES", + "ATTRIBUTES" + ] + }, + "scope": { + "type": "string", + "enum": [ + "CLIENT_SCOPE", + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + }, + "decimalsByDefault": { + "type": "integer", + "format": "int32" + } + } + }, + "PSKLwM2MBootstrapServerCredential": { + "allOf": [ + { + "$ref": "#/components/schemas/LwM2MBootstrapServerCredential" + }, + { + "type": "object", + "properties": { + "shortServerId": { + "type": "integer", + "format": "int32", + "description": "Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + "example": 123, + "readOnly": true + }, + "bootstrapServerIs": { + "type": "boolean", + "description": "Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.", + "example": true, + "readOnly": true + }, + "host": { + "type": "string", + "description": "Host for 'No Security' mode", + "example": "0.0.0.0", + "readOnly": true + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + "example": "'5685' or '5687'", + "readOnly": true + }, + "clientHoldOffTime": { + "type": "integer", + "format": "int32", + "description": "Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)", + "example": 1, + "readOnly": true + }, + "serverPublicKey": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + "example": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==", + "readOnly": true + }, + "serverCertificate": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + "example": "MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=", + "readOnly": true + }, + "bootstrapServerAccountTimeout": { + "type": "integer", + "format": "int32", + "description": "Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)", + "example": 0, + "readOnly": true + }, + "lifetime": { + "type": "integer", + "format": "int32", + "description": "Specify the lifetime of the registration in seconds.", + "example": 300, + "readOnly": true + }, + "defaultMinPeriod": { + "type": "integer", + "format": "int32", + "description": "The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.", + "example": 1, + "readOnly": true + }, + "notifIfDisabled": { + "type": "boolean", + "description": "If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.", + "example": true, + "readOnly": true + }, + "binding": { + "type": "string", + "description": "This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.", + "example": "U", + "readOnly": true + } + } + } + ] + }, + "PageDataAlarmCommentInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmCommentInfo" + }, + "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 + } + } + }, + "PageDataAlarmData": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmData" + }, + "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 + } + } + }, + "PageDataAlarmInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AlarmInfo" + }, + "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 + } + } + }, + "PageDataAsset": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Asset" + }, + "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 + } + } + }, + "PageDataAssetInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AssetInfo" + }, + "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 + } + } + }, + "PageDataAssetProfile": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AssetProfile" + }, + "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 + } + } + }, + "PageDataAssetProfileInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AssetProfileInfo" + }, + "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 + } + } + }, + "PageDataAuditLog": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/AuditLog" + }, + "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 + } + } + }, + "PageDataBlobEntityWithCustomerInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/BlobEntityWithCustomerInfo" + }, + "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 + } + } + }, + "PageDataCalculatedField": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/CalculatedField" + }, + "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 + } + } + }, + "PageDataContactBasedObject": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/ContactBasedObject" + }, + "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 + } + } + }, + "PageDataConverter": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Converter" + }, + "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 + } + } + }, + "PageDataCustomMenuInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/CustomMenuInfo" + }, + "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 + } + } + }, + "PageDataCustomer": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Customer" + }, + "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 + } + } + }, + "PageDataCustomerInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/CustomerInfo" + }, + "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 + } + } + }, + "PageDataDashboardInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/DashboardInfo" + }, + "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 + } + } + }, + "PageDataDevice": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Device" + }, + "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 + } + } + }, + "PageDataDeviceInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/DeviceInfo" + }, + "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 + } + } + }, + "PageDataDeviceProfile": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/DeviceProfile" + }, + "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 + } + } + }, + "PageDataDeviceProfileInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/DeviceProfileInfo" + }, + "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 + } + } + }, + "PageDataDomainInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/DomainInfo" + }, + "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 + } + } + }, + "PageDataEdge": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Edge" + }, + "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 + } + } + }, + "PageDataEdgeEvent": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EdgeEvent" + }, + "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 + } + } + }, + "PageDataEdgeInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EdgeInfo" + }, + "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 + } + } + }, + "PageDataEntityData": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntityData" + }, + "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 + } + } + }, + "PageDataEntityGroupInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntityGroupInfo" + }, + "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 + } + } + }, + "PageDataEntityInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "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 + } + } + }, + "PageDataEntitySubtype": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntitySubtype" + }, + "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 + } + } + }, + "PageDataEntityVersion": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntityVersion" + }, + "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 + } + } + }, + "PageDataEntityView": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntityView" + }, + "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 + } + } + }, + "PageDataEntityViewInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EntityViewInfo" + }, + "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 + } + } + }, + "PageDataEventInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/EventInfo" + }, + "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 + } + } + }, + "PageDataIntegration": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Integration" + }, + "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 + } + } + }, + "PageDataIntegrationInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/IntegrationInfo" + }, + "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 + } + } + }, + "PageDataMobileApp": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/MobileApp" + }, + "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 + } + } + }, + "PageDataMobileAppBundleInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/MobileAppBundleInfo" + }, + "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 + } + } + }, + "PageDataNotification": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Notification" + }, + "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 + } + } + }, + "PageDataNotificationRequestInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/NotificationRequestInfo" + }, + "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 + } + } + }, + "PageDataNotificationRuleInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/NotificationRuleInfo" + }, + "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 + } + } + }, + "PageDataNotificationTarget": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/NotificationTarget" + }, + "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 + } + } + }, + "PageDataNotificationTemplate": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/NotificationTemplate" + }, + "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 + } + } + }, + "PageDataOAuth2ClientInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/OAuth2ClientInfo" + }, + "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 + } + } + }, + "PageDataOtaPackageInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/OtaPackageInfo" + }, + "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 + } + } + }, + "PageDataQueue": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Queue" + }, + "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 + } + } + }, + "PageDataQueueStats": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/QueueStats" + }, + "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 + } + } + }, + "PageDataRole": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Role" + }, + "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 + } + } + }, + "PageDataRuleChain": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/RuleChain" + }, + "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 + } + } + }, + "PageDataSchedulerEventInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/SchedulerEventInfo" + }, + "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 + } + } + }, + "PageDataShortEntityView": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/ShortEntityView" + }, + "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 + } + } + }, + "PageDataTbResourceInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/TbResourceInfo" + }, + "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 + } + } + }, + "PageDataTenant": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/Tenant" + }, + "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 + } + } + }, + "PageDataTenantInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/TenantInfo" + }, + "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 + } + } + }, + "PageDataTenantProfile": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/TenantProfile" + }, + "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 + } + } + }, + "PageDataUser": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/User" + }, + "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 + } + } + }, + "PageDataUserEmailInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/UserEmailInfo" + }, + "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 + } + } + }, + "PageDataUserInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/UserInfo" + }, + "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 + } + } + }, + "PageDataWidgetTypeInfo": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/WidgetTypeInfo" + }, + "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 + } + } + }, + "PageDataWidgetsBundle": { + "properties": { + "data": { + "type": "array", + "description": "Array of the entities", + "items": { + "$ref": "#/components/schemas/WidgetsBundle" + }, + "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 + } + } + }, + "Palette": { + "properties": { + "type": { + "type": "string", + "description": "Name of the pre-defined palette, or 'custom'", + "example": "custom" + }, + "colors": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Mapping of hue identifier number to the rgb(a) color code" + }, + "extends": { + "type": "string", + "description": "Pre-defined palette name that the custom palette extends", + "example": "purple" + } + }, + "required": [ + "type" + ] + }, + "PaletteSettings": { + "properties": { + "primaryPalette": { + "$ref": "#/components/schemas/Palette", + "description": "Primary palette JSON" + }, + "accentPalette": { + "$ref": "#/components/schemas/Palette", + "description": "Accent palette JSON" + } + }, + "required": [ + "accentPalette", + "primaryPalette" + ] + }, + "PlatformTwoFaSettings": { + "description": "Settings value", + "properties": { + "useSystemTwoFactorAuthSettings": { + "type": "boolean" + }, + "providers": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BackupCodeTwoFaProviderConfig" + }, + { + "$ref": "#/components/schemas/EmailTwoFaProviderConfig" + }, + { + "$ref": "#/components/schemas/SmsTwoFaProviderConfig" + }, + { + "$ref": "#/components/schemas/TotpTwoFaProviderConfig" + } + ] + } + }, + "minVerificationCodeSendPeriod": { + "type": "integer", + "format": "int32", + "minimum": 5 + }, + "verificationCodeCheckRateLimit": { + "type": "string", + "pattern": "[1-9]\\d*:[1-9]\\d*" + }, + "maxVerificationFailuresBeforeUserLockout": { + "type": "integer", + "format": "int32", + "minimum": 0 + }, + "totalAllowedTimeForVerification": { + "type": "integer", + "format": "int32", + "minimum": 60 + } + }, + "required": [ + "minVerificationCodeSendPeriod", + "providers", + "totalAllowedTimeForVerification" + ] + }, + "PlatformUsersNotificationTargetConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationTargetConfig" + }, + { + "type": "object", + "properties": { + "usersFilter": { + "$ref": "#/components/schemas/UsersFilter" + } + } + } + ], + "required": [ + "usersFilter" + ] + }, + "PowerSavingConfiguration": { + "properties": { + "powerMode": { + "type": "string", + "enum": [ + "PSM", + "DRX", + "E_DRX" + ] + }, + "psmActivityTimer": { + "type": "integer", + "format": "int64" + }, + "edrxCycle": { + "type": "integer", + "format": "int64" + }, + "pagingTransmissionWindow": { + "type": "integer", + "format": "int64" + } + } + }, + "ProcessingStrategy": { + "properties": { + "type": { + "type": "string", + "enum": [ + "SKIP_ALL_FAILURES", + "SKIP_ALL_FAILURES_AND_TIMED_OUT", + "RETRY_ALL", + "RETRY_FAILED", + "RETRY_TIMED_OUT", + "RETRY_FAILED_AND_TIMED_OUT" + ] + }, + "retries": { + "type": "integer", + "format": "int32" + }, + "failurePercentage": { + "type": "number", + "format": "double" + }, + "pauseBetweenRetries": { + "type": "integer", + "format": "int64" + }, + "maxPauseBetweenRetries": { + "type": "integer", + "format": "int64" + } + } + }, + "ProtoTransportPayloadConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/TransportPayloadTypeConfiguration" + }, + { + "type": "object", + "properties": { + "deviceTelemetryProtoSchema": { + "type": "string" + }, + "deviceAttributesProtoSchema": { + "type": "string" + }, + "deviceRpcRequestProtoSchema": { + "type": "string" + }, + "deviceRpcResponseProtoSchema": { + "type": "string" + }, + "enableCompatibilityWithJsonPayloadFormat": { + "type": "boolean" + }, + "useJsonPayloadFormatForDefaultDownlinkTopics": { + "type": "boolean" + } + } + } + ] + }, + "QRCodeConfig": { + "properties": { + "showOnHomePage": { + "type": "boolean" + }, + "badgeEnabled": { + "type": "boolean" + }, + "qrCodeLabelEnabled": { + "type": "boolean" + }, + "badgePosition": { + "type": "string", + "enum": [ + "RIGHT", + "LEFT" + ] + }, + "qrCodeLabel": { + "type": "string" + } + } + }, + "QrCodeSettings": { + "description": "A JSON value representing the mobile apps configuration", + "properties": { + "id": { + "$ref": "#/components/schemas/QrCodeSettingsId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "useSystemSettings": { + "type": "boolean", + "description": "Use settings from system level", + "example": true + }, + "useDefaultApp": { + "type": "boolean", + "description": "Type of application: true means use default Thingsboard app", + "example": true + }, + "mobileAppBundleId": { + "$ref": "#/components/schemas/MobileAppBundleId", + "description": "Mobile app bundle." + }, + "qrCodeConfig": { + "$ref": "#/components/schemas/QRCodeConfig", + "description": "QR code config configuration." + }, + "androidEnabled": { + "type": "boolean", + "description": "Indicates if google play link is available", + "example": true + }, + "iosEnabled": { + "type": "boolean", + "description": "Indicates if apple store link is available", + "example": true + }, + "googlePlayLink": { + "type": "string", + "readOnly": true + }, + "appStoreLink": { + "type": "string", + "readOnly": true + } + }, + "required": [ + "qrCodeConfig" + ] + }, + "QrCodeSettingsId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "string", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "id" + ] + }, + "Queue": { + "description": "A JSON value representing the queue.", + "properties": { + "id": { + "$ref": "#/components/schemas/QueueId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "name": { + "type": "string" + }, + "topic": { + "type": "string" + }, + "pollInterval": { + "type": "integer", + "format": "int32" + }, + "partitions": { + "type": "integer", + "format": "int32" + }, + "consumerPerPartition": { + "type": "boolean" + }, + "packProcessingTimeout": { + "type": "integer", + "format": "int64" + }, + "submitStrategy": { + "$ref": "#/components/schemas/SubmitStrategy" + }, + "processingStrategy": { + "$ref": "#/components/schemas/ProcessingStrategy" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "QueueId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "QUEUE" + ], + "example": "QUEUE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "QueueStats": { + "properties": { + "id": { + "$ref": "#/components/schemas/QueueStatsId" + }, + "createdTime": { + "type": "integer", + "format": "int64" + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "queueName": { + "type": "string" + }, + "serviceId": { + "type": "string" + } + } + }, + "QueueStatsId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "QUEUE_STATS" + ], + "example": "QUEUE_STATS" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "RPKLwM2MBootstrapServerCredential": { + "allOf": [ + { + "$ref": "#/components/schemas/LwM2MBootstrapServerCredential" + }, + { + "type": "object", + "properties": { + "shortServerId": { + "type": "integer", + "format": "int32", + "description": "Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + "example": 123, + "readOnly": true + }, + "bootstrapServerIs": { + "type": "boolean", + "description": "Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.", + "example": true, + "readOnly": true + }, + "host": { + "type": "string", + "description": "Host for 'No Security' mode", + "example": "0.0.0.0", + "readOnly": true + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + "example": "'5685' or '5687'", + "readOnly": true + }, + "clientHoldOffTime": { + "type": "integer", + "format": "int32", + "description": "Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)", + "example": 1, + "readOnly": true + }, + "serverPublicKey": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + "example": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==", + "readOnly": true + }, + "serverCertificate": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + "example": "MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=", + "readOnly": true + }, + "bootstrapServerAccountTimeout": { + "type": "integer", + "format": "int32", + "description": "Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)", + "example": 0, + "readOnly": true + }, + "lifetime": { + "type": "integer", + "format": "int32", + "description": "Specify the lifetime of the registration in seconds.", + "example": 300, + "readOnly": true + }, + "defaultMinPeriod": { + "type": "integer", + "format": "int32", + "description": "The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.", + "example": 1, + "readOnly": true + }, + "notifIfDisabled": { + "type": "boolean", + "description": "If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.", + "example": true, + "readOnly": true + }, + "binding": { + "type": "string", + "description": "This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.", + "example": "U", + "readOnly": true + } + } + } + ] + }, + "RateLimitsNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "apis": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "ENTITY_EXPORT", + "ENTITY_IMPORT", + "NOTIFICATION_REQUESTS", + "NOTIFICATION_REQUESTS_PER_RULE", + "REST_REQUESTS_PER_TENANT", + "REST_REQUESTS_PER_CUSTOMER", + "WS_UPDATES_PER_SESSION", + "CASSANDRA_QUERIES", + "EDGE_EVENTS", + "EDGE_EVENTS_PER_EDGE", + "EDGE_UPLINK_MESSAGES", + "EDGE_UPLINK_MESSAGES_PER_EDGE", + "INTEGRATION_MSGS_PER_TENANT", + "INTEGRATION_MSGS_PER_DEVICE", + "INTEGRATION_MSGS_PER_ASSET", + "INTEGRATION_EVENTS", + "CONVERTER_EVENTS", + "REPORTS", + "PASSWORD_RESET", + "TWO_FA_VERIFICATION_CODE_SEND", + "TWO_FA_VERIFICATION_CODE_CHECK", + "TRANSPORT_MESSAGES_PER_TENANT", + "TRANSPORT_MESSAGES_PER_DEVICE", + "TRANSPORT_MESSAGES_PER_GATEWAY", + "TRANSPORT_MESSAGES_PER_GATEWAY_DEVICE", + "EMAILS", + "WS_SUBSCRIPTIONS", + "CALCULATED_FIELD_DEBUG_EVENTS" + ] + }, + "uniqueItems": true + } + } + } + ] + }, + "RawDataEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "uuid": { + "type": "string", + "description": "String value representing the uuid", + "example": "STARTED" + }, + "messageType": { + "type": "string", + "description": "String value representing the message type" + }, + "message": { + "type": "string", + "description": "String value representing the message" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "ReferencedEntityKey": { + "properties": { + "key": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "TS_LATEST", + "ATTRIBUTE", + "TS_ROLLING" + ] + }, + "scope": { + "type": "string", + "enum": [ + "CLIENT_SCOPE", + "SERVER_SCOPE", + "SHARED_SCOPE" + ] + } + } + }, + "RelationEntityTypeFilter": { + "properties": { + "relationType": { + "type": "string", + "description": "Type of the relation between root entity and other entity (e.g. 'Contains' or 'Manages').", + "example": "Contains" + }, + "entityTypes": { + "type": "array", + "description": "Array of entity types to filter the related entities (e.g. 'DEVICE', 'ASSET').", + "items": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + } + }, + "negate": { + "type": "boolean", + "description": "Negate relation type between root entity and other entity." + } + } + }, + "RelationsQueryFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "rootEntity": { + "$ref": "#/components/schemas/EntityId" + }, + "multiRootEntitiesType": { + "type": "string", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "multiRootEntityIds": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "direction": { + "type": "string", + "enum": [ + "FROM", + "TO" + ] + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelationEntityTypeFilter" + } + }, + "maxLevel": { + "type": "integer", + "format": "int32" + }, + "fetchLastLevelOnly": { + "type": "boolean" + }, + "negate": { + "type": "boolean" + }, + "multiRoot": { + "type": "boolean" + } + } + } + ] + }, + "RelationsSearchParameters": { + "properties": { + "rootId": { + "type": "string", + "format": "uuid", + "description": "Root entity id to start search from.", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "rootType": { + "type": "string", + "description": "Type of the root entity.", + "enum": [ + "TENANT", + "CUSTOMER", + "USER", + "DASHBOARD", + "ASSET", + "DEVICE", + "ALARM", + "ENTITY_GROUP", + "CONVERTER", + "INTEGRATION", + "RULE_CHAIN", + "RULE_NODE", + "SCHEDULER_EVENT", + "BLOB_ENTITY", + "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", + "CALCULATED_FIELD_LINK", + "BILLING_CUSTOMER", + "SUBSCRIPTION_PLAN", + "SUBSCRIPTION", + "COUPON" + ] + }, + "direction": { + "type": "string", + "description": "Type of the root entity.", + "enum": [ + "FROM", + "TO" + ] + }, + "relationTypeGroup": { + "type": "string", + "description": "Type of the relation.", + "enum": [ + "COMMON", + "DASHBOARD", + "FROM_ENTITY_GROUP", + "RULE_CHAIN", + "RULE_NODE", + "EDGE", + "EDGE_AUTO_ASSIGN_RULE_CHAIN" + ] + }, + "maxLevel": { + "type": "integer", + "format": "int32", + "description": "Maximum level of the search depth." + }, + "fetchLastLevelOnly": { + "type": "boolean", + "description": "Fetch entities that match the last level of search. Useful to find Devices that are strictly 'maxLevel' relations away from the root entity." + } + } + }, + "RepeatingAlarmConditionSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmConditionSpec" + }, + { + "type": "object", + "properties": { + "predicate": { + "$ref": "#/components/schemas/FilterPredicateValueInteger" + } + } + } + ] + }, + "ReportConfig": { + "properties": { + "baseUrl": { + "type": "string", + "description": "Base URL of ThingsBoard UI that should be accessible by Report Server.", + "example": "https:thingsboard.cloud" + }, + "dashboardId": { + "type": "string", + "description": "A string value representing the dashboard id.", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "state": { + "type": "string", + "description": "Target dashboard state for report generation." + }, + "timezone": { + "type": "string", + "description": "Timezone in which target dashboard will be presented in report.", + "example": "Europe/Kiev" + }, + "useDashboardTimewindow": { + "type": "boolean", + "description": "If set, timewindow configured in the target dashboard will be used during report generation.", + "example": true + }, + "timewindow": { + "$ref": "#/components/schemas/JsonNode", + "description": "Specific dashboard timewindow that will be used during report generation." + }, + "namePattern": { + "type": "string", + "description": "If set, timewindow configured in the target dashboard will be used during report generation.", + "example": "report-%d{yyyy-MM-dd_HH:mm:ss}" + }, + "type": { + "type": "string", + "description": "Report file type, can be PDF | PNG | JPEG.", + "example": "pdf" + }, + "useCurrentUserCredentials": { + "type": "boolean", + "description": "If set, credentials of user created this report configuration will be used to open dashboard UI during report generation.", + "example": true + }, + "userId": { + "type": "string", + "description": "A string value representing the user id.", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + } + }, + "required": [ + "baseUrl", + "dashboardId", + "namePattern", + "timezone", + "userId" + ] + }, + "RepositorySettings": { + "description": "A JSON value representing the Repository Settings.", + "properties": { + "repositoryUri": { + "type": "string" + }, + "authMethod": { + "type": "string", + "enum": [ + "USERNAME_PASSWORD", + "PRIVATE_KEY" + ] + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "privateKeyFileName": { + "type": "string" + }, + "privateKey": { + "type": "string" + }, + "privateKeyPassword": { + "type": "string" + }, + "defaultBranch": { + "type": "string" + }, + "readOnly": { + "type": "boolean" + }, + "showMergeCommits": { + "type": "boolean" + }, + "localOnly": { + "type": "boolean" + } + } + }, + "RepositorySettingsInfo": { + "properties": { + "configured": { + "type": "boolean" + }, + "readOnly": { + "type": "boolean" + } + } + }, + "ResetPasswordEmailRequest": { + "description": "The JSON object representing the reset password email request.", + "properties": { + "email": { + "type": "string", + "description": "The email of the user", + "example": "user@example.com" + } + } + }, + "ResetPasswordRequest": { + "description": "Reset password request.", + "properties": { + "resetToken": { + "type": "string", + "description": "The reset token to verify", + "example": "AAB254FF67D.." + }, + "password": { + "type": "string", + "description": "The new password to set", + "example": "secret" + } + } + }, + "ResourceExportData": { + "properties": { + "link": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "LWM2M_MODEL", + "JKS", + "PKCS_12", + "JS_MODULE", + "IMAGE", + "DASHBOARD" + ] + }, + "subType": { + "type": "string", + "enum": [ + "IMAGE", + "SCADA_SYMBOL", + "EXTENSION", + "MODULE" + ] + }, + "resourceKey": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "publicResourceKey": { + "type": "string" + }, + "isPublic": { + "type": "boolean", + "writeOnly": true + }, + "mediaType": { + "type": "string" + }, + "data": { + "type": "string" + }, + "public": { + "type": "boolean" + } + } + }, + "Role": { + "description": "A JSON value representing the role.", + "properties": { + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. ", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Role Name", + "example": "Read-Only" + }, + "type": { + "type": "string", + "description": "Type of the role: generic or group", + "enum": [ + "GENERIC", + "GROUP" + ], + "example": "GROUP" + }, + "permissions": { + "$ref": "#/components/schemas/JsonNode" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "id": { + "$ref": "#/components/schemas/RoleId", + "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." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the role creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the role" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "name", + "tenantId", + "type" + ] + }, + "RoleId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "ROLE" + ], + "example": "ROLE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "Rpc": { + "properties": { + "id": { + "$ref": "#/components/schemas/RpcId", + "description": "JSON object with the rpc Id. Referencing non-existing rpc Id will cause error." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the rpc creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "deviceId": { + "$ref": "#/components/schemas/DeviceId", + "description": "JSON object with Device Id.", + "readOnly": true + }, + "expirationTime": { + "type": "integer", + "format": "int64", + "description": "Expiration time of the request.", + "readOnly": true + }, + "request": { + "$ref": "#/components/schemas/JsonNode", + "description": "The request body that will be used to send message to device.", + "readOnly": true + }, + "response": { + "$ref": "#/components/schemas/JsonNode", + "description": "The response from the device.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "The current status of the RPC call.", + "enum": [ + "QUEUED", + "SENT", + "DELIVERED", + "SUCCESSFUL", + "TIMEOUT", + "EXPIRED", + "FAILED", + "DELETED" + ], + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional info used in the rule engine to process the updates to the RPC state.", + "readOnly": true + } + } + }, + "RpcId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "RPC" + ], + "example": "RPC" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "RuleChain": { + "description": "A JSON value representing the rule chain.", + "properties": { + "id": { + "$ref": "#/components/schemas/RuleChainId", + "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." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the rule chain creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Rule Chain name", + "example": "Humidity data processing" + }, + "type": { + "type": "string", + "description": "Rule Chain type. 'EDGE' rule chains are processing messages on the edge devices only.", + "enum": [ + "CORE", + "EDGE" + ], + "example": "A4B72CCDFF33" + }, + "firstRuleNodeId": { + "$ref": "#/components/schemas/RuleNodeId", + "description": "JSON object with Rule Chain Id. Pointer to the first rule node that should receive all messages pushed to this rule chain." + }, + "root": { + "type": "boolean", + "description": "Indicates root rule chain. The root rule chain process messages from all devices and entities by default. User may configure default rule chain per device profile." + }, + "debugMode": { + "type": "boolean", + "description": "Reserved for future usage." + }, + "version": { + "type": "integer", + "format": "int64" + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + }, + "required": [ + "name", + "tenantId" + ] + }, + "RuleChainConnectionInfo": { + "properties": { + "fromIndex": { + "type": "integer", + "format": "int32", + "description": "Index of rule node in the 'nodes' array of the RuleChainMetaData. Indicates the 'from' part of the connection." + }, + "targetRuleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "JSON object with the Rule Chain Id." + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "JSON object with the additional information about the connection." + }, + "type": { + "type": "string", + "description": "Type of the relation. Typically indicated the result of processing by the 'from' rule node. For example, 'Success' or 'Failure'" + } + }, + "required": [ + "additionalInfo", + "fromIndex", + "targetRuleChainId", + "type" + ] + }, + "RuleChainData": { + "description": "A JSON value representing the rule chains.", + "properties": { + "ruleChains": { + "type": "array", + "description": "List of the Rule Chain objects.", + "items": { + "$ref": "#/components/schemas/RuleChain" + }, + "readOnly": true + }, + "metadata": { + "type": "array", + "description": "List of the Rule Chain metadata objects.", + "items": { + "$ref": "#/components/schemas/RuleChainMetaData" + }, + "readOnly": true + } + }, + "required": [ + "metadata", + "ruleChains" + ] + }, + "RuleChainDebugEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "isError": { + "type": "boolean", + "writeOnly": true + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + }, + "message": { + "type": "string", + "description": "String value representing the message" + }, + "error": { + "type": "boolean" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "RuleChainExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/RuleChain" + }, + "metaData": { + "$ref": "#/components/schemas/RuleChainMetaData" + } + } + } + ] + }, + "RuleChainId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "RULE_CHAIN" + ], + "example": "RULE_CHAIN" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "RuleChainImportResult": { + "properties": { + "ruleChainId": { + "$ref": "#/components/schemas/RuleChainId" + }, + "ruleChainName": { + "type": "string" + }, + "updated": { + "type": "boolean" + }, + "error": { + "type": "string" + } + } + }, + "RuleChainMetaData": { + "description": "A JSON value representing the rule chain metadata.", + "properties": { + "ruleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "JSON object with Rule Chain Id.", + "readOnly": true + }, + "version": { + "type": "integer", + "format": "int64", + "description": "Version of the Rule Chain" + }, + "firstNodeIndex": { + "type": "integer", + "format": "int32", + "description": "Index of the first rule node in the 'nodes' list" + }, + "nodes": { + "type": "array", + "description": "List of rule node JSON objects", + "items": { + "$ref": "#/components/schemas/RuleNode" + } + }, + "connections": { + "type": "array", + "description": "List of JSON objects that represent connections between rule nodes", + "items": { + "$ref": "#/components/schemas/NodeConnectionInfo" + } + }, + "ruleChainConnections": { + "type": "array", + "description": "List of JSON objects that represent connections between rule nodes and other rule chains.", + "items": { + "$ref": "#/components/schemas/RuleChainConnectionInfo" + } + } + }, + "required": [ + "connections", + "firstNodeIndex", + "nodes", + "ruleChainConnections", + "ruleChainId" + ] + }, + "RuleChainOutputLabelsUsage": { + "properties": { + "ruleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "Rule Chain Id", + "readOnly": true + }, + "ruleNodeId": { + "$ref": "#/components/schemas/RuleNodeId", + "description": "Rule Node Id", + "readOnly": true + }, + "ruleChainName": { + "type": "string", + "description": "Rule Chain Name", + "readOnly": true + }, + "ruleNodeName": { + "type": "string", + "description": "Rule Node Name", + "readOnly": true + }, + "labels": { + "type": "array", + "description": "Output labels", + "items": { + "type": "string" + }, + "readOnly": true, + "uniqueItems": true + } + }, + "required": [ + "labels", + "ruleChainId", + "ruleChainName", + "ruleNodeId", + "ruleNodeName" + ] + }, + "RuleEngineComponentLifecycleEventNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + }, + { + "type": "object", + "properties": { + "ruleChains": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "ruleChainEvents": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATED", + "STARTED", + "ACTIVATED", + "SUSPENDED", + "UPDATED", + "STOPPED", + "DELETED", + "FAILED", + "DEACTIVATED" + ] + }, + "uniqueItems": true + }, + "onlyRuleChainLifecycleFailures": { + "type": "boolean" + }, + "trackRuleNodeEvents": { + "type": "boolean" + }, + "ruleNodeEvents": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATED", + "STARTED", + "ACTIVATED", + "SUSPENDED", + "UPDATED", + "STOPPED", + "DELETED", + "FAILED", + "DEACTIVATED" + ] + }, + "uniqueItems": true + }, + "onlyRuleNodeLifecycleFailures": { + "type": "boolean" + } + } + } + ] + }, + "RuleNode": { + "properties": { + "id": { + "$ref": "#/components/schemas/RuleNodeId", + "description": "JSON object with the Rule Node Id. Specify this field to update the Rule Node. Referencing non-existing Rule Node Id will cause error. Omit this field to create new rule node." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the rule node creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "ruleChainId": { + "$ref": "#/components/schemas/RuleChainId", + "description": "JSON object with the Rule Chain Id. ", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Full Java Class Name of the rule node implementation. ", + "example": "com.mycompany.iot.rule.engine.ProcessingNode" + }, + "name": { + "type": "string", + "description": "User defined name of the rule node. Used on UI and for logging. ", + "example": "Process sensor reading" + }, + "debugMode": { + "type": "boolean", + "deprecated": true, + "writeOnly": true + }, + "debugSettings": { + "$ref": "#/components/schemas/DebugSettings", + "description": "Debug settings object." + }, + "singletonMode": { + "type": "boolean", + "description": "Enable/disable singleton mode. ", + "example": false + }, + "queueName": { + "type": "string", + "description": "Queue name. ", + "example": "Main" + }, + "configurationVersion": { + "type": "integer", + "format": "int32", + "description": "Version of rule node configuration. ", + "example": 0 + }, + "externalId": { + "$ref": "#/components/schemas/RuleNodeId" + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the rule node. Contains 'layoutX' and 'layoutY' properties for visualization." + } + } + }, + "RuleNodeDebugEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "isError": { + "type": "boolean", + "writeOnly": true + }, + "errorStr": { + "type": "string", + "description": "The case insensitive 'contains' filter based on error message", + "example": "not present in the DB" + }, + "msgDirectionType": { + "type": "string", + "description": "String value representing msg direction type (incoming to entity or outcoming from entity)", + "enum": [ + "IN", + "OUT" + ] + }, + "entityId": { + "type": "string", + "description": "String value representing the entity id in the event body (originator of the message)", + "example": "de9d54a0-2b7a-11ec-a3cc-23386423d98f" + }, + "entityType": { + "type": "string", + "description": "String value representing the entity type", + "enum": [ + "DEVICE" + ] + }, + "msgId": { + "type": "string", + "description": "String value representing the message id in the rule engine", + "example": "de9d54a0-2b7a-11ec-a3cc-23386423d98f" + }, + "msgType": { + "type": "string", + "description": "String value representing the message type", + "example": "POST_TELEMETRY_REQUEST" + }, + "relationType": { + "type": "string", + "description": "String value representing the type of message routing", + "example": "Success" + }, + "dataSearch": { + "type": "string", + "description": "The case insensitive 'contains' filter based on data (key and value) for the message.", + "example": "humidity" + }, + "metadataSearch": { + "type": "string", + "description": "The case insensitive 'contains' filter based on metadata (key and value) for the message.", + "example": "deviceName" + }, + "error": { + "type": "boolean" + } + } + } + ], + "required": [ + "eventType" + ] + }, + "RuleNodeId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "RULE_NODE" + ], + "example": "RULE_NODE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "SaveDeviceWithCredentialsRequest": { + "description": "The JSON object with device and credentials. See method description above for example.", + "properties": { + "device": { + "$ref": "#/components/schemas/Device", + "description": "The JSON with device entity." + }, + "credentials": { + "$ref": "#/components/schemas/DeviceCredentials", + "description": "The JSON with credentials entity." + } + }, + "required": [ + "credentials", + "device" + ] + }, + "SaveOtaPackageInfoRequest": { + "description": "A JSON value representing the OTA Package.", + "properties": { + "id": { + "$ref": "#/components/schemas/OtaPackageId", + "description": "JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the ota package creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the ota package can't be changed.", + "readOnly": true + }, + "deviceProfileId": { + "$ref": "#/components/schemas/DeviceProfileId", + "description": "JSON object with Device Profile Id. Device Profile Id of the ota package can't be changed.", + "readOnly": true + }, + "type": { + "type": "string", + "description": "OTA Package type.", + "enum": [ + "FIRMWARE", + "SOFTWARE" + ], + "example": "FIRMWARE", + "readOnly": true + }, + "title": { + "type": "string", + "description": "OTA Package title.", + "example": "fw", + "readOnly": true + }, + "version": { + "type": "string", + "description": "OTA Package version.", + "example": 1.0, + "readOnly": true + }, + "tag": { + "type": "string", + "description": "OTA Package tag.", + "example": "fw_1.0", + "readOnly": true + }, + "url": { + "type": "string", + "description": "OTA Package url.", + "example": "http://thingsboard.org/fw/1", + "readOnly": true + }, + "hasData": { + "type": "boolean", + "description": "Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.", + "example": true, + "readOnly": true + }, + "fileName": { + "type": "string", + "description": "OTA Package file name.", + "example": "fw_1.0", + "readOnly": true + }, + "contentType": { + "type": "string", + "description": "OTA Package content type.", + "example": "APPLICATION_OCTET_STREAM", + "readOnly": true + }, + "checksumAlgorithm": { + "type": "string", + "description": "OTA Package checksum algorithm.", + "enum": [ + "MD5", + "SHA256", + "SHA384", + "SHA512", + "CRC32", + "MURMUR3_32", + "MURMUR3_128" + ], + "example": "CRC32", + "readOnly": true + }, + "checksum": { + "type": "string", + "description": "OTA Package checksum.", + "example": "0xd87f7e0c", + "readOnly": true + }, + "dataSize": { + "type": "integer", + "format": "int64", + "description": "OTA Package data size.", + "example": 8, + "readOnly": true + }, + "usesUrl": { + "type": "boolean", + "description": "Indicates OTA Package uses url. Should be 'true' if uses url or 'false' if will be used data.", + "example": true, + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "OTA Package description.", + "example": "Description for the OTA Package fw_1.0" + } + } + }, + "SchedulerEvent": { + "description": "A JSON value representing the Scheduler Event.", + "properties": { + "id": { + "$ref": "#/components/schemas/SchedulerEventId", + "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the scheduler event creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "originatorId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Originator Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "scheduler event name", + "example": "Weekly Dashboard Report" + }, + "type": { + "type": "string", + "description": "scheduler event type", + "example": "generateReport" + }, + "enabled": { + "type": "boolean", + "description": "Enable/disable scheduler", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "configuration": { + "$ref": "#/components/schemas/JsonNode" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the scheduler event" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "schedule": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "SchedulerEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "originator": { + "$ref": "#/components/schemas/EntityId" + }, + "eventType": { + "type": "string" + } + } + } + ] + }, + "SchedulerEventId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "SCHEDULER_EVENT" + ], + "example": "SCHEDULER_EVENT" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "SchedulerEventInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/SchedulerEventId", + "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the scheduler event creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "originatorId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Originator Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "scheduler event name", + "example": "Weekly Dashboard Report" + }, + "type": { + "type": "string", + "description": "scheduler event type", + "example": "generateReport" + }, + "enabled": { + "type": "boolean", + "description": "Enable/disable scheduler", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the scheduler event" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "schedule": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "SchedulerEventWithCustomerInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/SchedulerEventId", + "description": "JSON object with the scheduler event Id. Specify this field to update the scheduler event. Referencing non-existing scheduler event Id will cause error. Omit this field to create new scheduler event" + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the scheduler event creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id", + "readOnly": true + }, + "originatorId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Originator Id", + "readOnly": true + }, + "name": { + "type": "string", + "description": "scheduler event name", + "example": "Weekly Dashboard Report" + }, + "type": { + "type": "string", + "description": "scheduler event type", + "example": "generateReport" + }, + "enabled": { + "type": "boolean", + "description": "Enable/disable scheduler", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "customerTitle": { + "type": "string", + "description": "Title of the customer", + "example": "Company A" + }, + "customerIsPublic": { + "type": "boolean", + "description": "Parameter that specifies if customer is public", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the scheduler event" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + }, + "schedule": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "ScriptCalculatedFieldConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/CalculatedFieldConfiguration" + } + ] + }, + "SecuritySettings": { + "description": "A JSON value representing the Security Settings.", + "properties": { + "passwordPolicy": { + "$ref": "#/components/schemas/UserPasswordPolicy", + "description": "The user password policy object." + }, + "maxFailedLoginAttempts": { + "type": "integer", + "format": "int32", + "description": "Maximum number of failed login attempts allowed before user account is locked." + }, + "userLockoutNotificationEmail": { + "type": "string", + "description": "Email to use for notifications about locked users." + }, + "mobileSecretKeyLength": { + "type": "integer", + "format": "int32", + "description": "Mobile secret key length" + }, + "userActivationTokenTtl": { + "type": "integer", + "format": "int32", + "description": "TTL in hours for user activation link", + "maximum": 24, + "minimum": 1 + }, + "passwordResetTokenTtl": { + "type": "integer", + "format": "int32", + "description": "TTL in hours for password reset link", + "maximum": 24, + "minimum": 1 + } + }, + "required": [ + "passwordResetTokenTtl", + "userActivationTokenTtl" + ] + }, + "SelfRegistrationParams": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + }, + "type": { + "type": "string", + "enum": [ + "WEB", + "MOBILE" + ] + }, + "showPrivacyPolicy": { + "type": "boolean" + }, + "showTermsOfUse": { + "type": "boolean" + }, + "title": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "homeDashboard": { + "$ref": "#/components/schemas/HomeDashboardParams" + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "notificationRecipient": { + "$ref": "#/components/schemas/NotificationTargetId" + }, + "captcha": { + "oneOf": [ + { + "$ref": "#/components/schemas/EnterpriseCaptchaParams" + }, + { + "$ref": "#/components/schemas/V2CaptchaParams" + }, + { + "$ref": "#/components/schemas/V3CaptchaParams" + } + ] + }, + "signUpFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignUpField" + } + }, + "defaultDashboard": { + "$ref": "#/components/schemas/DefaultDashboardParams" + }, + "customerTitlePrefix": { + "type": "string" + }, + "customerGroupId": { + "$ref": "#/components/schemas/EntityGroupId" + } + } + }, + "ShareGroupRequest": { + "description": "The Share Group Request JSON", + "properties": { + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "In case 'allUserGroup' is set to true, this property specifies the owner of the user group 'All'. Either Tenant or Customer Id." + }, + "allUserGroup": { + "type": "boolean", + "description": "Indicate that the group should be shared with user group 'All' that belongs to Tenant or Customer (see 'ownerId' property description)." + }, + "userGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "In case 'allUserGroup' is set to false, this property specifies the specific user group that the entity group should be shared with." + }, + "readElseWrite": { + "type": "boolean", + "description": "Used if 'roleIds' property is not present. if the value is 'true', creates role with read-only permissions. If the value is 'false', creates role with write permissions." + }, + "roleIds": { + "type": "array", + "description": "List of group role Ids that should be used to share the entity group with the user group. If not set, the platform will create new role (see 'readElseWrite' property description)", + "items": { + "$ref": "#/components/schemas/RoleId" + } + } + }, + "required": [ + "allUserGroup" + ] + }, + "SharedAttributesSettingSnmpCommunicationConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpCommunicationConfig" + }, + { + "type": "object", + "properties": { + "mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnmpMapping" + } + } + } + } + ] + }, + "ShortCustomerInfo": { + "properties": { + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with the customer Id." + }, + "title": { + "type": "string", + "description": "Title of the customer." + }, + "isPublic": { + "type": "boolean", + "writeOnly": true + }, + "public": { + "type": "boolean" + } + } + }, + "ShortEntityView": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId", + "description": "Entity Id object", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the entity", + "readOnly": true + } + }, + "required": [ + "id", + "name" + ] + }, + "SignUpField": { + "properties": { + "id": { + "type": "string", + "description": "Signup field id", + "enum": [ + "EMAIL", + "PASSWORD", + "REPEAT_PASSWORD", + "FIRST_NAME", + "LAST_NAME", + "PHONE", + "COUNTRY", + "CITY", + "STATE", + "ZIP", + "ADDRESS", + "ADDRESS2" + ] + }, + "label": { + "type": "string", + "description": "Signup field label" + }, + "required": { + "type": "boolean", + "description": "Indicates if field is required" + } + }, + "required": [ + "id", + "label" + ] + }, + "SignUpRequest": { + "description": "A JSON value representing the signup request.", + "properties": { + "fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "List of sign-up form fields" + }, + "recaptchaResponse": { + "type": "string", + "description": "Response from reCAPTCHA validation" + }, + "pkgName": { + "type": "string", + "description": "For mobile apps only. Mobile app package name" + }, + "platform": { + "type": "string", + "description": "For mobile apps only. Mobile app package platform", + "enum": [ + "WEB", + "ANDROID", + "IOS" + ] + }, + "appSecret": { + "type": "string", + "description": "For mobile apps only. Mobile app secret" + } + } + }, + "SignUpSelfRegistrationParams": { + "properties": { + "title": { + "type": "string" + }, + "captcha": { + "oneOf": [ + { + "$ref": "#/components/schemas/EnterpriseCaptchaParams" + }, + { + "$ref": "#/components/schemas/V2CaptchaParams" + }, + { + "$ref": "#/components/schemas/V3CaptchaParams" + } + ] + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SignUpField" + } + }, + "showPrivacyPolicy": { + "type": "boolean" + }, + "showTermsOfUse": { + "type": "boolean" + } + } + }, + "SimpleAlarmConditionSpec": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmConditionSpec" + } + ] + }, + "SimpleCalculatedFieldConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/CalculatedFieldConfiguration" + } + ] + }, + "SingleEntityFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "singleEntity": { + "$ref": "#/components/schemas/EntityId" + } + } + } + ] + }, + "SingleEntityVersionCreateRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionCreateRequest" + }, + { + "type": "object", + "properties": { + "entityId": { + "$ref": "#/components/schemas/EntityId" + }, + "config": { + "$ref": "#/components/schemas/VersionCreateConfig" + } + } + } + ] + }, + "SingleEntityVersionLoadRequest": { + "allOf": [ + { + "$ref": "#/components/schemas/VersionLoadRequest" + }, + { + "type": "object", + "properties": { + "internalEntityId": { + "$ref": "#/components/schemas/EntityId" + }, + "externalEntityId": { + "$ref": "#/components/schemas/EntityId" + }, + "config": { + "$ref": "#/components/schemas/VersionLoadConfig" + } + } + } + ] + }, + "SlackConversation": { + "properties": { + "type": { + "type": "string", + "enum": [ + "DIRECT", + "PUBLIC_CHANNEL", + "PRIVATE_CHANNEL" + ] + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "wholeName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "type" + ] + }, + "SlackDeliveryMethodNotificationTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" + } + ], + "required": [ + "body" + ] + }, + "SlackNotificationDeliveryMethodConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationDeliveryMethodConfig" + }, + { + "type": "object", + "properties": { + "botToken": { + "type": "string" + } + } + } + ], + "required": [ + "botToken" + ] + }, + "SlackNotificationTargetConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationTargetConfig" + }, + { + "type": "object", + "properties": { + "conversationType": { + "type": "string", + "enum": [ + "DIRECT", + "PUBLIC_CHANNEL", + "PRIVATE_CHANNEL" + ] + }, + "conversation": { + "$ref": "#/components/schemas/SlackConversation" + } + } + } + ], + "required": [ + "conversation" + ] + }, + "SmppSmsProviderConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/SmsProviderConfiguration" + }, + { + "type": "object", + "properties": { + "protocolVersion": { + "type": "string", + "description": "SMPP version", + "enum": [ + "3.3, 3.4" + ] + }, + "host": { + "type": "string", + "description": "SMPP host" + }, + "port": { + "type": "integer", + "format": "int32", + "description": "SMPP port" + }, + "systemId": { + "type": "string", + "description": "System ID" + }, + "password": { + "type": "string", + "description": "Password" + }, + "systemType": { + "type": "string", + "description": "System type" + }, + "bindType": { + "type": "string", + "description": "TX - Transmitter, RX - Receiver, TRX - Transciever. By default TX is used", + "enum": [ + "TX", + "RX", + "TRX" + ] + }, + "serviceType": { + "type": "string", + "description": "Service type" + }, + "sourceAddress": { + "type": "string", + "description": "Source address" + }, + "sourceTon": { + "type": "string", + "format": "byte", + "description": "Source TON (Type of Number). Needed is source address is set. 5 by default.\n0 - Unknown\n1 - International\n2 - National\n3 - Network Specific\n4 - Subscriber Number\n5 - Alphanumeric\n6 - Abbreviated" + }, + "sourceNpi": { + "type": "string", + "format": "byte", + "description": "Source NPI (Numbering Plan Identification). Needed is source address is set. 0 by default.\n0 - Unknown\n1 - ISDN/telephone numbering plan (E163/E164)\n3 - Data numbering plan (X.121)\n4 - Telex numbering plan (F.69)\n6 - Land Mobile (E.212) =6\n8 - National numbering plan\n9 - Private numbering plan\n10 - ERMES numbering plan (ETSI DE/PS 3 01-3)\n13 - Internet (IP)\n18 - WAP Client Id (to be defined by WAP Forum)" + }, + "destinationTon": { + "type": "string", + "format": "byte", + "description": "Destination TON (Type of Number). 5 by default.\n0 - Unknown\n1 - International\n2 - National\n3 - Network Specific\n4 - Subscriber Number\n5 - Alphanumeric\n6 - Abbreviated" + }, + "destinationNpi": { + "type": "string", + "format": "byte", + "description": "Destination NPI (Numbering Plan Identification). 0 by default.\n0 - Unknown\n1 - ISDN/telephone numbering plan (E163/E164)\n3 - Data numbering plan (X.121)\n4 - Telex numbering plan (F.69)\n6 - Land Mobile (E.212) =6\n8 - National numbering plan\n9 - Private numbering plan\n10 - ERMES numbering plan (ETSI DE/PS 3 01-3)\n13 - Internet (IP)\n18 - WAP Client Id (to be defined by WAP Forum)" + }, + "addressRange": { + "type": "string", + "description": "Address range" + }, + "codingScheme": { + "type": "string", + "format": "byte", + "description": "0 - SMSC Default Alphabet (ASCII for short and long code and to GSM for toll-free, used as default)\n1 - IA5 (ASCII for short and long code, Latin 9 for toll-free (ISO-8859-9))\n2 - Octet Unspecified (8-bit binary)\n3 - Latin 1 (ISO-8859-1)\n4 - Octet Unspecified (8-bit binary)\n5 - JIS (X 0208-1990)\n6 - Cyrillic (ISO-8859-5)\n7 - Latin/Hebrew (ISO-8859-8)\n8 - UCS2/UTF-16 (ISO/IEC-10646)\n9 - Pictogram Encoding\n10 - Music Codes (ISO-2022-JP)\n13 - Extended Kanji JIS (X 0212-1990)\n14 - Korean Graphic Character Set (KS C 5601/KS X 1001)", + "enum": [ + "0-10", + "13-14" + ] + } + } + } + ], + "required": [ + "host", + "password", + "port", + "protocolVersion", + "systemId" + ] + }, + "SmsDeliveryMethodNotificationTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" + } + ], + "required": [ + "body" + ] + }, + "SmsProviderConfiguration": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "SmsTwoFaAccountConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaAccountConfig" + }, + { + "type": "object", + "properties": { + "phoneNumber": { + "type": "string", + "pattern": "^\\+[1-9]\\d{1,14}$" + } + } + } + ], + "required": [ + "phoneNumber" + ] + }, + "SmsTwoFaProviderConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaProviderConfig" + }, + { + "type": "object", + "properties": { + "verificationCodeLifetime": { + "type": "integer", + "format": "int32", + "minimum": 1 + }, + "smsVerificationMessageTemplate": { + "type": "string", + "pattern": ".*\\$\\{code}.*" + } + } + } + ], + "required": [ + "smsVerificationMessageTemplate" + ] + }, + "SnmpCommunicationConfig": { + "discriminator": { + "propertyName": "spec" + }, + "properties": { + "spec": { + "type": "string", + "enum": [ + "TELEMETRY_QUERYING", + "CLIENT_ATTRIBUTES_QUERYING", + "SHARED_ATTRIBUTES_SETTING", + "TO_DEVICE_RPC_REQUEST", + "TO_SERVER_RPC_REQUEST" + ] + } + } + }, + "SnmpDeviceProfileTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileTransportConfiguration" + }, + { + "type": "object", + "properties": { + "timeoutMs": { + "type": "integer", + "format": "int32" + }, + "retries": { + "type": "integer", + "format": "int32" + }, + "communicationConfigs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnmpCommunicationConfig" + } + } + } + } + ] + }, + "SnmpDeviceTransportConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceTransportConfiguration" + }, + { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "port": { + "type": "integer", + "format": "int32" + }, + "protocolVersion": { + "type": "string", + "enum": [ + "V1", + "V2C", + "V3" + ] + }, + "community": { + "type": "string" + }, + "username": { + "type": "string" + }, + "securityName": { + "type": "string" + }, + "contextName": { + "type": "string" + }, + "authenticationProtocol": { + "type": "string", + "enum": [ + "SHA_1", + "SHA_224", + "SHA_256", + "SHA_384", + "SHA_512", + "MD5" + ] + }, + "authenticationPassphrase": { + "type": "string" + }, + "privacyProtocol": { + "type": "string", + "enum": [ + "DES", + "AES_128", + "AES_192", + "AES_256" + ] + }, + "privacyPassphrase": { + "type": "string" + }, + "engineId": { + "type": "string" + } + } + } + ] + }, + "SnmpMapping": { + "properties": { + "oid": { + "type": "string" + }, + "key": { + "type": "string" + }, + "dataType": { + "type": "string", + "enum": [ + "BOOLEAN", + "LONG", + "DOUBLE", + "STRING", + "JSON" + ] + } + } + }, + "SolutionInstallResponse": { + "properties": { + "dashboardGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "Id of the group that contains main dashboard of the solution" + }, + "dashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "Id of the main dashboard of the solution" + }, + "publicId": { + "$ref": "#/components/schemas/CustomerId", + "description": "Id of the public customer if solution has public entities" + }, + "mainDashboardPublic": { + "type": "boolean", + "description": "Is the main dashboard public" + }, + "details": { + "type": "string", + "description": "Markdown with solution usage instructions" + }, + "success": { + "type": "boolean", + "description": "Indicates that template was installed successfully" + } + } + }, + "SpecificTimeSchedule": { + "allOf": [ + { + "$ref": "#/components/schemas/AlarmSchedule" + }, + { + "type": "object", + "properties": { + "timezone": { + "type": "string" + }, + "daysOfWeek": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "uniqueItems": true + }, + "startsOn": { + "type": "integer", + "format": "int64" + }, + "endsOn": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "StarredDashboardInfo": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "JSON object with Dashboard id.", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title of the dashboard." + }, + "starredAt": { + "type": "integer", + "format": "int64", + "description": "Starred timestamp" + } + } + }, + "StateEntityOwnerFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityFilter" + }, + { + "type": "object", + "properties": { + "singleEntity": { + "$ref": "#/components/schemas/EntityId" + } + } + } + ] + }, + "StatisticsEventFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/EventFilter" + }, + { + "type": "object", + "properties": { + "server": { + "type": "string", + "description": "String value representing the server name, identifier or ip address where the platform is running", + "example": "ip-172-31-24-152" + }, + "minMessagesProcessed": { + "type": "integer", + "format": "int32", + "description": "The minimum number of successfully processed messages", + "example": 25 + }, + "maxMessagesProcessed": { + "type": "integer", + "format": "int32", + "description": "The maximum number of successfully processed messages", + "example": 250 + }, + "minErrorsOccurred": { + "type": "integer", + "format": "int32", + "description": "The minimum number of errors occurred during messages processing", + "example": 30 + }, + "maxErrorsOccurred": { + "type": "integer", + "format": "int32", + "description": "The maximum number of errors occurred during messages processing", + "example": 300 + } + } + } + ], + "required": [ + "eventType" + ] + }, + "StoreInfo": { + "properties": { + "appId": { + "type": "string" + }, + "sha256CertFingerprints": { + "type": "string" + }, + "storeLink": { + "type": "string" + } + } + }, + "StringFilterPredicate": { + "allOf": [ + { + "$ref": "#/components/schemas/KeyFilterPredicate" + }, + { + "type": "object", + "properties": { + "operation": { + "type": "string", + "enum": [ + "EQUAL", + "NOT_EQUAL", + "STARTS_WITH", + "ENDS_WITH", + "CONTAINS", + "NOT_CONTAINS", + "IN", + "NOT_IN" + ] + }, + "value": { + "$ref": "#/components/schemas/FilterPredicateValueString" + }, + "ignoreCase": { + "type": "boolean" + } + } + } + ] + }, + "SubmitStrategy": { + "properties": { + "type": { + "type": "string", + "enum": [ + "BURST", + "BATCH", + "SEQUENTIAL_BY_ORIGINATOR", + "SEQUENTIAL_BY_TENANT", + "SEQUENTIAL" + ] + }, + "batchSize": { + "type": "integer", + "format": "int32" + } + } + }, + "SubscriptionUsage": { + "properties": { + "devices": { + "type": "integer", + "format": "int64" + }, + "assets": { + "type": "integer", + "format": "int64" + }, + "customers": { + "type": "integer", + "format": "int64" + }, + "users": { + "type": "integer", + "format": "int64" + }, + "dashboards": { + "type": "integer", + "format": "int64" + }, + "ruleChains": { + "type": "integer", + "format": "int64" + }, + "integrations": { + "type": "integer", + "format": "int64" + }, + "converters": { + "type": "integer", + "format": "int64" + }, + "schedulerEvents": { + "type": "integer", + "format": "int64" + }, + "transportMessages": { + "type": "integer", + "format": "int64" + }, + "transportDataPoints": { + "type": "integer", + "format": "int64" + }, + "reExecutions": { + "type": "integer", + "format": "int64" + }, + "jsExecutions": { + "type": "integer", + "format": "int64" + }, + "dpStorageDays": { + "type": "integer", + "format": "int64" + }, + "emails": { + "type": "integer", + "format": "int64" + }, + "sms": { + "type": "integer", + "format": "int64" + }, + "alarms": { + "type": "integer", + "format": "int64" + } + } + }, + "SystemAdministratorsFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + } + ] + }, + "SystemInfo": { + "properties": { + "systemData": { + "type": "array", + "description": "System data.", + "items": { + "$ref": "#/components/schemas/SystemInfoData" + } + }, + "monolith": { + "type": "boolean" + } + } + }, + "SystemInfoData": { + "properties": { + "serviceId": { + "type": "string", + "description": "Service Id." + }, + "serviceType": { + "type": "string", + "description": "Service type." + }, + "cpuUsage": { + "type": "integer", + "format": "int64", + "description": "CPU usage, in percent." + }, + "cpuCount": { + "type": "integer", + "format": "int64", + "description": "Total CPU usage." + }, + "memoryUsage": { + "type": "integer", + "format": "int64", + "description": "Memory usage, in percent." + }, + "totalMemory": { + "type": "integer", + "format": "int64", + "description": "Total memory in bytes." + }, + "discUsage": { + "type": "integer", + "format": "int64", + "description": "Disk usage, in percent." + }, + "totalDiscSpace": { + "type": "integer", + "format": "int64", + "description": "Total disc space in bytes." + } + } + }, + "TaskProcessingFailureNotificationRuleTriggerConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/NotificationRuleTriggerConfig" + } + ] + }, + "TbImageDeleteResult": { + "properties": { + "success": { + "type": "boolean" + }, + "whiteLabelingList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WhiteLabeling" + } + }, + "references": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HasIdObject" + } + } + } + } + }, + "TbResource": { + "description": "A JSON value representing the Resource.", + "properties": { + "id": { + "$ref": "#/components/schemas/TbResourceId", + "description": "JSON object with the Resource Id. Specify this field to update the Resource. Referencing non-existing Resource Id will cause error. Omit this field to create new Resource." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the resource creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the resource can't be changed.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Customer Id of the resource can't be changed.", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Resource title.", + "example": "BinaryAppDataContainer id=19 v1.0" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "enum": [ + "LWM2M_MODEL", + "JKS", + "PKCS_12", + "JS_MODULE", + "IMAGE", + "DASHBOARD" + ], + "example": "LWM2M_MODEL", + "readOnly": true + }, + "resourceSubType": { + "type": "string", + "description": "Resource sub type.", + "enum": [ + "IMAGE", + "SCADA_SYMBOL", + "EXTENSION", + "MODULE" + ], + "example": "IOT_SVG", + "readOnly": true + }, + "resourceKey": { + "type": "string", + "description": "Resource key.", + "example": "19_1.0", + "readOnly": true + }, + "publicResourceKey": { + "type": "string" + }, + "etag": { + "type": "string", + "description": "Resource etag.", + "example": "33a64df551425fcc55e4d42a148795d9f25f89d4", + "readOnly": true + }, + "fileName": { + "type": "string", + "description": "Resource file name.", + "example": "19.xml", + "readOnly": true + }, + "descriptor": { + "$ref": "#/components/schemas/JsonNode" + }, + "data": { + "type": "string", + "description": "Resource data.", + "example": "77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCEtLQpGSUxFIElORk9STUFUSU9OCgpPTUEgUGVybWFuZW50IERvY3VtZW50CiAgIEZpbGU6IE9NQS1TVVAtTHdNMk1fQmluYXJ5QXBwRGF0YUNvbnRhaW5lci1WMV8wXzEtMjAxOTAyMjEtQQogICBUeXBlOiB4bWwKClB1YmxpYyBSZWFjaGFibGUgSW5mb3JtYXRpb24KICAgUGF0aDogaHR0cDovL3d3dy5vcGVubW9iaWxlYWxsaWFuY2Uub3JnL3RlY2gvcHJvZmlsZXMKICAgTmFtZTogTHdNMk1fQmluYXJ5QXBwRGF0YUNvbnRhaW5lci12MV8wXzEueG1sCgpOT1JNQVRJVkUgSU5GT1JNQVRJT04KCiAgSW5mb3JtYXRpb24gYWJvdXQgdGhpcyBmaWxlIGNhbiBiZSBmb3VuZCBpbiB0aGUgbGF0ZXN0IHJldmlzaW9uIG9mCgogIE9NQS1UUy1MV00yTV9CaW5hcnlBcHBEYXRhQ29udGFpbmVyLVYxXzBfMQoKICBUaGlzIGlzIGF2YWlsYWJsZSBhdCBodHRwOi8vd3d3Lm9wZW5tb2JpbGVhbGxpYW5jZS5vcmcvCgogIFNlbmQgY29tbWVudHMgdG8gaHR0cHM6Ly9naXRodWIuY29tL09wZW5Nb2JpbGVBbGxpYW5jZS9PTUFfTHdNMk1fZm9yX0RldmVsb3BlcnMvaXNzdWVzCgpDSEFOR0UgSElTVE9SWQoKMTUwNjIwMTggU3RhdHVzIGNoYW5nZWQgdG8gQXBwcm92ZWQgYnkgRE0sIERvYyBSZWYgIyBPTUEtRE0mU0UtMjAxOC0wMDYxLUlOUF9MV00yTV9BUFBEQVRBX1YxXzBfRVJQX2Zvcl9maW5hbF9BcHByb3ZhbAoyMTAyMjAxOSBTdGF0dXMgY2hhbmdlZCB0byBBcHByb3ZlZCBieSBJUFNPLCBEb2MgUmVmICMgT01BLUlQU08tMjAxOS0wMDI1LUlOUF9Md00yTV9PYmplY3RfQXBwX0RhdGFfQ29udGFpbmVyXzFfMF8xX2Zvcl9GaW5hbF9BcHByb3ZhbAoKTEVHQUwgRElTQ0xBSU1FUgoKQ29weXJpZ2h0IDIwMTkgT3BlbiBNb2JpbGUgQWxsaWFuY2UuCgpSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCmFyZSBtZXQ6CgoxLiBSZWRpc3RyaWJ1dGlvbnMgb2Ygc291cmNlIGNvZGUgbXVzdCByZXRhaW4gdGhlIGFib3ZlIGNvcHlyaWdodApub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zIGFuZCB0aGUgZm9sbG93aW5nIGRpc2NsYWltZXIuCjIuIFJlZGlzdHJpYnV0aW9ucyBpbiBiaW5hcnkgZm9ybSBtdXN0IHJlcHJvZHVjZSB0aGUgYWJvdmUgY29weXJpZ2h0Cm5vdGljZSwgdGhpcyBsaXN0IG9mIGNvbmRpdGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lciBpbiB0aGUKZG9jdW1lbnRhdGlvbiBhbmQvb3Igb3RoZXIgbWF0ZXJpYWxzIHByb3ZpZGVkIHdpdGggdGhlIGRpc3RyaWJ1dGlvbi4KMy4gTmVpdGhlciB0aGUgbmFtZSBvZiB0aGUgY29weXJpZ2h0IGhvbGRlciBub3IgdGhlIG5hbWVzIG9mIGl0cwpjb250cmlidXRvcnMgbWF5IGJlIHVzZWQgdG8gZW5kb3JzZSBvciBwcm9tb3RlIHByb2R1Y3RzIGRlcml2ZWQKZnJvbSB0aGlzIHNvZnR3YXJlIHdpdGhvdXQgc3BlY2lmaWMgcHJpb3Igd3JpdHRlbiBwZXJtaXNzaW9uLgoKVEhJUyBTT0ZUV0FSRSBJUyBQUk9WSURFRCBCWSBUSEUgQ09QWVJJR0hUIEhPTERFUlMgQU5EIENPTlRSSUJVVE9SUwoiQVMgSVMiIEFORCBBTlkgRVhQUkVTUyBPUiBJTVBMSUVEIFdBUlJBTlRJRVMsIElOQ0xVRElORywgQlVUIE5PVApMSU1JVEVEIFRPLCBUSEUgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWSBBTkQgRklUTkVTUwpGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQVJFIERJU0NMQUlNRUQuIElOIE5PIEVWRU5UIFNIQUxMIFRIRQpDT1BZUklHSFQgSE9MREVSIE9SIENPTlRSSUJVVE9SUyBCRSBMSUFCTEUgRk9SIEFOWSBESVJFQ1QsIElORElSRUNULApJTkNJREVOVEFMLCBTUEVDSUFMLCBFWEVNUExBUlksIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyAoSU5DTFVESU5HLApCVVQgTk9UIExJTUlURUQgVE8sIFBST0NVUkVNRU5UIE9GIFNVQlNUSVRVVEUgR09PRFMgT1IgU0VSVklDRVM7CkxPU1MgT0YgVVNFLCBEQVRBLCBPUiBQUk9GSVRTOyBPUiBCVVNJTkVTUyBJTlRFUlJVUFRJT04pIEhPV0VWRVIKQ0FVU0VEIEFORCBPTiBBTlkgVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTiBDT05UUkFDVCwgU1RSSUNUCkxJQUJJTElUWSwgT1IgVE9SVCAoSU5DTFVESU5HIE5FR0xJR0VOQ0UgT1IgT1RIRVJXSVNFKSBBUklTSU5HIElOCkFOWSBXQVkgT1VUIE9GIFRIRSBVU0UgT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRQpQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS4KClRoZSBhYm92ZSBsaWNlbnNlIGlzIHVzZWQgYXMgYSBsaWNlbnNlIHVuZGVyIGNvcHlyaWdodCBvbmx5LiBQbGVhc2UKcmVmZXJlbmNlIHRoZSBPTUEgSVBSIFBvbGljeSBmb3IgcGF0ZW50IGxpY2Vuc2luZyB0ZXJtczoKaHR0cHM6Ly93d3cub21hc3BlY3dvcmtzLm9yZy9hYm91dC9pbnRlbGxlY3R1YWwtcHJvcGVydHktcmlnaHRzLwoKLS0+CjxMV00yTSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6bm9OYW1lc3BhY2VTY2hlbWFMb2NhdGlvbj0iaHR0cDovL29wZW5tb2JpbGVhbGxpYW5jZS5vcmcvdGVjaC9wcm9maWxlcy9MV00yTS54c2QiPgoJPE9iamVjdCBPYmplY3RUeXBlPSJNT0RlZmluaXRpb24iPgoJCTxOYW1lPkJpbmFyeUFwcERhdGFDb250YWluZXI8L05hbWU+CgkJPERlc2NyaXB0aW9uMT48IVtDREFUQVtUaGlzIEx3TTJNIE9iamVjdHMgcHJvdmlkZXMgdGhlIGFwcGxpY2F0aW9uIHNlcnZpY2UgZGF0YSByZWxhdGVkIHRvIGEgTHdNMk0gU2VydmVyLCBlZy4gV2F0ZXIgbWV0ZXIgZGF0YS4gClRoZXJlIGFyZSBzZXZlcmFsIG1ldGhvZHMgdG8gY3JlYXRlIGluc3RhbmNlIHRvIGluZGljYXRlIHRoZSBtZXNzYWdlIGRpcmVjdGlvbiBiYXNlZCBvbiB0aGUgbmVnb3RpYXRpb24gYmV0d2VlbiBBcHBsaWNhdGlvbiBhbmQgTHdNMk0uIFRoZSBDbGllbnQgYW5kIFNlcnZlciBzaG91bGQgbmVnb3RpYXRlIHRoZSBpbnN0YW5jZShzKSB1c2VkIHRvIGV4Y2hhbmdlIHRoZSBkYXRhLiBGb3IgZXhhbXBsZToKIC0gVXNpbmcgYSBzaW5nbGUgaW5zdGFuY2UgZm9yIGJvdGggZGlyZWN0aW9ucyBjb21tdW5pY2F0aW9uLCBmcm9tIENsaWVudCB0byBTZXJ2ZXIgYW5kIGZyb20gU2VydmVyIHRvIENsaWVudC4KIC0gVXNpbmcgYW4gaW5zdGFuY2UgZm9yIGNvbW11bmljYXRpb24gZnJvbSBDbGllbnQgdG8gU2VydmVyIGFuZCBhbm90aGVyIG9uZSBmb3IgY29tbXVuaWNhdGlvbiBmcm9tIFNlcnZlciB0byBDbGllbnQKIC0gVXNpbmcgc2V2ZXJhbCBpbnN0YW5jZXMKXV0+PC9EZXNjcmlwdGlvbjE+CgkJPE9iamVjdElEPjE5PC9PYmplY3RJRD4KCQk8T2JqZWN0VVJOPnVybjpvbWE6bHdtMm06b21hOjE5PC9PYmplY3RVUk4+CgkJPExXTTJNVmVyc2lvbj4xLjA8L0xXTTJNVmVyc2lvbj4KCQk8T2JqZWN0VmVyc2lvbj4xLjA8L09iamVjdFZlcnNpb24+CgkJPE11bHRpcGxlSW5zdGFuY2VzPk11bHRpcGxlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQk8TWFuZGF0b3J5Pk9wdGlvbmFsPC9NYW5kYXRvcnk+CgkJPFJlc291cmNlcz4KCQkJPEl0ZW0gSUQ9IjAiPjxOYW1lPkRhdGE8L05hbWU+CgkJCQk8T3BlcmF0aW9ucz5SVzwvT3BlcmF0aW9ucz4KCQkJCTxNdWx0aXBsZUluc3RhbmNlcz5NdWx0aXBsZTwvTXVsdGlwbGVJbnN0YW5jZXM+CgkJCQk8TWFuZGF0b3J5Pk1hbmRhdG9yeTwvTWFuZGF0b3J5PgoJCQkJPFR5cGU+T3BhcXVlPC9UeXBlPgoJCQkJPFJhbmdlRW51bWVyYXRpb24gLz4KCQkJCTxVbml0cyAvPgoJCQkJPERlc2NyaXB0aW9uPjwhW0NEQVRBW0luZGljYXRlcyB0aGUgYXBwbGljYXRpb24gZGF0YSBjb250ZW50Ll1dPjwvRGVzY3JpcHRpb24+CgkJCTwvSXRlbT4KCQkJPEl0ZW0gSUQ9IjEiPjxOYW1lPkRhdGEgUHJpb3JpdHk8L05hbWU+CgkJCQk8T3BlcmF0aW9ucz5SVzwvT3BlcmF0aW9ucz4KCQkJCTxNdWx0aXBsZUluc3RhbmNlcz5TaW5nbGU8L011bHRpcGxlSW5zdGFuY2VzPgoJCQkJPE1hbmRhdG9yeT5PcHRpb25hbDwvTWFuZGF0b3J5PgoJCQkJPFR5cGU+SW50ZWdlcjwvVHlwZT4KCQkJCTxSYW5nZUVudW1lcmF0aW9uPjEgYnl0ZXM8L1JhbmdlRW51bWVyYXRpb24+CgkJCQk8VW5pdHMgLz4KCQkJCTxEZXNjcmlwdGlvbj48IVtDREFUQVtJbmRpY2F0ZXMgdGhlIEFwcGxpY2F0aW9uIGRhdGEgcHJpb3JpdHk6CjA6SW1tZWRpYXRlCjE6QmVzdEVmZm9ydAoyOkxhdGVzdAozLTEwMDogUmVzZXJ2ZWQgZm9yIGZ1dHVyZSB1c2UuCjEwMS0yNTQ6IFByb3ByaWV0YXJ5IG1vZGUuXV0+PC9EZXNjcmlwdGlvbj4KCQkJPC9JdGVtPgoJCQk8SXRlbSBJRD0iMiI+PE5hbWU+RGF0YSBDcmVhdGlvbiBUaW1lPC9OYW1lPgoJCQkJPE9wZXJhdGlvbnM+Ulc8L09wZXJhdGlvbnM+CgkJCQk8TXVsdGlwbGVJbnN0YW5jZXM+U2luZ2xlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQkJCTxNYW5kYXRvcnk+T3B0aW9uYWw8L01hbmRhdG9yeT4KCQkJCTxUeXBlPlRpbWU8L1R5cGU+CgkJCQk8UmFuZ2VFbnVtZXJhdGlvbiAvPgoJCQkJPFVuaXRzIC8+CgkJCQk8RGVzY3JpcHRpb24+PCFbQ0RBVEFbSW5kaWNhdGVzIHRoZSBEYXRhIGluc3RhbmNlIGNyZWF0aW9uIHRpbWVzdGFtcC5dXT48L0Rlc2NyaXB0aW9uPgoJCQk8L0l0ZW0+CgkJCTxJdGVtIElEPSIzIj48TmFtZT5EYXRhIERlc2NyaXB0aW9uPC9OYW1lPgoJCQkJPE9wZXJhdGlvbnM+Ulc8L09wZXJhdGlvbnM+CgkJCQk8TXVsdGlwbGVJbnN0YW5jZXM+U2luZ2xlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQkJCTxNYW5kYXRvcnk+T3B0aW9uYWw8L01hbmRhdG9yeT4KCQkJCTxUeXBlPlN0cmluZzwvVHlwZT4KCQkJCTxSYW5nZUVudW1lcmF0aW9uPjMyIGJ5dGVzPC9SYW5nZUVudW1lcmF0aW9uPgoJCQkJPFVuaXRzIC8+CgkJCQk8RGVzY3JpcHRpb24+PCFbQ0RBVEFbSW5kaWNhdGVzIHRoZSBkYXRhIGRlc2NyaXB0aW9uLgplLmcuICJtZXRlciByZWFkaW5nIi5dXT48L0Rlc2NyaXB0aW9uPgoJCQk8L0l0ZW0+CgkJCTxJdGVtIElEPSI0Ij48TmFtZT5EYXRhIEZvcm1hdDwvTmFtZT4KCQkJCTxPcGVyYXRpb25zPlJXPC9PcGVyYXRpb25zPgoJCQkJPE11bHRpcGxlSW5zdGFuY2VzPlNpbmdsZTwvTXVsdGlwbGVJbnN0YW5jZXM+CgkJCQk8TWFuZGF0b3J5Pk9wdGlvbmFsPC9NYW5kYXRvcnk+CgkJCQk8VHlwZT5TdHJpbmc8L1R5cGU+CgkJCQk8UmFuZ2VFbnVtZXJhdGlvbj4zMiBieXRlczwvUmFuZ2VFbnVtZXJhdGlvbj4KCQkJCTxVbml0cyAvPgoJCQkJPERlc2NyaXB0aW9uPjwhW0NEQVRBW0luZGljYXRlcyB0aGUgZm9ybWF0IG9mIHRoZSBBcHBsaWNhdGlvbiBEYXRhLgplLmcuIFlHLU1ldGVyLVdhdGVyLVJlYWRpbmcKVVRGOC1zdHJpbmcKXV0+PC9EZXNjcmlwdGlvbj4KCQkJPC9JdGVtPgoJCQk8SXRlbSBJRD0iNSI+PE5hbWU+QXBwIElEPC9OYW1lPgoJCQkJPE9wZXJhdGlvbnM+Ulc8L09wZXJhdGlvbnM+CgkJCQk8TXVsdGlwbGVJbnN0YW5jZXM+U2luZ2xlPC9NdWx0aXBsZUluc3RhbmNlcz4KCQkJCTxNYW5kYXRvcnk+T3B0aW9uYWw8L01hbmRhdG9yeT4KCQkJCTxUeXBlPkludGVnZXI8L1R5cGU+CgkJCQk8UmFuZ2VFbnVtZXJhdGlvbj4yIGJ5dGVzPC9SYW5nZUVudW1lcmF0aW9uPgoJCQkJPFVuaXRzIC8+CgkJCQk8RGVzY3JpcHRpb24+PCFbQ0RBVEFbSW5kaWNhdGVzIHRoZSBkZXN0aW5hdGlvbiBBcHBsaWNhdGlvbiBJRC5dXT48L0Rlc2NyaXB0aW9uPgoJCQk8L0l0ZW0+PC9SZXNvdXJjZXM+CgkJPERlc2NyaXB0aW9uMj48IVtDREFUQVtdXT48L0Rlc2NyaXB0aW9uMj4KCTwvT2JqZWN0Pgo8L0xXTTJNPgo=" + }, + "preview": { + "type": "string" + }, + "name": { + "type": "string", + "readOnly": true + }, + "public": { + "type": "boolean" + }, + "link": { + "type": "string", + "readOnly": true + }, + "publicLink": { + "type": "string", + "readOnly": true + } + } + }, + "TbResourceDeleteResult": { + "properties": { + "success": { + "type": "boolean" + }, + "references": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HasIdObject" + } + } + } + } + }, + "TbResourceId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "TB_RESOURCE" + ], + "example": "TB_RESOURCE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "TbResourceInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/TbResourceId", + "description": "JSON object with the Resource Id. Specify this field to update the Resource. Referencing non-existing Resource Id will cause error. Omit this field to create new Resource." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the resource creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id. Tenant Id of the resource can't be changed.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with Customer Id. Customer Id of the resource can't be changed.", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Resource title.", + "example": "BinaryAppDataContainer id=19 v1.0" + }, + "resourceType": { + "type": "string", + "description": "Resource type.", + "enum": [ + "LWM2M_MODEL", + "JKS", + "PKCS_12", + "JS_MODULE", + "IMAGE", + "DASHBOARD" + ], + "example": "LWM2M_MODEL", + "readOnly": true + }, + "resourceSubType": { + "type": "string", + "description": "Resource sub type.", + "enum": [ + "IMAGE", + "SCADA_SYMBOL", + "EXTENSION", + "MODULE" + ], + "example": "IOT_SVG", + "readOnly": true + }, + "resourceKey": { + "type": "string", + "description": "Resource key.", + "example": "19_1.0", + "readOnly": true + }, + "publicResourceKey": { + "type": "string" + }, + "etag": { + "type": "string", + "description": "Resource etag.", + "example": "33a64df551425fcc55e4d42a148795d9f25f89d4", + "readOnly": true + }, + "fileName": { + "type": "string", + "description": "Resource file name.", + "example": "19.xml", + "readOnly": true + }, + "descriptor": { + "$ref": "#/components/schemas/JsonNode" + }, + "name": { + "type": "string", + "readOnly": true + }, + "public": { + "type": "boolean" + }, + "link": { + "type": "string", + "readOnly": true + }, + "publicLink": { + "type": "string", + "readOnly": true + } + } + }, + "TelemetryEntityView": { + "properties": { + "timeseries": { + "type": "array", + "description": "List of time-series data keys to expose", + "example": [ + "temperature", + "humidity" + ], + "items": { + "type": "string" + } + }, + "attributes": { + "$ref": "#/components/schemas/AttributesEntityView", + "description": "JSON object with attributes to expose" + } + }, + "required": [ + "attributes", + "timeseries" + ] + }, + "TelemetryMappingConfiguration": { + "properties": { + "keyName": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "observe": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "attribute": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "telemetry": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "attributeLwm2m": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ObjectAttributes" + } + } + } + }, + "TelemetryQueryingSnmpCommunicationConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpCommunicationConfig" + }, + { + "type": "object", + "properties": { + "mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnmpMapping" + } + }, + "queryingFrequencyMs": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "Tenant": { + "description": "A JSON value representing the tenant.", + "properties": { + "id": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with the tenant Id. Specify this field to update the tenant. Referencing non-existing tenant Id will cause error. Omit this field to create new tenant." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the tenant creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "country": { + "type": "string", + "description": "Country", + "example": "US" + }, + "state": { + "type": "string", + "description": "State", + "example": "NY" + }, + "city": { + "type": "string", + "description": "City", + "example": "New York" + }, + "address": { + "type": "string", + "description": "Address Line 1", + "example": 42 + }, + "address2": { + "type": "string", + "description": "Address Line 2" + }, + "zip": { + "type": "string", + "description": "Zip code", + "example": 10004 + }, + "phone": { + "type": "string", + "description": "Phone number", + "example": "+1(415)777-7777" + }, + "email": { + "type": "string", + "description": "Email", + "example": "example@company.com" + }, + "title": { + "type": "string", + "description": "Title of the tenant", + "example": "Company A" + }, + "region": { + "type": "string", + "description": "Geo region of the tenant", + "example": "North America" + }, + "tenantProfileId": { + "$ref": "#/components/schemas/TenantProfileId", + "description": "JSON object with Tenant Profile Id" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "lastInactiveTs": { + "type": "integer", + "format": "int64" + }, + "currentPeriodStartTs": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the tenant. Read-only, duplicated from title for backward compatibility", + "example": "Company A", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + } + }, + "required": [ + "title" + ] + }, + "TenantAdministratorsFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + }, + { + "type": "object", + "properties": { + "tenantsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + }, + "tenantProfilesIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + }, + "uniqueItems": true + } + } + } + ] + }, + "TenantId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "TENANT" + ], + "example": "TENANT" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "TenantInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with the tenant Id. Specify this field to update the tenant. Referencing non-existing tenant Id will cause error. Omit this field to create new tenant." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the tenant creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "country": { + "type": "string", + "description": "Country", + "example": "US" + }, + "state": { + "type": "string", + "description": "State", + "example": "NY" + }, + "city": { + "type": "string", + "description": "City", + "example": "New York" + }, + "address": { + "type": "string", + "description": "Address Line 1", + "example": 42 + }, + "address2": { + "type": "string", + "description": "Address Line 2" + }, + "zip": { + "type": "string", + "description": "Zip code", + "example": 10004 + }, + "phone": { + "type": "string", + "description": "Phone number", + "example": "+1(415)777-7777" + }, + "email": { + "type": "string", + "description": "Email", + "example": "example@company.com" + }, + "title": { + "type": "string", + "description": "Title of the tenant", + "example": "Company A" + }, + "region": { + "type": "string", + "description": "Geo region of the tenant", + "example": "North America" + }, + "tenantProfileId": { + "$ref": "#/components/schemas/TenantProfileId", + "description": "JSON object with Tenant Profile Id" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "lastInactiveTs": { + "type": "integer", + "format": "int64" + }, + "currentPeriodStartTs": { + "type": "integer", + "format": "int64" + }, + "tenantProfileName": { + "type": "string", + "description": "Tenant Profile name", + "example": "Default" + }, + "name": { + "type": "string", + "description": "Name of the tenant. Read-only, duplicated from title for backward compatibility", + "example": "Company A", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the device" + } + }, + "required": [ + "title" + ] + }, + "TenantProfile": { + "description": "A JSON value representing the tenant profile.", + "properties": { + "id": { + "$ref": "#/components/schemas/TenantProfileId", + "description": "JSON object with the tenant profile Id. Specify this field to update the tenant profile. Referencing non-existing tenant profile Id will cause error. Omit this field to create new tenant profile." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the tenant profile creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the tenant profile", + "example": "High Priority Tenants" + }, + "description": { + "type": "string", + "description": "Description of the tenant profile", + "example": "Any text" + }, + "isolatedTbRuleEngine": { + "type": "boolean", + "description": "If enabled, will push all messages related to this tenant and processed by the rule engine into separate queue. Useful for complex microservices deployments, to isolate processing of the data for specific tenants", + "example": false + }, + "profileData": { + "$ref": "#/components/schemas/TenantProfileData" + }, + "default": { + "type": "boolean", + "description": "Default Tenant profile to be used.", + "example": false + } + } + }, + "TenantProfileConfiguration": { + "discriminator": { + "propertyName": "type", + "mapping": { + "DEFAULT": "#/components/schemas/DefaultTenantProfileConfiguration" + } + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "TenantProfileData": { + "properties": { + "configuration": { + "description": "Complex JSON object that contains profile settings: max devices, max assets, rate limits, etc.", + "oneOf": [ + { + "$ref": "#/components/schemas/DefaultTenantProfileConfiguration" + } + ] + }, + "queueConfiguration": { + "type": "array", + "description": "JSON array of queue configuration per tenant profile", + "items": { + "$ref": "#/components/schemas/TenantProfileQueueConfiguration" + } + } + } + }, + "TenantProfileId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "TENANT_PROFILE" + ], + "example": "TENANT_PROFILE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "TenantProfileQueueConfiguration": { + "properties": { + "name": { + "type": "string" + }, + "topic": { + "type": "string" + }, + "pollInterval": { + "type": "integer", + "format": "int32" + }, + "partitions": { + "type": "integer", + "format": "int32" + }, + "consumerPerPartition": { + "type": "boolean" + }, + "packProcessingTimeout": { + "type": "integer", + "format": "int64" + }, + "submitStrategy": { + "$ref": "#/components/schemas/SubmitStrategy" + }, + "processingStrategy": { + "$ref": "#/components/schemas/ProcessingStrategy" + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "TenantSolutionTemplateDetails": { + "properties": { + "id": { + "type": "string", + "description": "ID of the solution template", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "title": { + "type": "string", + "description": "Template Title", + "example": "Smart office" + }, + "level": { + "type": "string", + "description": "Level of the subscription that is required to unlock the template", + "enum": [ + "MAKER", + "PROTOTYPE", + "STARTUP" + ], + "example": "PROTOTYPE" + }, + "installTimeoutMs": { + "type": "integer", + "format": "int64", + "description": "Timeout for the installation UI to wait while template is installing" + }, + "tenantTelemetryKeys": { + "type": "array", + "description": "What keys to delete during template uninstall", + "items": { + "type": "string" + } + }, + "tenantAttributeKeys": { + "type": "array", + "description": "What attributes to delete during template uninstall", + "items": { + "type": "string" + } + }, + "imageUrls": { + "type": "array", + "items": { + "type": "string" + } + }, + "highlights": { + "type": "string" + }, + "description": { + "type": "string" + }, + "installed": { + "type": "boolean" + } + } + }, + "TenantSolutionTemplateInfo": { + "properties": { + "id": { + "type": "string", + "description": "ID of the solution template", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "title": { + "type": "string", + "description": "Template Title", + "example": "Smart office" + }, + "level": { + "type": "string", + "description": "Level of the subscription that is required to unlock the template", + "enum": [ + "MAKER", + "PROTOTYPE", + "STARTUP" + ], + "example": "PROTOTYPE" + }, + "installTimeoutMs": { + "type": "integer", + "format": "int64", + "description": "Timeout for the installation UI to wait while template is installing" + }, + "tenantTelemetryKeys": { + "type": "array", + "description": "What keys to delete during template uninstall", + "items": { + "type": "string" + } + }, + "tenantAttributeKeys": { + "type": "array", + "description": "What attributes to delete during template uninstall", + "items": { + "type": "string" + } + }, + "previewImageUrl": { + "type": "string", + "description": "URL of the preview image" + }, + "videoPreviewImageUrl": { + "type": "string", + "description": "Video preview image URL" + }, + "previewMp4Url": { + "type": "string", + "description": "Video MP4 URL" + }, + "previewWebmUrl": { + "type": "string", + "description": "Video WEBM URL" + }, + "installed": { + "type": "boolean", + "description": "Indicates that template is already installed for the current tenant" + } + } + }, + "TenantSolutionTemplateInstructions": { + "properties": { + "dashboardGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "Id of the group that contains main dashboard of the solution" + }, + "dashboardId": { + "$ref": "#/components/schemas/DashboardId", + "description": "Id of the main dashboard of the solution" + }, + "publicId": { + "$ref": "#/components/schemas/CustomerId", + "description": "Id of the public customer if solution has public entities" + }, + "mainDashboardPublic": { + "type": "boolean", + "description": "Is the main dashboard public" + }, + "details": { + "type": "string", + "description": "Markdown with solution usage instructions" + } + } + }, + "TestSmsRequest": { + "description": "A JSON value representing the Test SMS request.", + "properties": { + "providerConfiguration": { + "description": "The SMS provider configuration", + "oneOf": [ + { + "$ref": "#/components/schemas/AwsSnsSmsProviderConfiguration" + }, + { + "$ref": "#/components/schemas/SmppSmsProviderConfiguration" + }, + { + "$ref": "#/components/schemas/TwilioSmsProviderConfiguration" + } + ] + }, + "numberTo": { + "type": "string", + "description": "The phone number or other identifier to specify as a recipient of the SMS." + }, + "message": { + "type": "string", + "description": "The test message" + } + } + }, + "ThingsboardCredentialsExpiredResponse": { + "properties": { + "status": { + "type": "integer", + "format": "int32", + "description": "HTTP Response Status Code", + "example": 401, + "readOnly": true + }, + "message": { + "type": "string", + "description": "Error message", + "example": "Authentication failed", + "readOnly": true + }, + "errorCode": { + "type": "integer", + "format": "int32", + "description": "Platform error code:\n* `2` - General error (HTTP: 500 - Internal Server Error)\n\n* `10` - Authentication failed (HTTP: 401 - Unauthorized)\n\n* `11` - JWT token expired (HTTP: 401 - Unauthorized)\n\n* `15` - Credentials expired (HTTP: 401 - Unauthorized)\n\n* `20` - Permission denied (HTTP: 403 - Forbidden)\n\n* `30` - Invalid arguments (HTTP: 400 - Bad Request)\n\n* `31` - Bad request params (HTTP: 400 - Bad Request)\n\n* `32` - Item not found (HTTP: 404 - Not Found)\n\n* `33` - Too many requests (HTTP: 429 - Too Many Requests)\n\n* `34` - Too many updates (Too many updates over Websocket session)\n\n* `40` - Subscription violation (HTTP: 403 - Forbidden)", + "example": 10, + "readOnly": true + }, + "timestamp": { + "type": "integer", + "format": "int64", + "description": "Timestamp", + "readOnly": true + }, + "subscriptionErrorCode": { + "type": "integer", + "format": "int32", + "description": "Subscription error code:\n* `1` - Entities limit reached (HTTP: 403 - Forbidden)\n\n* `2` - Feature disabled (HTTP: 403 - Forbidden)\n\n* `3` - Subscription is not active (HTTP: 403 - Forbidden)\n\n* `4` - Billing error (HTTP: 400 - Bad Request)\n\n* `5` - Permission denied (HTTP: 403 - Forbidden)\n\n* `6` - Unable to change plan due to entities limits overflow (HTTP: 403 - Forbidden)\n\n* `7` - Solution template level doesn't meet subscription plan (HTTP: 403 - Forbidden)", + "example": 1, + "readOnly": true + }, + "subscriptionEntry": { + "type": "integer", + "format": "int32", + "description": "Subscription entry:\n* `1` - Devices count\n\n* `2` - Assets count\n\n* `3` - Customers count\n\n* `4` - Users count\n\n* `5` - Dashboards count\n\n* `6` - Rule chains count\n\n* `7` - Integrations count\n\n* `8` - Converters count\n\n* `9` - Scheduler events count\n\n* `30` - White-labeling", + "example": 1, + "readOnly": true + }, + "subscriptionValue": { + "$ref": "#/components/schemas/JsonNode" + }, + "resetToken": { + "type": "string", + "description": "Password reset token", + "readOnly": true + } + } + }, + "ThingsboardErrorResponse": { + "properties": { + "message": { + "type": "string", + "description": "Error message", + "example": "Authentication failed", + "readOnly": true + }, + "errorCode": { + "type": "integer", + "format": "int32", + "description": "Platform error code:\n* `2` - General error (HTTP: 500 - Internal Server Error)\n\n* `10` - Authentication failed (HTTP: 401 - Unauthorized)\n\n* `11` - JWT token expired (HTTP: 401 - Unauthorized)\n\n* `15` - Credentials expired (HTTP: 401 - Unauthorized)\n\n* `20` - Permission denied (HTTP: 403 - Forbidden)\n\n* `30` - Invalid arguments (HTTP: 400 - Bad Request)\n\n* `31` - Bad request params (HTTP: 400 - Bad Request)\n\n* `32` - Item not found (HTTP: 404 - Not Found)\n\n* `33` - Too many requests (HTTP: 429 - Too Many Requests)\n\n* `34` - Too many updates (Too many updates over Websocket session)\n\n* `40` - Subscription violation (HTTP: 403 - Forbidden)", + "example": 10, + "readOnly": true + }, + "status": { + "type": "integer", + "format": "int32", + "description": "HTTP Response Status Code", + "example": 401, + "readOnly": true + }, + "subscriptionErrorCode": { + "type": "integer", + "format": "int32", + "description": "Subscription error code:\n* `1` - Entities limit reached (HTTP: 403 - Forbidden)\n\n* `2` - Feature disabled (HTTP: 403 - Forbidden)\n\n* `3` - Subscription is not active (HTTP: 403 - Forbidden)\n\n* `4` - Billing error (HTTP: 400 - Bad Request)\n\n* `5` - Permission denied (HTTP: 403 - Forbidden)\n\n* `6` - Unable to change plan due to entities limits overflow (HTTP: 403 - Forbidden)\n\n* `7` - Solution template level doesn't meet subscription plan (HTTP: 403 - Forbidden)", + "example": 1, + "readOnly": true + }, + "subscriptionEntry": { + "type": "integer", + "format": "int32", + "description": "Subscription entry:\n* `1` - Devices count\n\n* `2` - Assets count\n\n* `3` - Customers count\n\n* `4` - Users count\n\n* `5` - Dashboards count\n\n* `6` - Rule chains count\n\n* `7` - Integrations count\n\n* `8` - Converters count\n\n* `9` - Scheduler events count\n\n* `30` - White-labeling", + "example": 1, + "readOnly": true + }, + "subscriptionValue": { + "$ref": "#/components/schemas/JsonNode" + }, + "timestamp": { + "type": "integer", + "format": "int64", + "description": "Timestamp", + "readOnly": true + } + } + }, + "ToCoreEdqsRequest": { + "properties": { + "syncRequest": { + "$ref": "#/components/schemas/EdqsSyncRequest" + }, + "apiEnabled": { + "type": "boolean" + } + } + }, + "ToDeviceRpcRequestSnmpCommunicationConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpCommunicationConfig" + }, + { + "type": "object", + "properties": { + "mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnmpMapping" + } + } + } + } + ] + }, + "ToServerRpcRequestSnmpCommunicationConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/SnmpCommunicationConfig" + }, + { + "type": "object", + "properties": { + "mappings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SnmpMapping" + } + } + } + } + ] + }, + "TotpTwoFaAccountConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaAccountConfig" + }, + { + "type": "object", + "properties": { + "authUrl": { + "type": "string", + "pattern": "otpauth://totp/(\\S+?):(\\S+?)\\?issuer=(\\S+?)&secret=(\\w+?)" + } + } + } + ], + "required": [ + "authUrl" + ] + }, + "TotpTwoFaProviderConfig": { + "allOf": [ + { + "$ref": "#/components/schemas/TwoFaProviderConfig" + }, + { + "type": "object", + "properties": { + "issuerName": { + "type": "string" + } + } + } + ], + "required": [ + "issuerName" + ] + }, + "TranslationInfo": { + "properties": { + "localeCode": { + "type": "string", + "description": "Locale code formed by combining the ISO 639-1 language code and the ISO 3166-1 region code. For example, \"en_US\"" + }, + "language": { + "type": "string", + "description": "Locale code language display name. For example, \"Polish (Polski)\"" + }, + "country": { + "type": "string", + "description": "Locale code country display name. For example, \"Poland\"" + }, + "progress": { + "type": "integer", + "format": "int32", + "description": "Number representing translation percentage progress. For example, 40 that means 40% of all keys are translated." + }, + "customized": { + "type": "boolean", + "description": "Boolean representing if current language has customization." + } + } + }, + "TransportPayloadTypeConfiguration": { + "discriminator": { + "propertyName": "transportPayloadType" + }, + "properties": { + "transportPayloadType": { + "type": "string" + } + }, + "required": [ + "transportPayloadType" + ] + }, + "TsValue": { + "properties": { + "ts": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "string" + }, + "count": { + "type": "integer", + "format": "int64" + } + } + }, + "TwilioSmsProviderConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/SmsProviderConfiguration" + }, + { + "type": "object", + "properties": { + "accountSid": { + "type": "string", + "description": "Twilio account Sid." + }, + "accountToken": { + "type": "string", + "description": "Twilio account Token." + }, + "numberFrom": { + "type": "string", + "description": "The number/id of a sender." + } + } + } + ] + }, + "TwoFaAccountConfig": { + "discriminator": { + "propertyName": "providerType" + }, + "properties": { + "useByDefault": { + "type": "boolean" + }, + "providerType": { + "type": "string" + } + }, + "required": [ + "providerType" + ] + }, + "TwoFaAccountConfigUpdateRequest": { + "properties": { + "useByDefault": { + "type": "boolean" + } + } + }, + "TwoFaProviderConfig": { + "discriminator": { + "propertyName": "providerType" + }, + "properties": { + "providerType": { + "type": "string" + } + }, + "required": [ + "providerType" + ] + }, + "TwoFaProviderInfo": { + "properties": { + "type": { + "type": "string", + "enum": [ + "TOTP", + "SMS", + "EMAIL", + "BACKUP_CODE" + ] + }, + "isDefault": { + "type": "boolean", + "writeOnly": true + }, + "contact": { + "type": "string" + }, + "minVerificationCodeSendPeriod": { + "type": "integer", + "format": "int32" + }, + "default": { + "type": "boolean" + } + } + }, + "UpdateMessage": { + "properties": { + "updateAvailable": { + "type": "boolean", + "description": "'True' if new platform update is available." + }, + "currentVersion": { + "type": "string", + "description": "Current ThingsBoard version." + }, + "latestVersion": { + "type": "string", + "description": "Latest ThingsBoard version." + }, + "upgradeInstructionsUrl": { + "type": "string", + "description": "Upgrade instructions URL." + }, + "currentVersionReleaseNotesUrl": { + "type": "string", + "description": "Current ThingsBoard version release notes URL." + }, + "latestVersionReleaseNotesUrl": { + "type": "string", + "description": "Latest ThingsBoard version release notes URL." + } + } + }, + "UsageInfo": { + "properties": { + "devices": { + "type": "integer", + "format": "int64" + }, + "maxDevices": { + "type": "integer", + "format": "int64" + }, + "assets": { + "type": "integer", + "format": "int64" + }, + "maxAssets": { + "type": "integer", + "format": "int64" + }, + "customers": { + "type": "integer", + "format": "int64" + }, + "maxCustomers": { + "type": "integer", + "format": "int64" + }, + "users": { + "type": "integer", + "format": "int64" + }, + "maxUsers": { + "type": "integer", + "format": "int64" + }, + "dashboards": { + "type": "integer", + "format": "int64" + }, + "maxDashboards": { + "type": "integer", + "format": "int64" + }, + "edges": { + "type": "integer", + "format": "int64" + }, + "maxEdges": { + "type": "integer", + "format": "int64" + }, + "transportMessages": { + "type": "integer", + "format": "int64" + }, + "maxTransportMessages": { + "type": "integer", + "format": "int64" + }, + "jsExecutions": { + "type": "integer", + "format": "int64" + }, + "tbelExecutions": { + "type": "integer", + "format": "int64" + }, + "maxJsExecutions": { + "type": "integer", + "format": "int64" + }, + "maxTbelExecutions": { + "type": "integer", + "format": "int64" + }, + "emails": { + "type": "integer", + "format": "int64" + }, + "maxEmails": { + "type": "integer", + "format": "int64" + }, + "sms": { + "type": "integer", + "format": "int64" + }, + "maxSms": { + "type": "integer", + "format": "int64" + }, + "smsEnabled": { + "type": "boolean" + }, + "alarms": { + "type": "integer", + "format": "int64" + }, + "maxAlarms": { + "type": "integer", + "format": "int64" + } + } + }, + "User": { + "description": "A JSON value representing the User.", + "properties": { + "id": { + "$ref": "#/components/schemas/UserId", + "description": "JSON object with the User Id. Specify this field to update the device. Referencing non-existing User Id will cause error. Omit this field to create new customer." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the user creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with the Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with the Customer Id.", + "readOnly": true + }, + "email": { + "type": "string", + "description": "Email of the user", + "example": "user@example.com" + }, + "authority": { + "type": "string", + "description": "Authority", + "enum": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER", + "BILLING_ADMIN", + "BILLING_SERVICE", + "REFRESH_TOKEN", + "PRE_VERIFICATION_TOKEN" + ], + "example": "SYS_ADMIN, TENANT_ADMIN or CUSTOMER_USER" + }, + "firstName": { + "type": "string", + "description": "First name of the user", + "example": "John" + }, + "lastName": { + "type": "string", + "description": "Last name of the user", + "example": "Doe" + }, + "phone": { + "type": "string", + "description": "Phone number of the user", + "example": 38012345123 + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Duplicates the email of the user, readonly", + "example": "user@example.com", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the user" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "authority", + "email" + ] + }, + "UserActivationLink": { + "properties": { + "value": { + "type": "string" + }, + "ttlMs": { + "type": "integer", + "format": "int64" + } + } + }, + "UserDashboardsInfo": { + "properties": { + "last": { + "type": "array", + "description": "List of last visited dashboards.", + "items": { + "$ref": "#/components/schemas/LastVisitedDashboardInfo" + }, + "readOnly": true + }, + "starred": { + "type": "array", + "description": "List of starred dashboards.", + "items": { + "$ref": "#/components/schemas/StarredDashboardInfo" + }, + "readOnly": true + } + } + }, + "UserEmailInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/UserId", + "description": "User id" + }, + "email": { + "type": "string", + "description": "User email", + "example": "john@gmail.com" + }, + "firstName": { + "type": "string", + "description": "User first name", + "example": "John" + }, + "lastName": { + "type": "string", + "description": "User last name", + "example": "Brown" + } + } + }, + "UserGroupListFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + }, + { + "type": "object", + "properties": { + "groupsIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ], + "required": [ + "groupsIds" + ] + }, + "UserId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "USER" + ], + "example": "USER" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "UserInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/UserId", + "description": "JSON object with the User Id. Specify this field to update the device. Referencing non-existing User Id will cause error. Omit this field to create new customer." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the user creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with the Tenant Id.", + "readOnly": true + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId", + "description": "JSON object with the Customer Id.", + "readOnly": true + }, + "email": { + "type": "string", + "description": "Email of the user", + "example": "user@example.com" + }, + "authority": { + "type": "string", + "description": "Authority", + "enum": [ + "SYS_ADMIN", + "TENANT_ADMIN", + "CUSTOMER_USER", + "BILLING_ADMIN", + "BILLING_SERVICE", + "REFRESH_TOKEN", + "PRE_VERIFICATION_TOKEN" + ], + "example": "SYS_ADMIN, TENANT_ADMIN or CUSTOMER_USER" + }, + "firstName": { + "type": "string", + "description": "First name of the user", + "example": "John" + }, + "lastName": { + "type": "string", + "description": "Last name of the user", + "example": "Doe" + }, + "phone": { + "type": "string", + "description": "Phone number of the user", + "example": 38012345123 + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId" + }, + "version": { + "type": "integer", + "format": "int64" + }, + "ownerName": { + "type": "string", + "description": "Owner name", + "readOnly": true + }, + "groups": { + "type": "array", + "description": "Groups", + "items": { + "$ref": "#/components/schemas/EntityInfo" + }, + "readOnly": true + }, + "name": { + "type": "string", + "description": "Duplicates the email of the user, readonly", + "example": "user@example.com", + "readOnly": true + }, + "additionalInfo": { + "$ref": "#/components/schemas/JsonNode", + "description": "Additional parameters of the user" + }, + "ownerId": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with Customer or Tenant Id", + "readOnly": true + } + }, + "required": [ + "authority", + "email" + ] + }, + "UserListFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + }, + { + "type": "object", + "properties": { + "usersIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ], + "required": [ + "usersIds" + ] + }, + "UserMobileInfo": { + "properties": { + "user": { + "$ref": "#/components/schemas/User" + }, + "storeInfo": { + "$ref": "#/components/schemas/StoreInfo" + }, + "versionInfo": { + "$ref": "#/components/schemas/MobileAppVersionInfo" + }, + "homeDashboardInfo": { + "$ref": "#/components/schemas/HomeDashboardInfo" + }, + "pages": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "UserNotificationSettings": { + "properties": { + "prefs": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/NotificationPref" + } + } + }, + "required": [ + "prefs" + ] + }, + "UserPasswordPolicy": { + "properties": { + "minimumLength": { + "type": "integer", + "format": "int32", + "description": "Minimum number of symbols in the password." + }, + "maximumLength": { + "type": "integer", + "format": "int32", + "description": "Maximum number of symbols in the password." + }, + "minimumUppercaseLetters": { + "type": "integer", + "format": "int32", + "description": "Minimum number of uppercase letters in the password." + }, + "minimumLowercaseLetters": { + "type": "integer", + "format": "int32", + "description": "Minimum number of lowercase letters in the password." + }, + "minimumDigits": { + "type": "integer", + "format": "int32", + "description": "Minimum number of digits in the password." + }, + "minimumSpecialCharacters": { + "type": "integer", + "format": "int32", + "description": "Minimum number of special in the password." + }, + "allowWhitespaces": { + "type": "boolean", + "description": "Allow whitespaces" + }, + "forceUserToResetPasswordIfNotValid": { + "type": "boolean", + "description": "Force user to update password if existing one does not pass validation" + }, + "passwordExpirationPeriodDays": { + "type": "integer", + "format": "int32", + "description": "Password expiration period (days). Force expiration of the password." + }, + "passwordReuseFrequencyDays": { + "type": "integer", + "format": "int32", + "description": "Password reuse frequency (days). Disallow to use the same password for the defined number of days" + } + } + }, + "UserRoleFilter": { + "allOf": [ + { + "$ref": "#/components/schemas/UsersFilter" + }, + { + "type": "object", + "properties": { + "rolesIds": { + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + } + } + ], + "required": [ + "rolesIds" + ] + }, + "UsersFilter": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "type": { + "type": "string" + } + }, + "required": [ + "type" + ] + }, + "V2CaptchaParams": { + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaParams" + }, + { + "type": "object", + "properties": { + "siteKey": { + "type": "string", + "description": "Captcha site key for 'I'm not a robot' validation" + }, + "logActionName": { + "type": "string", + "description": "Optional action name used for logging (for captcha version 'v3' and 'enterprise')" + }, + "secretKey": { + "type": "string", + "description": "Secret key to validate the Captcha. Should match the Captcha Site Key." + } + } + } + ] + }, + "V3CaptchaParams": { + "allOf": [ + { + "$ref": "#/components/schemas/CaptchaParams" + }, + { + "type": "object", + "properties": { + "siteKey": { + "type": "string", + "description": "Captcha site key for 'I'm not a robot' validation" + }, + "logActionName": { + "type": "string", + "description": "Optional action name used for logging (for captcha version 'v3' and 'enterprise')" + }, + "secretKey": { + "type": "string", + "description": "Secret key to validate the Captcha. Should match the Captcha Site Key." + } + } + } + ] + }, + "Vendor": { + "properties": { + "name": { + "type": "string" + }, + "logo": { + "type": "string" + } + } + }, + "Version": {}, + "VersionCreateConfig": { + "properties": { + "saveRelations": { + "type": "boolean" + }, + "saveAttributes": { + "type": "boolean" + }, + "saveCredentials": { + "type": "boolean" + }, + "saveCalculatedFields": { + "type": "boolean" + }, + "savePermissions": { + "type": "boolean" + }, + "saveGroupEntities": { + "type": "boolean" + } + } + }, + "VersionCreateRequest": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "versionName": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "SINGLE_ENTITY", + "COMPLEX" + ] + } + } + }, + "VersionCreationResult": { + "properties": { + "version": { + "$ref": "#/components/schemas/EntityVersion" + }, + "added": { + "type": "integer", + "format": "int32" + }, + "modified": { + "type": "integer", + "format": "int32" + }, + "removed": { + "type": "integer", + "format": "int32" + }, + "error": { + "type": "string" + }, + "done": { + "type": "boolean" + } + } + }, + "VersionLoadConfig": { + "properties": { + "loadRelations": { + "type": "boolean" + }, + "loadAttributes": { + "type": "boolean" + }, + "loadCredentials": { + "type": "boolean" + }, + "loadCalculatedFields": { + "type": "boolean" + }, + "loadPermissions": { + "type": "boolean" + }, + "loadGroupEntities": { + "type": "boolean" + }, + "autoGenerateIntegrationKey": { + "type": "boolean" + } + } + }, + "VersionLoadRequest": { + "discriminator": { + "propertyName": "type" + }, + "properties": { + "versionId": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "SINGLE_ENTITY", + "ENTITY_TYPE" + ] + } + } + }, + "VersionLoadResult": { + "properties": { + "result": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EntityTypeLoadResult" + } + }, + "error": { + "$ref": "#/components/schemas/EntityLoadError" + }, + "done": { + "type": "boolean" + } + } + }, + "VersionedEntityInfo": { + "properties": { + "externalId": { + "$ref": "#/components/schemas/EntityId" + }, + "path": { + "type": "string" + } + } + }, + "WebDeliveryMethodNotificationTemplate": { + "allOf": [ + { + "$ref": "#/components/schemas/DeliveryMethodNotificationTemplate" + }, + { + "type": "object", + "properties": { + "subject": { + "type": "string" + }, + "additionalConfig": {} + } + } + ], + "required": [ + "body", + "subject" + ] + }, + "WebSelfRegistrationParams": { + "allOf": [ + { + "$ref": "#/components/schemas/SelfRegistrationParams" + }, + { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates if self-registration is allowed via sign-up form" + }, + "title": { + "type": "string", + "description": "The text message to appear on login form" + }, + "captcha": { + "$ref": "#/components/schemas/CaptchaParams", + "description": "Captcha site key for 'I'm not a robot' validation" + }, + "signUpFields": { + "type": "array", + "description": "List of sign-up form fields", + "items": { + "$ref": "#/components/schemas/SignUpField" + } + }, + "showPrivacyPolicy": { + "type": "boolean", + "description": "Show or hide 'Privacy Policy'" + }, + "showTermsOfUse": { + "type": "boolean", + "description": "Show or hide 'Terms of Use'" + }, + "notificationRecipient": { + "$ref": "#/components/schemas/NotificationTargetId", + "description": "Recipient to use for notifications when new user self-registered." + }, + "customerTitlePrefix": { + "type": "string", + "description": "Prefix to add to created customer" + }, + "customerGroupId": { + "$ref": "#/components/schemas/EntityGroupId", + "description": "Id of the customer group customer wil be added to." + }, + "permissions": { + "type": "array", + "description": "Group Permissions to assign for the new customer user.", + "items": { + "$ref": "#/components/schemas/GroupPermission" + } + }, + "defaultDashboard": { + "$ref": "#/components/schemas/DefaultDashboardParams", + "description": "Default dashboard params" + }, + "homeDashboard": { + "$ref": "#/components/schemas/HomeDashboardParams", + "description": "Home dashboard params" + }, + "customMenuId": { + "$ref": "#/components/schemas/CustomMenuId", + "description": "Custom menu id" + }, + "privacyPolicy": { + "type": "string", + "description": "Privacy policy text. Supports HTML." + }, + "termsOfUse": { + "type": "string", + "description": "Terms of User text. Supports HTML." + }, + "domainId": { + "$ref": "#/components/schemas/DomainId", + "description": "Domain name for self registration URL. Typically this matches the domain name from the Login White Labeling page." + } + } + } + ], + "required": [ + "captcha", + "domainId", + "permissions", + "signUpFields", + "title" + ] + }, + "WebViewPage": { + "allOf": [ + { + "$ref": "#/components/schemas/MobilePage" + }, + { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Url", + "example": "/url" + }, + "label": { + "type": "string", + "description": "Page label", + "example": "Air quality" + }, + "visible": { + "type": "boolean", + "description": "Indicates if page is visible", + "example": true + }, + "icon": { + "type": "string", + "description": "URL of the page icon", + "example": "home_icon" + } + } + } + ], + "required": [ + "visible" + ] + }, + "WhiteLabeling": { + "properties": { + "tenantId": { + "$ref": "#/components/schemas/TenantId" + }, + "customerId": { + "$ref": "#/components/schemas/CustomerId" + }, + "type": { + "type": "string", + "enum": [ + "LOGIN", + "GENERAL", + "MAIL_TEMPLATES", + "SELF_REGISTRATION", + "TERMS_OF_USE", + "PRIVACY_POLICY" + ] + }, + "settings": { + "$ref": "#/components/schemas/JsonNode" + }, + "legacyDomain": { + "type": "string", + "readOnly": true + }, + "domainId": { + "$ref": "#/components/schemas/DomainId" + } + } + }, + "WhiteLabelingParams": { + "description": "A JSON value representing the white labeling configuration", + "properties": { + "logoImageUrl": { + "type": "string", + "description": "Logo image URL", + "example": "https://company.com/images/logo.png" + }, + "logoImageHeight": { + "type": "integer", + "format": "int32", + "description": "The height of a logo container. Logo image will be automatically scaled." + }, + "appTitle": { + "type": "string", + "description": "White-labeled name of the platform", + "example": "My Company IoT Platform" + }, + "favicon": { + "$ref": "#/components/schemas/Favicon", + "description": "JSON object that contains website icon url and type" + }, + "paletteSettings": { + "$ref": "#/components/schemas/PaletteSettings", + "description": "Complex JSON that describes structure of the Angular Material Palette. See [theming](https://material.angular.io/guide/theming) for more details" + }, + "helpLinkBaseUrl": { + "type": "string", + "description": "Base URL for help link" + }, + "uiHelpBaseUrl": { + "type": "string", + "description": "Base URL for the repository with the UI help components (markdown)" + }, + "enableHelpLinks": { + "type": "boolean", + "description": "Enable or Disable help links" + }, + "whiteLabelingEnabled": { + "type": "boolean", + "description": "Enable white-labeling", + "readOnly": true + }, + "showNameVersion": { + "type": "boolean", + "description": "Show platform name and version on UI and login screen" + }, + "platformName": { + "type": "string", + "description": "White-labeled platform name" + }, + "platformVersion": { + "type": "string", + "description": "White-labeled platform version" + }, + "customCss": { + "type": "string", + "description": "Custom CSS content" + }, + "hideConnectivityDialog": { + "type": "boolean", + "description": "Hide device connectivity dialog" + } + } + }, + "WidgetBundleInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/EntityId", + "description": "JSON object with the entity Id. " + }, + "name": { + "type": "string", + "description": "Entity Name" + } + } + }, + "WidgetType": { + "properties": { + "id": { + "$ref": "#/components/schemas/WidgetTypeId", + "description": "JSON object with the Widget Type Id. Specify this field to update the Widget Type. Referencing non-existing Widget Type Id will cause error. Omit this field to create new Widget Type." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the Widget Type creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "fqn": { + "type": "string", + "description": "Unique FQN that is used in dashboards as a reference widget type", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Widget name used in search and UI", + "readOnly": true + }, + "deprecated": { + "type": "boolean", + "description": "Whether widget type is deprecated.", + "example": true + }, + "scada": { + "type": "boolean", + "description": "Whether widget type is SCADA symbol.", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "descriptor": { + "$ref": "#/components/schemas/JsonNode" + } + } + }, + "WidgetTypeDetails": { + "description": "A JSON value representing the Widget Type Details.", + "properties": { + "fqn": { + "type": "string", + "description": "Unique FQN that is used in dashboards as a reference widget type", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Widget name used in search and UI", + "readOnly": true + }, + "deprecated": { + "type": "boolean", + "description": "Whether widget type is deprecated.", + "example": true + }, + "image": { + "type": "string", + "description": "Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled." + }, + "description": { + "type": "string", + "description": "Description of the widget" + }, + "descriptor": { + "$ref": "#/components/schemas/JsonNode" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ResourceExportData" + } + }, + "id": { + "$ref": "#/components/schemas/WidgetTypeId", + "description": "JSON object with the Widget Type Id. Specify this field to update the Widget Type. Referencing non-existing Widget Type Id will cause error. Omit this field to create new Widget Type." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the Widget Type creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "scada": { + "type": "boolean", + "description": "Whether widget type is SCADA symbol.", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "tags": { + "type": "array", + "description": "Tags of the widget type", + "items": { + "type": "string" + } + } + } + }, + "WidgetTypeExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/WidgetTypeDetails" + } + } + } + ] + }, + "WidgetTypeId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "WIDGET_TYPE" + ], + "example": "WIDGET_TYPE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "WidgetTypeInfo": { + "properties": { + "id": { + "$ref": "#/components/schemas/WidgetTypeId", + "description": "JSON object with the Widget Type Id. Specify this field to update the Widget Type. Referencing non-existing Widget Type Id will cause error. Omit this field to create new Widget Type." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the Widget Type creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "fqn": { + "type": "string", + "description": "Unique FQN that is used in dashboards as a reference widget type", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Widget name used in search and UI", + "readOnly": true + }, + "deprecated": { + "type": "boolean", + "description": "Whether widget type is deprecated.", + "example": true + }, + "scada": { + "type": "boolean", + "description": "Whether widget type is SCADA symbol.", + "example": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "image": { + "type": "string", + "description": "Base64 encoded widget thumbnail", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Description of the widget type", + "readOnly": true + }, + "tags": { + "type": "array", + "description": "Tags of the widget type", + "items": { + "type": "string" + }, + "readOnly": true + }, + "widgetType": { + "type": "string", + "description": "Type of the widget (timeseries, latest, control, alarm or static)", + "readOnly": true + }, + "bundles": { + "type": "array", + "description": "Bundles", + "items": { + "$ref": "#/components/schemas/WidgetBundleInfo" + }, + "readOnly": true + } + } + }, + "WidgetsBundle": { + "description": "A JSON value representing the Widget Bundle.", + "properties": { + "id": { + "$ref": "#/components/schemas/WidgetsBundleId", + "description": "JSON object with the Widget Bundle Id. Specify this field to update the Widget Bundle. Referencing non-existing Widget Bundle Id will cause error. Omit this field to create new Widget Bundle." + }, + "createdTime": { + "type": "integer", + "format": "int64", + "description": "Timestamp of the Widget Bundle creation, in milliseconds", + "example": 1609459200000, + "readOnly": true + }, + "tenantId": { + "$ref": "#/components/schemas/TenantId", + "description": "JSON object with Tenant Id.", + "readOnly": true + }, + "alias": { + "type": "string", + "description": "Unique alias that is used in widget types as a reference widget bundle", + "readOnly": true + }, + "title": { + "type": "string", + "description": "Title used in search and UI", + "readOnly": true + }, + "image": { + "type": "string", + "description": "Relative or external image URL. Replaced with image data URL (Base64) in case of relative URL and 'inlineImages' option enabled.", + "readOnly": true + }, + "scada": { + "type": "boolean", + "description": "Whether widgets bundle contains SCADA symbol widget types.", + "readOnly": true + }, + "description": { + "type": "string", + "description": "Description", + "readOnly": true + }, + "order": { + "type": "integer", + "format": "int32", + "description": "Order", + "readOnly": true + }, + "version": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Same as title of the Widget Bundle. Read-only field. Update the 'title' to change the 'name' of the Widget Bundle.", + "readOnly": true + } + } + }, + "WidgetsBundleExportData": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityExportDataObject" + }, + { + "type": "object", + "properties": { + "entity": { + "$ref": "#/components/schemas/WidgetsBundle" + }, + "widgets": { + "type": "array", + "items": { + "type": "object" + } + }, + "fqns": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] + }, + "WidgetsBundleId": { + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the entity, time-based UUID v1", + "example": "784f394c-42b6-435a-983c-b7beff2784f9" + }, + "entityType": { + "type": "string", + "description": "string", + "enum": [ + "WIDGETS_BUNDLE" + ], + "example": "WIDGETS_BUNDLE" + } + }, + "required": [ + "entityType", + "id" + ] + }, + "X509CertificateChainProvisionConfiguration": { + "allOf": [ + { + "$ref": "#/components/schemas/DeviceProfileProvisionConfiguration" + }, + { + "type": "object", + "properties": { + "certificateRegExPattern": { + "type": "string" + }, + "allowCreateNewDevicesByX509Certificate": { + "type": "boolean" + } + } + } + ] + }, + "X509LwM2MBootstrapServerCredential": { + "allOf": [ + { + "$ref": "#/components/schemas/LwM2MBootstrapServerCredential" + }, + { + "type": "object", + "properties": { + "shortServerId": { + "type": "integer", + "format": "int32", + "description": "Server short Id. Used as link to associate server Object Instance. This identifier uniquely identifies each LwM2M Server configured for the LwM2M Client. This Resource MUST be set when the Bootstrap-Server Resource has a value of 'false'. The values ID:1 and ID:65534 values MUST NOT be used for identifying the LwM2M Server.", + "example": 123, + "readOnly": true + }, + "bootstrapServerIs": { + "type": "boolean", + "description": "Is Bootstrap Server or Lwm2m Server. The LwM2M Client MAY be configured to use one or more LwM2M Server Account(s). The LwM2M Client MUST have at most one LwM2M Bootstrap-Server Account. (*) The LwM2M client MUST have at least one LwM2M server account after completing the boot sequence specified.", + "example": true, + "readOnly": true + }, + "host": { + "type": "string", + "description": "Host for 'No Security' mode", + "example": "0.0.0.0", + "readOnly": true + }, + "port": { + "type": "integer", + "format": "int32", + "description": "Port for Lwm2m Server: 'No Security' mode: Lwm2m Server or Bootstrap Server", + "example": "'5685' or '5687'", + "readOnly": true + }, + "clientHoldOffTime": { + "type": "integer", + "format": "int32", + "description": "Client Hold Off Time. The number of seconds to wait before initiating a Client Initiated Bootstrap once the LwM2M Client has determined it should initiate this bootstrap mode. (This information is relevant for use with a Bootstrap-Server only.)", + "example": 1, + "readOnly": true + }, + "serverPublicKey": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): RPK or X509. Format: base64 encoded", + "example": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEAZ0pSaGKHk/GrDaUDnQZpeEdGwX7m3Ws+U/kiVat\n+44sgk3c8g0LotfMpLlZJPhPwJ6ipXV+O1r7IZUjBs3LNA==", + "readOnly": true + }, + "serverCertificate": { + "type": "string", + "description": "Server Public Key for 'Security' mode (DTLS): X509. Format: base64 encoded", + "example": "MMIICODCCAd6gAwIBAgIUI88U1zowOdrxDK/dOV+36gJxI2MwCgYIKoZIzj0EAwIwejELMAkGA1UEBhMCVUs\nxEjAQBgNVBAgTCUt5aXYgY2l0eTENMAsGA1UEBxMES3lpdjEUMBIGA1UEChMLVGhpbmdzYm9hcmQxFzAVBgNVBAsMDkRFVkVMT1BFUl9URVNUMRkwFwYDVQQDDBBpbnRlcm1lZGlhdGVfY2EwMB4XDTIyMDEwOTEzMDMwMFoXDTI3MDEwODEzMDMwMFowFDESMBAGA1UEAxM\nJbG9jYWxob3N0MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUO3vBo/JTv0eooY7XHiKAIVDoWKFqtrU7C6q8AIKqpLcqhCdW+haFeBOH3PjY6EwaWkY04Bir4oanU0s7tz2uKOBpzCBpDAOBgNVHQ8BAf8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/\nBAIwADAdBgNVHQ4EFgQUEjc3Q4a0TxzP/3x3EV4fHxYUg0YwHwYDVR0jBBgwFoAUuSquGycMU6Q0SYNcbtSkSD3TfH0wLwYDVR0RBCgwJoIVbG9jYWxob3N0LmxvY2FsZG9tYWlugglsb2NhbGhvc3SCAiAtMAoGCCqGSM49BAMCA0gAMEUCIQD7dbZObyUaoDiNbX+9fUNp\nAWrD7N7XuJUwZ9FcN75R3gIgb2RNjDkHoyUyF1YajwkBk+7XmIXNClmizNJigj908mw=", + "readOnly": true + }, + "bootstrapServerAccountTimeout": { + "type": "integer", + "format": "int32", + "description": "Bootstrap Server Account Timeout (If the value is set to 0, or if this resource is not instantiated, the Bootstrap-Server Account lifetime is infinite.)", + "example": 0, + "readOnly": true + }, + "lifetime": { + "type": "integer", + "format": "int32", + "description": "Specify the lifetime of the registration in seconds.", + "example": 300, + "readOnly": true + }, + "defaultMinPeriod": { + "type": "integer", + "format": "int32", + "description": "The default value the LwM2M Client should use for the Minimum Period of an Observation in the absence of this parameter being included in an Observation. If this Resource doesn’t exist, the default value is 0.", + "example": 1, + "readOnly": true + }, + "notifIfDisabled": { + "type": "boolean", + "description": "If true, the LwM2M Client stores “Notify” operations to the LwM2M Server while the LwM2M Server account is disabled or the LwM2M Client is offline. After the LwM2M Server account is enabled or the LwM2M Client is online, the LwM2M Client reports the stored “Notify” operations to the Server. If false, the LwM2M Client discards all the “Notify” operations or temporarily disables the Observe function while the LwM2M Server is disabled or the LwM2M Client is offline. The default value is true.", + "example": true, + "readOnly": true + }, + "binding": { + "type": "string", + "description": "This Resource defines the transport binding configured for the LwM2M Client. If the LwM2M Client supports the binding specified in this Resource, the LwM2M Client MUST use that transport for the Current Binding Mode.", + "example": "U", + "readOnly": true + } + } + } + ] + } + }, + "securitySchemes": { + "HTTP login form": { + "type": "http", + "description": "Enter Username / Password", + "scheme": "loginPassword", + "bearerFormat": "/api/auth/login|X-Authorization" + } + } + } +} \ No newline at end of file