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

Automation Cloud API 指南

上次更新日期 2025年12月12日

警示

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

API 端点

GET https://cloud.uipath.com/{organizationName}/notificationservice_/notificationserviceapi/odata/v1/Alerts

请求标头

--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进行相等比较,例如:
    • 严重性 eq "Warning"
    • ('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
}
  • API 端点
  • 请求标头
  • 查询参数
  • 筛选器示例
  • 响应
  • 200 OK
  • 400 Bad Request
  • 401 未经授权
  • 403 Forbidden
  • 5xx 服务器错误
  • 请求示例

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo
信任与安全
© 2005-2026 UiPath。保留所有权利。