{ "opencollection": "1.0.0", "info": { "name": "ThingsBoard Admin admin-controller alarm-controller API", "version": "4.3.0.3DEMO" }, "items": [ { "info": { "name": "alarm-controller", "type": "folder" }, "items": [ { "info": { "name": "Create or Update Alarm (saveAlarm)", "type": "http" }, "http": { "method": "POST", "url": "https://demo.thingsboard.io/api/alarm", "body": { "type": "json", "data": "{}" } }, "docs": "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 " }, { "info": { "name": "Clear Alarm (clearAlarm)", "type": "http" }, "http": { "method": "POST", "url": "https://demo.thingsboard.io/api/alarm/:alarmId/clear", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "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." }, { "info": { "name": "Assign/Reassign Alarm (assignAlarm)", "type": "http" }, "http": { "method": "POST", "url": "https://demo.thingsboard.io/api/alarm/:alarmId/assign/:assigneeId", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "assigneeId", "value": "", "type": "path", "description": "A string value representing the user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "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." }, { "info": { "name": "Acknowledge Alarm (ackAlarm)", "type": "http" }, "http": { "method": "POST", "url": "https://demo.thingsboard.io/api/alarm/:alarmId/ack", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "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." }, { "info": { "name": "Get All Alarms (getAllAlarmsV2)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/v2/alarms", "params": [ { "name": "statusList", "value": "", "type": "query", "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value" }, { "name": "severityList", "value": "", "type": "query", "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value" }, { "name": "typeList", "value": "", "type": "query", "description": "A list of string values separated by comma ',' representing alarm types" }, { "name": "assigneeId", "value": "", "type": "query", "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "pageSize", "value": "", "type": "query", "description": "Maximum amount of entities in a one page" }, { "name": "page", "value": "", "type": "query", "description": "Sequence number of page starting from 0" }, { "name": "textSearch", "value": "", "type": "query", "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status" }, { "name": "sortProperty", "value": "", "type": "query", "description": "Property of entity to sort by" }, { "name": "sortOrder", "value": "", "type": "query", "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)" }, { "name": "startTime", "value": "", "type": "query", "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." }, { "name": "endTime", "value": "", "type": "query", "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." } ] }, "docs": "Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more det" }, { "info": { "name": "Get Alarms (getAlarmsV2)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/v2/alarm/:entityType/:entityId", "params": [ { "name": "entityType", "value": "", "type": "path", "description": "A string value representing the entity type. For example, 'DEVICE'" }, { "name": "entityId", "value": "", "type": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "statusList", "value": "", "type": "query", "description": "A list of string values separated by comma ',' representing one of the AlarmSearchStatus enumeration value" }, { "name": "severityList", "value": "", "type": "query", "description": "A list of string values separated by comma ',' representing one of the AlarmSeverity enumeration value" }, { "name": "typeList", "value": "", "type": "query", "description": "A list of string values separated by comma ',' representing alarm types" }, { "name": "assigneeId", "value": "", "type": "query", "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "pageSize", "value": "", "type": "query", "description": "Maximum amount of entities in a one page" }, { "name": "page", "value": "", "type": "query", "description": "Sequence number of page starting from 0" }, { "name": "textSearch", "value": "", "type": "query", "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status" }, { "name": "sortProperty", "value": "", "type": "query", "description": "Property of entity to sort by" }, { "name": "sortOrder", "value": "", "type": "query", "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)" }, { "name": "startTime", "value": "", "type": "query", "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." }, { "name": "endTime", "value": "", "type": "query", "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." } ] }, "docs": "Returns a page of alarms for the selected entity. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." }, { "info": { "name": "Get All Alarms (getAllAlarms)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/alarms", "params": [ { "name": "searchStatus", "value": "", "type": "query", "description": "A string value representing one of the AlarmSearchStatus enumeration value" }, { "name": "status", "value": "", "type": "query", "description": "A string value representing one of the AlarmStatus enumeration value" }, { "name": "assigneeId", "value": "", "type": "query", "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "pageSize", "value": "", "type": "query", "description": "Maximum amount of entities in a one page" }, { "name": "page", "value": "", "type": "query", "description": "Sequence number of page starting from 0" }, { "name": "textSearch", "value": "", "type": "query", "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status" }, { "name": "sortProperty", "value": "", "type": "query", "description": "Property of entity to sort by" }, { "name": "sortOrder", "value": "", "type": "query", "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)" }, { "name": "startTime", "value": "", "type": "query", "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." }, { "name": "endTime", "value": "", "type": "query", "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." }, { "name": "fetchOriginator", "value": "", "type": "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." } ] }, "docs": "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 " }, { "info": { "name": "Get Alarms (getAlarms)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/alarm/:entityType/:entityId", "params": [ { "name": "entityType", "value": "", "type": "path", "description": "A string value representing the entity type. For example, 'DEVICE'" }, { "name": "entityId", "value": "", "type": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "searchStatus", "value": "", "type": "query", "description": "A string value representing one of the AlarmSearchStatus enumeration value" }, { "name": "status", "value": "", "type": "query", "description": "A string value representing one of the AlarmStatus enumeration value" }, { "name": "assigneeId", "value": "", "type": "query", "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "pageSize", "value": "", "type": "query", "description": "Maximum amount of entities in a one page" }, { "name": "page", "value": "", "type": "query", "description": "Sequence number of page starting from 0" }, { "name": "textSearch", "value": "", "type": "query", "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status" }, { "name": "sortProperty", "value": "", "type": "query", "description": "Property of entity to sort by" }, { "name": "sortOrder", "value": "", "type": "query", "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)" }, { "name": "startTime", "value": "", "type": "query", "description": "The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." }, { "name": "endTime", "value": "", "type": "query", "description": "The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'." }, { "name": "fetchOriginator", "value": "", "type": "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." } ] }, "docs": "Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See response schema for more details. \n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." }, { "info": { "name": "Get Alarm (getAlarmById)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/alarm/:alarmId", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "Fetch the Alarm object based on the provided Alarm Id. If the user has the authority of 'Tenant Administrator', the server checks that the originator of alarm is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the originator of alarm belongs to the customer. " }, { "info": { "name": "Delete Alarm (deleteAlarm)", "type": "http" }, "http": { "method": "DELETE", "url": "https://demo.thingsboard.io/api/alarm/:alarmId", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.\n\nAvailable for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority." }, { "info": { "name": "Get Alarm Types (getAlarmTypes)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/alarm/types", "params": [ { "name": "pageSize", "value": "", "type": "query", "description": "Maximum amount of entities in a one page" }, { "name": "page", "value": "", "type": "query", "description": "Sequence number of page starting from 0" }, { "name": "textSearch", "value": "", "type": "query", "description": "The case insensitive 'substring' filter based on of next alarm fields: type, severity or status" }, { "name": "sortOrder", "value": "", "type": "query", "description": "Sort order. ASC (ASCENDING) or DESC (DESCENDING)" } ] }, "docs": "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." }, { "info": { "name": "Get Alarm Info (getAlarmInfoById)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/alarm/info/:alarmId", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "Fetch the Alarm Info object based on the provided Alarm Id. If the user has the authority of 'Tenant Administrator', the server checks that the originator of alarm is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the originator of alarm belongs to the customer. 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." }, { "info": { "name": "Get Highest Alarm Severity (getHighestAlarmSeverity)", "type": "http" }, "http": { "method": "GET", "url": "https://demo.thingsboard.io/api/alarm/highestSeverity/:entityType/:entityId", "params": [ { "name": "entityType", "value": "", "type": "path", "description": "A string value representing the entity type. For example, 'DEVICE'" }, { "name": "entityId", "value": "", "type": "path", "description": "A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" }, { "name": "searchStatus", "value": "", "type": "query", "description": "A string value representing one of the AlarmSearchStatus enumeration value" }, { "name": "status", "value": "", "type": "query", "description": "A string value representing one of the AlarmStatus enumeration value" }, { "name": "assigneeId", "value": "", "type": "query", "description": "A string value representing the assignee user id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "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." }, { "info": { "name": "Unassign Alarm (unassignAlarm)", "type": "http" }, "http": { "method": "DELETE", "url": "https://demo.thingsboard.io/api/alarm/:alarmId/assign", "params": [ { "name": "alarmId", "value": "", "type": "path", "description": "A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'" } ] }, "docs": "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." } ] } ], "bundled": true }