UiPath Documentation
automation-cloud
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

Automation Cloud API 指南

上次更新日期 2026年4月7日

警示

检索当前经过身份验证的用户的应用程序内警示通知。

API 端点

GET {accessURL}/{organizationName}/notificationservice_/notificationserviceapi/odata/v1/Alerts

将所有端点路径中的{accessURL}替换为您的云平台的基本 URL:

Cloud Platform访问 URL
Automation Cloudhttps://cloud.uipath.com/
Automation Cloud 公共部门https://govcloud.uipath.us/
Automation Cloud 专用https://{customURL}.dedicated.uipath.com/

请求标头

--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'

查询参数

端点支持“警示”集合上的标准 OData 查询选项:

  1. $filter :筛选警示。

    示例:?$filter=Severity eq 'High'

  2. $orderby :对警示进行排序。

    示例:?$orderby=CreationTime desc

  3. $top :限制返回的结果数量。

    示例:?$top=50

  4. $skip :跳过多个结果(分页)。

    示例:?$skip=50&$top=50

  5. $count :请求项目总数。

    备注:

    必须是有效的布尔值: "true""false"

筛选器示例

请查看以下筛选条件示例:

  1. 按组件: ?$filter=component eq 'Process'

  2. 按已读状态(仅未读): ?$filter=component eq 'Process' and state eq 'Unread'

  3. 按严重性: severity字段是一个枚举。仅支持severity进行相等比较,例如:

    • severity eq 'Warning'
    • severity in ('Info','Warning')

    severity不支持不等式 ( ne ) 和范围比较( gtgeltle ),且不得在$filter表达式中使用。

    例如 ?$filter=component eq 'Process' and severity eq 'Warning'

  4. 按时间范围: ?$filter=component eq 'Process' and creationTime ge 2025-01-01T00:00:00Z and creationTime lt 2025-02-01T00:00:00Z

  5. 在警示消息或上下文 ( data ) 中搜索: ?$filter=component eq 'Process' and contains(data,'Timeout')

响应

200 OK

已成功检索到经过身份验证的用户的应用程序内警示通知。

400 Bad Request

  • OData 查询无效,尤其是$count值(非布尔值)无效。
  • 响应正文是标准 JSON 错误对象,其中包含一条指示计数查询选项无效的消息。

401 未经授权

持有者令牌缺失或无效。

403 Forbidden

令牌有效,但不满足UserContext策略或所需权限。

5xx 服务器错误

意外的服务器端故障。

请求示例

请求:

curl --location --request GET \
  'https://cloud.uipath.com/{organizationName}/notificationservice_/notificationserviceapi/odata/v1/Alerts?$top=50&$skip=0&$orderby=creationTime desc&$count=true' \
  --header 'Authorization: Bearer {access_token}' \
  --header 'Accept: application/json'
curl --location --request GET \
  'https://cloud.uipath.com/{organizationName}/notificationservice_/notificationserviceapi/odata/v1/Alerts?$top=50&$skip=0&$orderby=creationTime desc&$count=true' \
  --header 'Authorization: Bearer {access_token}' \
  --header 'Accept: application/json'

响应:

{
  "value": [
    {
      "id": "<identifier>",
      "notificationName": "Robot.StatusChanged.NotResponding",
      "data": "{\"robotId\": 123, \"machineName\": \"<machineName>\"}",
      "component": "Orchestrator",
      "severity": "Warning",
      "creationTime": "2025-01-01T12:34:56Z",
      "state": "Unread",
      "userNotificationId": "<userNotificationId>",
      "deepLinkRelativeUrl": "/alerts/deeplink/robot-not-responding?robotId=123"
    }
  ],
  "@odata.count": 1
}
{
  "value": [
    {
      "id": "<identifier>",
      "notificationName": "Robot.StatusChanged.NotResponding",
      "data": "{\"robotId\": 123, \"machineName\": \"<machineName>\"}",
      "component": "Orchestrator",
      "severity": "Warning",
      "creationTime": "2025-01-01T12:34:56Z",
      "state": "Unread",
      "userNotificationId": "<userNotificationId>",
      "deepLinkRelativeUrl": "/alerts/deeplink/robot-not-responding?robotId=123"
    }
  ],
  "@odata.count": 1
}

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新