代码拉取完成,页面将自动刷新
接口地址:/api/alarm/{entityType}/{entityId}{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
请求参数:
参数名称 | 参数说明 | 数据类型 |
---|---|---|
entityType | A string value representing the entity type. For example, 'DEVICE' | string |
entityId | A string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | string |
pageSize | Maximum amount of entities in a one page | integer(int32) |
page | Sequence number of page starting from 0 | integer(int32) |
searchStatus | A string value representing one of the AlarmSearchStatus enumeration value,可用值:ACK,ACTIVE,ANY,CLEARED,UNACK | string |
status | A string value representing one of the AlarmStatus enumeration value,可用值:ACTIVE_ACK,ACTIVE_UNACK,CLEARED_ACK,CLEARED_UNACK | string |
textSearch | The case insensitive 'substring' filter based on of next alarm fields: type, severity or status | string |
sortProperty | Property of entity to sort by,可用值:ackTs,clearTs,createdTime,endTs,severity,startTs,status,type | string |
sortOrder | Sort order. ASC (ASCENDING) or DESC (DESCENDING),可用值:ASC,DESC | string |
startTime | The start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. | integer(int64) |
endTime | The end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'. | integer(int64) |
fetchOriginator | A boolean value to specify if the alarm originator name will be filled in the AlarmInfo object field: 'originatorName' or will returns as null. | boolean |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
data | Array of the entities | array | AlarmInfo |
ackTs | Timestamp of the alarm acknowledgement, in milliseconds | integer(int64) | |
clearTs | Timestamp of the alarm clearing, in milliseconds | integer(int64) | |
createdTime | Timestamp of the alarm creation, in milliseconds | integer(int64) | |
customerId | JSON object with Customer Id | CustomerIdRes | CustomerIdRes |
entityType | string,可用值:CUSTOMER | string | |
id | ID of the entity, time-based UUID v1 | string | |
details | JSON object with alarm details | JsonNode | JsonNode |
endTs | Timestamp of the alarm end time(last time update), in milliseconds | integer(int64) | |
id | 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. | AlarmIdRes | AlarmIdRes |
entityType | string,可用值:ALARM | string | |
id | ID of the entity, time-based UUID v1 | string | |
name | representing type of the Alarm | string | |
originator | JSON object with alarm originator id | EntityIdRes | EntityIdRes |
entityType | 可用值:ALARM,API_USAGE_STATE,ASSET,CUSTOMER,DASHBOARD,DEVICE,DEVICE_PROFILE,EDGE,ENTITY_VIEW,OTA_PACKAGE,RPC,RULE_CHAIN,RULE_NODE,RUNNING_EXCEPTION,SCENE_ACT,TB_RESOURCE,TENANT,TENANT_PROFILE,USER,WIDGETS_BUNDLE,WIDGET_TYPE | string | |
id | ID of the entity, time-based UUID v1 | string | |
originatorName | Alarm originator name | string | |
propagate | Propagation flag to specify if alarm should be propagated to parent entities of alarm originator | boolean | |
propagateRelationTypes | 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. | array | string |
propagateToOwner | Propagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originator | boolean | |
propagateToTenant | Propagation flag to specify if alarm should be propagated to the tenant entity | boolean | |
severity | Alarm severity,可用值:CRITICAL,INDETERMINATE,MAJOR,MINOR,WARNING | string | |
startTs | Timestamp of the alarm start time, in milliseconds | integer(int64) | |
status | Alarm status,可用值:ACTIVE_ACK,ACTIVE_UNACK,CLEARED_ACK,CLEARED_UNACK | string | |
tenantId | JSON object with Tenant Id | TenantIdRes | TenantIdRes |
entityType | string,可用值:TENANT | string | |
id | ID of the entity, time-based UUID v1 | string | |
type | representing type of the Alarm | string | |
hasNext | 'false' value indicates the end of the result set | boolean | |
totalElements | Total number of elements in all available pages | integer(int64) | integer(int64) |
totalPages | Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria | integer(int32) | integer(int32) |
接口地址:/api/alarm/{alarmId}/clear
请求方式:POST
请求数据类型:application/x-www-form-urlencoded
响应数据类型:`/
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
alarmId | A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | path | true | string |
响应参数:
参数名称 | 参数说明 | 类型 |
---|---|---|
errorCode | 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) |
object |
message | Error message | string |
status | HTTP Response Status Code | integer(int32) |
timestamp | Timestamp | string(date-time) |
接口地址:/api/alarm/{alarmId}/ack
请求方式:POST
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
---|---|---|---|---|
alarmId | A string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9' | path | true | string |
响应参数:
参数名称 | 参数说明 | 类型 |
---|---|---|
errorCode | 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) |
object |
message | Error message | string |
status | HTTP Response Status Code | integer(int32) |
timestamp | Timestamp | string(date-time) |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。