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

UIP 为连接

“uip is Connections”的语法和选项,用于管理 UiPath 租户和外部连接器之间的 OAuth 会话。

uip is connections 用于根据连接器管理租户的 OAuth 会话。连接是指 UiPath 租户文件夹与外部帐户之间经过身份验证的链接;它携带 resources run 和 activities 在运行时使用的令牌。动词涵盖发现(list、export)、身份验证(create、edit)、运行状况检查(ping)和管理(rename、set-default、update-polling-interval、base-url delete)。create 和 edit 在浏览器中打开连接器的 OAuth URL,并轮询服务器以获取完成(间隔时间间隔为 5 秒,总超时时间为 5 分钟)。

大纲​

uip is connections <verb> [options]
uip is connections <verb> [options]

动词​

动词用途
list列出连接,可将其范围限定为连接器、文件夹或 BYOA 状态。
export导出(跨所有文件夹)每个连接以供审核。
create通过连接器的 OAuth 流程新建连接。
ping检查连接当前是否已启用且可访问。
edit通过 OAuth 流程重新验证现有连接。
rename重命名现有连接。
set-default将连接标记为其连接器的默认连接。
update-polling-interval更改连接的轮询间隔。
base-url获取连接解析的 API 基本 URL。
delete删除连接(具有破坏性,需要 -y/--yes)。

UIP 为连接列表​

列出租户默认作用域内的连接。可选的位置 <connector-key> 将结果筛选到一个连接器;标志可以按文件夹、连接 ID 或 BYOA 状态确定范围。

参数​

名称必填用途
[connector-key]否要作为筛选依据的连接器键(例如uipath-zoho-desk )。省略以列出所有连接器。

选项​

短长值默认描述
—--folder-keyUUID—在特定文件夹中搜索连接。必须是 UUID。与 --all-folders 互斥。
—--connection-idid—筛选特定连接 ID。
—--byoa标记关闭仅筛选 BYOA(自带帐户)连接。
—--all-folders标记关闭搜索所有文件夹的连接,而非默认作用域。与 --folder-key 互斥 — 在发出任何请求之前,两者组合失败并显示 Failure。
—--refresh标记关闭强制从 API 重新获取,忽略缓存。

示例​

uip is connections list

uip is connections list uipath-zoho-desk

uip is connections list --byoa --all-folders

uip is connections list uipath-zoho-desk --refresh \
    --output-filter 'Data[].{id:Id, state:State}'
uip is connections list

uip is connections list uipath-zoho-desk

uip is connections list --byoa --all-folders

uip is connections list uipath-zoho-desk --refresh \
    --output-filter 'Data[].{id:Id, state:State}'

数据形状(--输出 json)​

{
  "Code": "ConnectionList",
  "Data": [
    {
      "Id": "a1b2c3d4-0000-0000-0000-000000000001",
      "Name": "Zoho Desk - Prod",
      "ConnectorKey": "uipath-zoho-desk",
      "ConnectorName": "Zoho Desk",
      "State": "Enabled",
      "Owner": "user@example.com",
      "IsDefault": "No",
      "ByoaConnection": "No",
      "ElementInstanceId": 123456,
      "Folder": "Shared",
      "FolderKey": "f0f0f0f0-0000-0000-0000-000000000001",
      "Created": "2026-01-10T10:00:00.000Z",
      "Updated": "2026-01-10T10:00:00.000Z"
    }
  ]
}
{
  "Code": "ConnectionList",
  "Data": [
    {
      "Id": "a1b2c3d4-0000-0000-0000-000000000001",
      "Name": "Zoho Desk - Prod",
      "ConnectorKey": "uipath-zoho-desk",
      "ConnectorName": "Zoho Desk",
      "State": "Enabled",
      "Owner": "user@example.com",
      "IsDefault": "No",
      "ByoaConnection": "No",
      "ElementInstanceId": 123456,
      "Folder": "Shared",
      "FolderKey": "f0f0f0f0-0000-0000-0000-000000000001",
      "Created": "2026-01-10T10:00:00.000Z",
      "Updated": "2026-01-10T10:00:00.000Z"
    }
  ]
}

如果禁用某些连接,则响应会在Data Warning 。非 UUID 的无效--folder-key会预先拒绝。

UIP 为连接导出​

导出所有文件夹中的每个连接,以进行审核。不接受任何参数或连接作用域选项,它将始终涵盖整个租户。

参数​

无。

示例​

uip is connections export
uip is connections export

数据形状(--输出 json)​

{
  "Code": "ConnectionExport",
  "Data": {
    "a1b2c3d4-0000-0000-0000-000000000001": {
      "id": "a1b2c3d4-0000-0000-0000-000000000001",
      "name": "Zoho Desk - Prod",
      "state": "Enabled"
    }
  }
}
{
  "Code": "ConnectionExport",
  "Data": {
    "a1b2c3d4-0000-0000-0000-000000000001": {
      "id": "a1b2c3d4-0000-0000-0000-000000000001",
      "name": "Zoho Desk - Prod",
      "state": "Enabled"
    }
  }
}

Data 是由连接 ID 作为键值的映射,而不是数组。当租户根本没有连接时,响应为 {"Code": "Message", "Data": {"Message": "No connections found to export."}}。

uip 为连接创建​

通过连接器的 OAuth 流程新建连接。CLI 将在浏览器中打开身份验证 URL(除非您传递--no-browser ),并轮询服务器以获取完成。轮询间隔:5 秒。总超时时间: 5 分钟。

参数​

名称必填用途
<connector-key>是连接器键,例如uipath-zoho-desk 。

选项​

短长值默认描述
—--no-browser标记关闭不自动打开浏览器;打印用于手动导航的 URL。
—--no-wait标记关闭立即返回待处理授权的详细信息 (SessionId,AuthUrl),而不是轮询完成。

示例​

uip is connections create uipath-zoho-desk

# Headless / CI-friendly — print the URL instead of launching a browser
uip is connections create uipath-zoho-desk --no-browser

# Return immediately with the pending session instead of polling
uip is connections create uipath-zoho-desk --no-browser --no-wait
uip is connections create uipath-zoho-desk

# Headless / CI-friendly — print the URL instead of launching a browser
uip is connections create uipath-zoho-desk --no-browser

# Return immediately with the pending session instead of polling
uip is connections create uipath-zoho-desk --no-browser --no-wait

数据形状(--输出 json)​

{
  "Code": "ConnectionCreated",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000010",
    "ConnectionName": "Zoho Desk",
    "Connector": "Zoho Desk",
    "State": "Enabled",
    "Owner": "user@example.com",
    "Folder": "Shared",
    "FolderKey": "f0f0f0f0-0000-0000-0000-000000000001"
  }
}
{
  "Code": "ConnectionCreated",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000010",
    "ConnectionName": "Zoho Desk",
    "Connector": "Zoho Desk",
    "State": "Enabled",
    "Owner": "user@example.com",
    "Folder": "Shared",
    "FolderKey": "f0f0f0f0-0000-0000-0000-000000000001"
  }
}

若使用 --no-wait,则响应为待处理授权:

{
  "Code": "ConnectionAuthorizationPending",
  "Data": {
    "Status": "AuthorizationPending",
    "SessionId": "s1000000-0000-0000-0000-000000000001",
    "AuthUrl": "https://.../authorize?...",
    "Instructions": "Open AuthUrl to authorize the connection, then run 'uip is connections list' or 'uip is connections ping <connection-id>' to verify the connection.",
    "Connector": "uipath-zoho-desk"
  }
}
{
  "Code": "ConnectionAuthorizationPending",
  "Data": {
    "Status": "AuthorizationPending",
    "SessionId": "s1000000-0000-0000-0000-000000000001",
    "AuthUrl": "https://.../authorize?...",
    "Instructions": "Open AuthUrl to authorize the connection, then run 'uip is connections list' or 'uip is connections ping <connection-id>' to verify the connection.",
    "Connector": "uipath-zoho-desk"
  }
}

故障模式:

  • 用户拒绝或身份验证失败: Failure与服务器的消息;退出1 。
  • 轮询超时(5 分钟): Failure: "Authentication timed out after 5 minutes" ;退出2 。
  • 轮询传输失败: Failure ;退出1 。
  • 已中断/已中止 (Ctrl+C): Failure ;退出1 。

UIP 是否为连接 ping​

检查连接当前是否已启用且可访问。

参数​

名称必填用途
<connection-id>是connections list或connections create返回的连接 ID (UUID)。

选项​

短长值默认描述
—--force-refresh标记关闭强制执行实时连接状态刷新,而不是使用缓存状态。

示例​

uip is connections ping a1b2c3d4-0000-0000-0000-000000000001

uip is connections ping a1b2c3d4-0000-0000-0000-000000000001 --force-refresh
uip is connections ping a1b2c3d4-0000-0000-0000-000000000001

uip is connections ping a1b2c3d4-0000-0000-0000-000000000001 --force-refresh

数据形状(--输出 json)​

{
  "Code": "ConnectionPing",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Enabled",
    "Message": "Connection is active."
  }
}
{
  "Code": "ConnectionPing",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Status": "Enabled",
    "Message": "Connection is active."
  }
}

禁用或无法访问的连接会发出Failure为Instructions: "Run 'uip is connections edit <id>' to re-authenticate."连接。

uip is 连接编辑​

重新验证现有连接。与create相同的 OAuth 流程,针对现有连接 ID,而不是颁发新连接 ID。相同的轮询合同和退出代码。

参数​

名称必填用途
<connection-id>是要重新验证的连接 ID。

选项​

短长值默认描述
—--no-browser标记关闭不自动打开浏览器;打印用于手动导航的 URL。
—--no-wait标记关闭立即返回待处理的授权详细信息,而不是轮询完成。

示例​

uip is connections edit a1b2c3d4-0000-0000-0000-000000000001

uip is connections edit a1b2c3d4-0000-0000-0000-000000000001 --no-browser
uip is connections edit a1b2c3d4-0000-0000-0000-000000000001

uip is connections edit a1b2c3d4-0000-0000-0000-000000000001 --no-browser

数据形状(--输出 json)​

{
  "Code": "ConnectionEdited",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "State": "Enabled"
  }
}
{
  "Code": "ConnectionEdited",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "State": "Enabled"
  }
}

如果使用 --no-wait,响应与上面的 create 下显示的待授权形状相同。

UIP 为连接重命名​

重命名现有连接。

参数​

名称必填用途
<connection-id>是要重命名的连接 ID。

选项​

短长值默认描述
—--nametext—必需。新的连接名称。不能为空。

示例​

uip is connections rename a1b2c3d4-0000-0000-0000-000000000001 \
    --name "Zoho Desk - Production"
uip is connections rename a1b2c3d4-0000-0000-0000-000000000001 \
    --name "Zoho Desk - Production"

数据形状(--输出 json)​

{
  "Code": "ConnectionRenamed",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Zoho Desk - Production"
  }
}
{
  "Code": "ConnectionRenamed",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Name": "Zoho Desk - Production"
  }
}

冲突或无效的新名称将失败,并指向Failure connections list以验证 ID 并选择不冲突的名称。

UIP 已设置-默认连接​

将连接标记为其连接器的默认连接 — 自动选取的连接,其中连接器仅允许一个活动的默认连接。

参数​

名称必填用途
<connection-id>是要设置为默认值的连接 ID。

示例​

uip is connections set-default a1b2c3d4-0000-0000-0000-000000000001
uip is connections set-default a1b2c3d4-0000-0000-0000-000000000001

数据形状(--输出 json)​

{
  "Code": "ConnectionSetDefault",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Message": "Connection set as default."
  }
}
{
  "Code": "ConnectionSetDefault",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Message": "Connection set as default."
  }
}

uip 为连接更新轮询间隔​

更改连接轮询事件的频率(由基于此连接构建的事件驱动的活动/触发器使用)。

参数​

名称必填用途
<connection-id>是要更新的连接 ID。

选项​

短长值默认描述
—--polling-interval分钟—必需。新的轮询间隔(以分钟为单位)。必须是正整数。

示例​

uip is connections update-polling-interval a1b2c3d4-0000-0000-0000-000000000001 \
    --polling-interval 15
uip is connections update-polling-interval a1b2c3d4-0000-0000-0000-000000000001 \
    --polling-interval 15

数据形状(--输出 json)​

{
  "Code": "ConnectionPollingIntervalUpdated",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "PollingIntervalInMinutes": 15
  }
}
{
  "Code": "ConnectionPollingIntervalUpdated",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "PollingIntervalInMinutes": 15
  }
}

发送任何请求之前,非整数或非正值客户端将失败。如果连接不支持可配置的轮询间隔,则服务器会拒绝该请求 — 请使用 connections list --refresh 验证连接 ID 并确认连接器支持轮询。

uip 为连接基本 URL​

获取连接当前解析为的 API 基本 URL — 根据连接器的基础 API 构建原始 HTTP 请求时实用。

参数​

名称必填用途
<connection-id>是要检查的连接 ID。

示例​

uip is connections base-url a1b2c3d4-0000-0000-0000-000000000001
uip is connections base-url a1b2c3d4-0000-0000-0000-000000000001

数据形状(--输出 json)​

{
  "Code": "ConnectionBaseUrl",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "BaseUrl": "https://api.example.com/v2"
  }
}
{
  "Code": "ConnectionBaseUrl",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "BaseUrl": "https://api.example.com/v2"
  }
}

点 connections list 无法验证 ID 并确认连接。Enabled

uip 正在删除连接​

删除连接。此操作不可撤销— CLI 从不提示。

参数​

名称必填用途
<connection-id>是要删除的连接 ID。

选项​

短长值默认描述
-y--yes标记—必需。确认此不可撤销的操作。

示例​

uip is connections delete a1b2c3d4-0000-0000-0000-000000000001 --yes
uip is connections delete a1b2c3d4-0000-0000-0000-000000000001 --yes

数据形状(--输出 json)​

{
  "Code": "ConnectionDeleted",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Message": "Connection deleted successfully."
  }
}
{
  "Code": "ConnectionDeleted",
  "Data": {
    "ConnectionId": "a1b2c3d4-0000-0000-0000-000000000001",
    "Message": "Connection deleted successfully."
  }
}

Failure 指向 connections list --all-folders 时无法找到未知的连接 ID。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新