- 入门指南
- 身份验证
- 作用域和权限
- 平台管理 API

Automation Cloud API 指南
警示
检索当前经过身份验证的用户的应用程序内警示通知。
API 端点
GET {accessURL}/{organizationName}/notificationservice_/notificationserviceapi/odata/v1/Alerts
将所有端点路径中的{accessURL}替换为您的云平台的基本 URL:
| Cloud Platform | 访问 URL |
|---|---|
| Automation Cloud | https://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 查询选项:
-
$filter:筛选警示。示例:
?$filter=Severity eq 'High'。 -
$orderby:对警示进行排序。示例:
?$orderby=CreationTime desc。 -
$top:限制返回的结果数量。示例:
?$top=50。 -
$skip:跳过多个结果(分页)。示例:
?$skip=50&$top=50。 -
$count:请求项目总数。备注:必须是有效的布尔值:
"true"或"false"。
筛选器示例
请查看以下筛选条件示例:
-
按组件:
?$filter=component eq 'Process'。 -
按已读状态(仅未读):
?$filter=component eq 'Process' and state eq 'Unread'。 -
按严重性:
severity字段是一个枚举。仅支持severity进行相等比较,例如:severity eq 'Warning'severity in ('Info','Warning')
severity不支持不等式 (ne) 和范围比较(gt、ge、lt、le),且不得在$filter表达式中使用。例如
?$filter=component eq 'Process' and severity eq 'Warning'。 -
按时间范围:
?$filter=component eq 'Process' and creationTime ge 2025-01-01T00:00:00Z and creationTime lt 2025-02-01T00:00:00Z -
在警示消息或上下文 (
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
}