.content(getErrorContent(ThingsboardErrorResponse.of("You don't have permission to perform this operation!",ThingsboardErrorCode.PERMISSION_DENIED,HttpStatus.FORBIDDEN))));
apiResponses.addApiResponse("429",newApiResponse().description("Too Many Requests")
.content(getErrorContent(ThingsboardErrorResponse.of("Too many requests for current tenant!",ThingsboardErrorCode.TOO_MANY_REQUESTS,HttpStatus.TOO_MANY_REQUESTS))));
apiResponses.addApiResponse("429",errorResponse("429","Too Many Requests",
ThingsboardErrorResponse.of("Too many requests for current tenant!",ThingsboardErrorCode.TOO_MANY_REQUESTS,HttpStatus.TOO_MANY_REQUESTS)));
notes="Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string."+SYSTEM_AUTHORITY_PARAGRAPH,
notes="Updates the JWT Settings object that contains JWT token policy, etc. The tokenSigningKey field is a Base64 encoded string."+SYSTEM_AUTHORITY_PARAGRAPH)
@ -69,8 +69,7 @@ public class AlarmCommentController extends BaseController {
"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."+
notes="Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Deletes the Alarm comment. Referencing non-existing Alarm comment Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
@ -104,7 +104,7 @@ public class AlarmController extends BaseController {
"filled in the AlarmInfo object field: 'originatorName' or will returns as null.";
@ApiOperation(value="Get Alarm (getAlarmById)",
notes="Fetch the Alarm object based on the provided Alarm Id. "+ALARM_SECURITY_CHECK,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Fetch the Alarm object based on the provided Alarm Id. "+ALARM_SECURITY_CHECK)
@ -155,7 +155,7 @@ public class AlarmController extends BaseController {
}
@ApiOperation(value="Delete Alarm (deleteAlarm)",
notes="Deletes the Alarm. Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Deletes the Alarm. Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
"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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
@ -184,7 +184,7 @@ public class AlarmController extends BaseController {
@ApiOperation(value="Clear Alarm (clearAlarm)",
notes="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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
@ -200,7 +200,7 @@ public class AlarmController extends BaseController {
notes="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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
"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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Referencing non-existing Alarm Id will cause an error."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
@ -236,7 +236,7 @@ public class AlarmController extends BaseController {
@ApiOperation(value="Get Alarms (getAlarms)",
notes="Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. "+
notes="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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
notes="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.",
notes="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.")
@ -103,7 +103,7 @@ public class AssetController extends BaseController {
notes="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."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH
@ -158,7 +158,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Assign asset to customer (assignAssetToCustomer)",
notes="Creates assignment of the asset to customer. Customer will be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Creates assignment of the asset to customer. Customer will be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH)
@ -174,7 +174,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Unassign asset from customer (unassignAssetFromCustomer)",
notes="Clears assignment of the asset to customer. Customer will not be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Clears assignment of the asset to customer. Customer will not be able to query asset afterwards."+TENANT_AUTHORITY_PARAGRAPH)
@ -192,7 +192,7 @@ public class AssetController extends BaseController {
@ApiOperation(value="Make asset publicly available (assignAssetToPublicCustomer)",
notes="Asset will be available for non-authorized (not logged-in) users. "+
"This is useful to create dashboards that you plan to share/embed on a publicly available website. "+
"However, users that are logged-in and belong to different tenant will not be able to access the asset."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"However, users that are logged-in and belong to different tenant will not be able to access the asset."+TENANT_AUTHORITY_PARAGRAPH)
notes="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."+TENANT_AUTHORITY_PARAGRAPH,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"Asset name is an unique property of asset. So it can be used to identify the asset."+TENANT_AUTHORITY_PARAGRAPH)
@ -349,7 +349,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Get Assets By Ids (getAssetsByIds)",
notes="Requested assets must be owned by tenant or assigned to customer which user is performing the request. ",responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="Requested assets must be owned by tenant or assigned to customer which user is performing the request. ")
@ -510,7 +507,7 @@ public class AssetController extends BaseController {
}
@ApiOperation(value="Import the bulk of assets (processAssetsBulkImport)",
notes="There's an ability to import the bulk of assets using the only .csv file.",responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
notes="There's an ability to import the bulk of assets using the only .csv file.")
@ -247,8 +241,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Update the Dashboard Customers (updateDashboardCustomers)",
notes="Updates the list of Customers that this Dashboard is assigned to. Removes previous assignments to customers that are not in the provided list. "+
"Returns the Dashboard object. "+TENANT_AUTHORITY_PARAGRAPH,
@ -267,8 +260,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Adds the Dashboard Customers (addDashboardCustomers)",
notes="Adds the list of Customers to the existing list of assignments for the Dashboard. Keeps previous assignments to customers that are not in the provided list. "+
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -286,8 +278,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Remove the Dashboard Customers (removeDashboardCustomers)",
notes="Removes the list of Customers from the existing list of assignments for the Dashboard. Keeps other assignments to customers that are not in the provided list. "+
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -325,8 +315,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Unassign the Dashboard from Public Customer (unassignDashboardFromPublicCustomer)",
notes="Unassigns the dashboard from a special, auto-generated 'Public' Customer. Once unassigned, unauthenticated users may no longer browse the dashboard. "+
"Returns the Dashboard object."+TENANT_AUTHORITY_PARAGRAPH,
@ -432,8 +418,7 @@ public class DashboardController extends BaseController {
notes="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. "
@ -465,8 +450,7 @@ public class DashboardController extends BaseController {
notes="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. "+
@ -496,8 +480,7 @@ public class DashboardController extends BaseController {
@ApiOperation(value="Get Tenant Home Dashboard Info (getTenantHomeDashboardInfo)",
notes="Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant. "+
@ -136,8 +133,7 @@ public class DeviceProfileController extends BaseController {
"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. "+
@ -160,8 +156,7 @@ public class DeviceProfileController extends BaseController {
"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. "+
@ -152,8 +150,7 @@ public class EdgeController extends BaseController {
"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. "+
notes="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."
@ -296,7 +289,7 @@ public class EntityRelationController extends BaseController {
@ApiOperation(value="Find related entity infos (findInfoByQuery)",
notes="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_DESCRIPTION,responses=@ApiResponse(content=@Content(mediaType=MediaType.APPLICATION_JSON_VALUE)))
"See 'Model' tab of the Parameters for more info. "+RELATION_INFO_DESCRIPTION)
notes="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. "+
@ -476,8 +464,7 @@ public class TelemetryController extends BaseController {
" 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. "+
@Schema(description="JSON object with Alarm id.",accessMode=Schema.AccessMode.READ_ONLY)
privateEntityIdalarmId;
privateAlarmIdalarmId;
@Schema(description="JSON object with User id.",accessMode=Schema.AccessMode.READ_ONLY)
privateUserIduserId;
@Schema(description="Defines origination of comment. System type means comment was created by TB. OTHER type means comment was created by user.",example="SYSTEM/OTHER",accessMode=Schema.AccessMode.READ_ONLY)
privateAlarmCommentTypetype;
@Schema(description="JSON object with text of comment.",implementation=com.fasterxml.jackson.databind.JsonNode.class)
@Schema(description="JSON object with text of comment.")
@NoXss
@Length(fieldName="comment",max=10000)
@EqualsAndHashCode.Include
privatetransientJsonNodecomment;
privateJsonNodecomment;
@Schema(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.")
"Omit this field to create new alarm.",accessMode=Schema.AccessMode.READ_ONLY)
@Override
publicAlarmCommentIdgetId(){
returnsuper.getId();
@ -72,7 +73,7 @@ public class AlarmComment extends BaseData<AlarmCommentId> implements HasName {
@ -222,8 +219,7 @@ public class DeviceApiController implements TbTransportService {
+MARKDOWN_CODE_BLOCK_END
+"Note: both 'secretKey' and 'durationMs' is optional parameters. "+
"In case the secretKey is not specified, the empty string as a default value is used. In case the durationMs is not specified, the system parameter device.claim.duration is used.\n\n"
@Parameter(description="RPC request id from the incoming RPC request",required=true,schema=@Schema(defaultValue="123"))
@PathVariable("requestId")IntegerrequestId,
@Parameter(description="Reply to the RPC request, JSON. For example: {\"status\":\"success\"}",required=true)
@io.swagger.v3.oas.annotations.parameters.RequestBody(description="Reply to the RPC request, JSON. For example: {\"status\":\"success\"}",required=true)