UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UIP Insights 警示

“uip Insights 警示”的语法和选项,可读取 UiPath Insights 实时警示定义。

uip insights alerts读取 UiPath Insights 实时警示定义,即 Insights 中配置的警示规则,而不是触发的历史记录(请参阅警示历史记录)。这是一个只读表面:没有“创建”、“更新”或“删除”动词。

备注:

这些路由通过功能门控到云和专用 SaaS 部署。在其他部署类型上,该命令将失败,并显示 ConfigError,声明未提供路由,而不是提供空结果。

大纲​

uip insights alerts list [--agentic --process-key <key>] [-l <n>] [-o <n>]
uip insights alerts get <alert-id>
uip insights alerts check-entitlement
uip insights alerts list [--agentic --process-key <key>] [-l <n>] [-o <n>]
uip insights alerts get <alert-id>
uip insights alerts check-entitlement

所有动词都遵循全局选项和标准退出代码。这些动词都不接受 -t, --tenant — 它们使用在 uip login 期间选择的租户。

UIP Insights 警示列表​

列出当前调用者可见的警示定义。传递 --agentic 以列出限定在一个流程密钥范围内的定义,而不是整个租户的列表。

选项​

标记描述
--agentic使用智能体路由,并将范围限定在一个流程密钥内。需要 --process-key。
--process-key <key>将智能体列表确定为的流程键值。仅与 --agentic 一起有效;在未添加 --agentic 的情况下传递字段会导致验证错误。
-l, --limit <number>要返回的最大行数。默认为 50。
-o, --offset <number>返回结果之前要跳过的行。

分页在客户端进行:后端返回完整的未分页列表,CLI 在获取后对其进行切片。

示例​

uip insights alerts list

uip insights alerts list --agentic --process-key MyAgenticProcess

uip insights alerts list --limit 10 --offset 10
uip insights alerts list

uip insights alerts list --agentic --process-key MyAgenticProcess

uip insights alerts list --limit 10 --offset 10

数据形状​

{
  "Code": "InsightsAlertsList",
  "Data": [
    {
      "id": 42,
      "name": "High failure rate",
      "severity": "ERROR",
      "isActive": true,
      "engine": "aggregate",
      "metric": "FailedJobCount",
      "metricState": "Failed",
      "operator": "GreaterThan",
      "threshold": 5,
      "windowSeconds": 3600,
      "deliveryId": 7,
      "autoSnoozeSeconds": 1800,
      "snoozedUntil": null,
      "lastTriggeredAt": 1714003200,
      "processKey": "Invoicing",
      "folderKey": "f0f0f0f0-0000-0000-0000-000000000001",
      "projectKey": null,
      "processVersion": "1.0.0",
      "scopes": [{ "field": "FolderName", "values": ["Finance"] }]
    }
  ],
  "Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "Total": 1, "HasMore": false }
}
{
  "Code": "InsightsAlertsList",
  "Data": [
    {
      "id": 42,
      "name": "High failure rate",
      "severity": "ERROR",
      "isActive": true,
      "engine": "aggregate",
      "metric": "FailedJobCount",
      "metricState": "Failed",
      "operator": "GreaterThan",
      "threshold": 5,
      "windowSeconds": 3600,
      "deliveryId": 7,
      "autoSnoozeSeconds": 1800,
      "snoozedUntil": null,
      "lastTriggeredAt": 1714003200,
      "processKey": "Invoicing",
      "folderKey": "f0f0f0f0-0000-0000-0000-000000000001",
      "projectKey": null,
      "processVersion": "1.0.0",
      "scopes": [{ "field": "FolderName", "values": ["Finance"] }]
    }
  ],
  "Pagination": { "Returned": 1, "Limit": 50, "Offset": 0, "Total": 1, "HasMore": false }
}

行是一个封闭的允许列表预测 — 系统永远不会发出此处未显示的字段(例如存储的原始查询)。字段名称采用驼峰式命名法,与大多数其他 uip 命令使用的帕斯卡拼写法不同。当 engine 是聚合类型的警示时,该行还可以包含 condition(警示触发条件的人类可读呈现)和 conditionVisible(该呈现是否可用)。

UIP Insights 警示获取​

通过整数 ID 获取警示定义。

参数​

  • <alert-id> (必填项) — 警示定义的整数 ID(来自alerts list )。

示例​

uip insights alerts get 42
uip insights alerts get 42

数据形状​

行形状与alerts list Data下Code: "InsightsAlertGet" 数组的一个元素相同。

{
  "Code": "InsightsAlertGet",
  "Data": {
    "id": 42,
    "name": "High failure rate",
    "severity": "ERROR",
    "isActive": true,
    "engine": "aggregate",
    "metric": "FailedJobCount",
    "metricState": "Failed",
    "operator": "GreaterThan",
    "threshold": 5,
    "windowSeconds": 3600,
    "deliveryId": 7,
    "autoSnoozeSeconds": 1800,
    "snoozedUntil": null,
    "lastTriggeredAt": 1714003200,
    "processKey": "Invoicing",
    "folderKey": "f0f0f0f0-0000-0000-0000-000000000001",
    "projectKey": null,
    "processVersion": "1.0.0",
    "scopes": []
  }
}
{
  "Code": "InsightsAlertGet",
  "Data": {
    "id": 42,
    "name": "High failure rate",
    "severity": "ERROR",
    "isActive": true,
    "engine": "aggregate",
    "metric": "FailedJobCount",
    "metricState": "Failed",
    "operator": "GreaterThan",
    "threshold": 5,
    "windowSeconds": 3600,
    "deliveryId": 7,
    "autoSnoozeSeconds": 1800,
    "snoozedUntil": null,
    "lastTriggeredAt": 1714003200,
    "processKey": "Invoicing",
    "folderKey": "f0f0f0f0-0000-0000-0000-000000000001",
    "projectKey": null,
    "processVersion": "1.0.0",
    "scopes": []
  }
}

此处的 404 表示当前租户中不存在警示 ID — 请传递 alerts list 中的有效 ID。

UIP Insights 警示检查权限​

检查是否确认当前租户有权接收 Insights 警示。

示例​

uip insights alerts check-entitlement
uip insights alerts check-entitlement

数据形状​

{
  "Code": "InsightsAlertEntitlement",
  "Data": { "entitled": true }
}
{
  "Code": "InsightsAlertEntitlement",
  "Data": { "entitled": true }
}

alerts list/alerts get 上的 403 通常意味着调用者的 Orchestrator 文件夹访问权限无法解决,而不是权限问题 — 请先检查活动租户和文件夹权限,然后使用 check-entitlement 来确认权限。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新