orchestrator
latest
false
Orchestrator API 指南
警示请求
此请求使您能够在用户有权访问的租户中将一个或多个警示标记为已读。
发布
https://cloud.uipath.com/{organizationName}/{tenantName}/orchestrator_/odata/Alerts/UiPath.Server.Configuration.OData.MarkAsRead
{
"ids": [
"197ed863-037b-4d89-8271-c04e30b52240"
]
}
{
"ids": [
"197ed863-037b-4d89-8271-c04e30b52240"
]
}
{
"value": 12
}
{
"value": 12
}
重要提示: 请求正文必须包含
UserNotificationId
作为负载 "ids"
字段的值。 要查找 UserNotificationId
,请先向 /odata/Alerts
端点发出 GET 请求。
例如,调用 GET
/odata/Alerts
将返回以下响应正文:
{
"value": [
{
"NotificationName": "Robot.StatusChanged.Offline",
"Data": "{\"RobotId\":123,\"RobotName\":\"user@uipath.com-unattended\",\"State\":2,\"IsUnresponsive\":false,\"OrganizationUnitId\":null,\"HostMachineName\":\"MachineName\",\"ReportingTime\":\"2021-08-20T16:48:43.76\",\"Message\":\"#robot Robot(user@uipath.com-unattended) disconnected. (#1222)\",\"MessageErrorCode\":1222,\"FolderId\":null,\"FolderFullyQualifiedName\":null,\"ForceDisplay\":false,\"Type\":\"UiPath.Orchestrator.Core.Alerts.Model.RobotStatusNotification\",\"Properties\":{}}",
"Component": "Robots",
"Severity": "Fatal",
"CreationTime": "2021-08-20T16:48:50.02Z",
"State": "Unread",
"UserNotificationId": "197ed863-037b-4d89-8271-c04e30b52240",
"Id": "a258f4c5-7465-40f8-a650-02228353fd4e"
}
]
}
{
"value": [
{
"NotificationName": "Robot.StatusChanged.Offline",
"Data": "{\"RobotId\":123,\"RobotName\":\"user@uipath.com-unattended\",\"State\":2,\"IsUnresponsive\":false,\"OrganizationUnitId\":null,\"HostMachineName\":\"MachineName\",\"ReportingTime\":\"2021-08-20T16:48:43.76\",\"Message\":\"#robot Robot(user@uipath.com-unattended) disconnected. (#1222)\",\"MessageErrorCode\":1222,\"FolderId\":null,\"FolderFullyQualifiedName\":null,\"ForceDisplay\":false,\"Type\":\"UiPath.Orchestrator.Core.Alerts.Model.RobotStatusNotification\",\"Properties\":{}}",
"Component": "Robots",
"Severity": "Fatal",
"CreationTime": "2021-08-20T16:48:50.02Z",
"State": "Unread",
"UserNotificationId": "197ed863-037b-4d89-8271-c04e30b52240",
"Id": "a258f4c5-7465-40f8-a650-02228353fd4e"
}
]
}
将
"UserNotificationId"
值(即 197ed863-037b-4d89-8271-c04e30b52240
)映射到 POST /odata/Alerts/UiPath.Server.Configuration.OData.MarkAsRead
端点的请求正文中的 "ids"
键。