Skip to content
本页目录

 

ThingsKit物联网平台

开箱即用的物联网低代码平台

分页记录(待翻译)

接口地址:/api/alarm/{entityType}/{entityId}{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

请求参数:

参数名称参数说明数据类型
entityTypeA string value representing the entity type. For example, 'DEVICE'string
entityIdA string value representing the entity id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'string
pageSizeMaximum amount of entities in a one pageinteger(int32)
pageSequence number of page starting from 0integer(int32)
searchStatusA string value representing one of the AlarmSearchStatus enumeration value,可用值:ACK,ACTIVE,ANY,CLEARED,UNACKstring
statusA string value representing one of the AlarmStatus enumeration value,可用值:ACTIVE_ACK,ACTIVE_UNACK,CLEARED_ACK,CLEARED_UNACKstring
textSearchThe case insensitive 'substring' filter based on of next alarm fields: type, severity or statusstring
sortPropertyProperty of entity to sort by,可用值:ackTs,clearTs,createdTime,endTs,severity,startTs,status,typestring
sortOrderSort order. ASC (ASCENDING) or DESC (DESCENDING),可用值:ASC,DESCstring
startTimeThe start timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.integer(int64)
endTimeThe end timestamp in milliseconds of the search time range over the Alarm class field: 'createdTime'.integer(int64)
fetchOriginatorA 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
dataArray of the entitiesarrayAlarmInfo
  ackTsTimestamp of the alarm acknowledgement, in millisecondsinteger(int64)
  clearTsTimestamp of the alarm clearing, in millisecondsinteger(int64)
  createdTimeTimestamp of the alarm creation, in millisecondsinteger(int64)
  customerIdJSON object with Customer IdCustomerIdResCustomerIdRes
    entityTypestring,可用值:CUSTOMERstring
    idID of the entity, time-based UUID v1string
  detailsJSON object with alarm detailsJsonNodeJsonNode
  endTsTimestamp of the alarm end time(last time update), in millisecondsinteger(int64)
  idJSON 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.AlarmIdResAlarmIdRes
    entityTypestring,可用值:ALARMstring
    idID of the entity, time-based UUID v1string
  namerepresenting type of the Alarmstring
  originatorJSON object with alarm originator idEntityIdResEntityIdRes
    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_TYPEstring
    idID of the entity, time-based UUID v1string
  originatorNameAlarm originator namestring
  propagatePropagation flag to specify if alarm should be propagated to parent entities of alarm originatorboolean
  propagateRelationTypesJSON 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.arraystring
  propagateToOwnerPropagation flag to specify if alarm should be propagated to the owner (tenant or customer) of alarm originatorboolean
  propagateToTenantPropagation flag to specify if alarm should be propagated to the tenant entityboolean
  severityAlarm severity,可用值:CRITICAL,INDETERMINATE,MAJOR,MINOR,WARNINGstring
  startTsTimestamp of the alarm start time, in millisecondsinteger(int64)
  statusAlarm status,可用值:ACTIVE_ACK,ACTIVE_UNACK,CLEARED_ACK,CLEARED_UNACKstring
  tenantIdJSON object with Tenant IdTenantIdResTenantIdRes
    entityTypestring,可用值:TENANTstring
    idID of the entity, time-based UUID v1string
  typerepresenting type of the Alarmstring
hasNext'false' value indicates the end of the result setboolean
totalElementsTotal number of elements in all available pagesinteger(int64)integer(int64)
totalPagesTotal number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteriainteger(int32)integer(int32)

清除告警(待翻译)

接口地址:/api/alarm/{alarmId}/clear

请求方式:POST

请求数据类型:application/x-www-form-urlencoded

响应数据类型:`/

请求参数:

参数名称参数说明请求类型是否必须数据类型
alarmIdA string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'pathtruestring

响应参数:

参数名称参数说明类型
errorCodePlatform 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
messageError messagestring
statusHTTP Response Status Codeinteger(int32)
timestampTimestampstring(date-time)

处理告警(待翻译)

接口地址:/api/alarm/{alarmId}/ack

请求方式:POST

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

请求参数:

参数名称参数说明请求类型是否必须数据类型
alarmIdA string value representing the alarm id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'pathtruestring

响应参数:

参数名称参数说明类型
errorCodePlatform 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
messageError messagestring
statusHTTP Response Status Codeinteger(int32)
timestampTimestampstring(date-time)