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

uip 为资源

Syntax and options for `uip is resources`, which lists, describes, and runs operations against connector data-plane objects.

uip is resources适用于连接器处理的运行时对象 - 工单、联系人、记录、文件。list枚举连接器的对象, describe返回一个对象的字段架构和操作, run针对连接调用连接器的数据平面(创建/列出/获取/更新/替换/删除)。每个run动词都需要--connection-id ;缓存的元数据读取( listdescribe )时,请选择是否接受它以显示自定义对象/字段。

重要提示:

The data-plane verb group is uip is resources run, not executeuip is resources execute ... doesn't exist and fails with "unknown command".

大纲

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

动词

动词用途
list列出连接器上的可用对象;可选择按操作筛选。
describe描述一个对象的操作和字段架构。
run调用连接器的数据平面(创建/列出/获取/更新/替换/删除)。

uip 是资源列表

列出连接器上的可用对象。结果取决于是否提供--connection-id — 连接作用域列表包括自定义对象;无作用域列表则不需要(在这种情况下,CLI 显示Warning )。

参数

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

选项

默认描述
--operation枚举按操作筛选: ListRetrieveCreateUpdateDeleteReplace
--connection-idid作用域到特定连接(启用自定义对象)。
--refresh标记关闭强制从 API 重新获取,忽略缓存。

示例

uip is resources list uipath-zoho-desk

# Only objects that support a Create operation
uip is resources list uipath-zoho-desk --operation Create

# Connection-scoped listing — includes custom objects
uip is resources list uipath-zoho-desk \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001
uip is resources list uipath-zoho-desk

# Only objects that support a Create operation
uip is resources list uipath-zoho-desk --operation Create

# Connection-scoped listing — includes custom objects
uip is resources list uipath-zoho-desk \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001

数据形状(--输出 json)

{
  "Code": "ResourceList",
  "Data": [
    {
      "Name": "tickets",
      "DisplayName": "Tickets",
      "Path": "/tickets",
      "Type": "standard",
      "SubType": "standard",
      "Custom": "no",
      "ElementKey": "uipath-zoho-desk"
    }
  ]
}
{
  "Code": "ResourceList",
  "Data": [
    {
      "Name": "tickets",
      "DisplayName": "Tickets",
      "Path": "/tickets",
      "Type": "standard",
      "SubType": "standard",
      "Custom": "no",
      "ElementKey": "uipath-zoho-desk"
    }
  ]
}

uip 是资源描述

描述对象的字段和操作。如果没有--operation ,则返回可用操作的列表和提示。使用--operation ,可以缩小到一个操作,并返回其参数、请求字段和响应字段。

参数

名称必填用途
<connector-key>连接器密钥。
<object-name>Object name — the objectName from the activity's configuration JSON (for example, tickets). Find names with resources list. Addresses the object the same way under both --activity-version values (see below).

选项

默认描述
--connection-ididScope to a connection (enables custom fields; required together with --field).
--operation枚举List, Retrieve, Create, Update, Delete, or Replace. Required together with --field.
--activity-version1.0.0 | 4.0.01.0.0Which activity metadata endpoints to query — see Activity metadata versions below.
-f--fieldname=valueParent-field value. Repeatable. Runs the connector's api-type ObjectAction (for example Jira's GenerateSchema, Salesforce's GenerateQuerySchema) and merges its custom-field response into requestFields. Requires both --connection-id and --operation. Not supported with --activity-version 4.0.0.
--actionname已推断Explicit api-type ObjectAction name (for example GenerateSchema). Optional — inferred from the --field names when omitted; pass it to disambiguate when more than one action could match.
--refresh标记关闭Force re-fetch from the API, ignoring cache. Cache is also automatically bypassed whenever --field is supplied, since a design-action response varies per parent-field combination.

Activity metadata versions

--activity-version switches which Integration Service metadata endpoint describe queries:

  • 1.0.0 (default) — v3 elements endpoints, connection-scoped. Supports -f/--field design-action lookups.
  • 4.0.0 — v4 elements endpoints, not connection-scoped. Passing --connection-id alongside it is accepted but ignored (with a warning) since v4 doesn't need it for the fetch itself. -f/--field is rejected outright with --activity-version 4.0.0 — design-time ObjectActions are a v3-only, instance-scoped feature.

In both cases the <object-name> positional means the same thing — the object's name — so there's no addressing difference between the two versions, only which backend endpoint answers the call.

示例

# List operations available on this object (v3, default)
uip is resources describe uipath-zoho-desk tickets

# Field schema for the Create operation
uip is resources describe uipath-zoho-desk tickets --operation Create

# Required request fields, scripting-friendly
uip is resources describe uipath-zoho-desk tickets --operation Create \
    --output-filter 'Data.requestFields[?required].name'

# Describe a 4.0.0 activity by object name (v4 elements endpoints)
uip is resources describe uipath-salesforce-slack add_users_to_usergroup \
    --activity-version 4.0.0

# Parent-field values (Jira: project + issue type → custom fields for that combination)
uip is resources describe uipath-atlassian-jira curated_create_issue \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --operation Create \
    -f fields.project.key=ENGCE -f fields.issuetype.id=3

# Body-token parent field (Salesforce SOQL: query → response columns)
uip is resources describe uipath-salesforce-sfdc query_records \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --operation Create \
    -f query="SELECT Id, Name FROM Account WHERE Status = 'Active'"
# List operations available on this object (v3, default)
uip is resources describe uipath-zoho-desk tickets

# Field schema for the Create operation
uip is resources describe uipath-zoho-desk tickets --operation Create

# Required request fields, scripting-friendly
uip is resources describe uipath-zoho-desk tickets --operation Create \
    --output-filter 'Data.requestFields[?required].name'

# Describe a 4.0.0 activity by object name (v4 elements endpoints)
uip is resources describe uipath-salesforce-slack add_users_to_usergroup \
    --activity-version 4.0.0

# Parent-field values (Jira: project + issue type → custom fields for that combination)
uip is resources describe uipath-atlassian-jira curated_create_issue \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --operation Create \
    -f fields.project.key=ENGCE -f fields.issuetype.id=3

# Body-token parent field (Salesforce SOQL: query → response columns)
uip is resources describe uipath-salesforce-sfdc query_records \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --operation Create \
    -f query="SELECT Id, Name FROM Account WHERE Status = 'Active'"
备注:

If a -f/--field call comes back holding only the fields you supplied (none of the connection's own custom fields), the response also carries a Warning: one of the values you passed probably doesn't exist on that connection. Check it against the lookup for that field.

数据形状(--输出 json)

没有--operation

{
  "Code": "ResourceMetadata",
  "Data": {
    "name": "tickets",
    "displayName": "Tickets",
    "elementKey": "uipath-zoho-desk",
    "availableOperations": [
      { "method": "GET", "name": "List", "description": "Search for Tickets", "path": "/tickets" },
      { "method": "POST", "name": "Create", "description": "Create a Tickets", "path": "/tickets" }
    ],
    "hint": "Use --operation <Create|List|Retrieve|Update|Delete|Replace> to see fields for a specific operation."
  }
}
{
  "Code": "ResourceMetadata",
  "Data": {
    "name": "tickets",
    "displayName": "Tickets",
    "elementKey": "uipath-zoho-desk",
    "availableOperations": [
      { "method": "GET", "name": "List", "description": "Search for Tickets", "path": "/tickets" },
      { "method": "POST", "name": "Create", "description": "Create a Tickets", "path": "/tickets" }
    ],
    "hint": "Use --operation <Create|List|Retrieve|Update|Delete|Replace> to see fields for a specific operation."
  }
}

使用--operation Create时,系统会返回相同的Code: "ResourceMetadata" ,但有效负载不是availableOperations ,而是带有operationparametersrequestFieldsresponseFields

With -f/--field (parent-field / design-action lookup), requestFields reflects the merged, connection-specific schema:

{
  "Code": "ResourceMetadata",
  "Data": {
    "name": "curated_create_issue",
    "operation": { "method": "POST", "name": "Create" },
    "requestFields": [
      { "name": "fields.project.key", "required": true, "displayName": "Project" },
      { "name": "fields.issuetype.id", "required": true, "displayName": "Issue type" },
      { "name": "fields.summary", "required": true, "displayName": "Summary" },
      { "name": "fields.description", "required": false, "displayName": "Description" }
    ]
  }
}
{
  "Code": "ResourceMetadata",
  "Data": {
    "name": "curated_create_issue",
    "operation": { "method": "POST", "name": "Create" },
    "requestFields": [
      { "name": "fields.project.key", "required": true, "displayName": "Project" },
      { "name": "fields.issuetype.id", "required": true, "displayName": "Issue type" },
      { "name": "fields.summary", "required": true, "displayName": "Summary" },
      { "name": "fields.description", "required": false, "displayName": "Description" }
    ]
  }
}

uip is resources run

Call the connector's data plane. run itself is a group; the actual verbs are create, list, get, update, replace, and delete. Every verb requires --connection-id; create, update, and replace additionally require --body with a JSON request body. delete is destructive and requires -y, --yes — the CLI never prompts.

uip is resources run create   <connector-key> <object-name> --connection-id <id> --body <json>
uip is resources run list     <connector-key> <object-name> --connection-id <id>
uip is resources run get      <connector-key> <object-name> --connection-id <id> [--query <params>]
uip is resources run update   <connector-key> <object-name> --connection-id <id> --body <json>
uip is resources run replace  <connector-key> <object-name> --connection-id <id> --body <json>
uip is resources run delete   <connector-key> <object-name> --connection-id <id> -y, --yes [--query <params>]
uip is resources run create   <connector-key> <object-name> --connection-id <id> --body <json>
uip is resources run list     <connector-key> <object-name> --connection-id <id>
uip is resources run get      <connector-key> <object-name> --connection-id <id> [--query <params>]
uip is resources run update   <connector-key> <object-name> --connection-id <id> --body <json>
uip is resources run replace  <connector-key> <object-name> --connection-id <id> --body <json>
uip is resources run delete   <connector-key> <object-name> --connection-id <id> -y, --yes [--query <params>]

HTTP 方法映射: create → POST, list → GET(集合), get → 按 ID GET, update → PATCH, replace → PUT, delete → DELETE。

参数

名称必填用途
<connector-key>连接器密钥。
<object-name>对象名称(例如tickets )。

共享选项

默认描述
--connection-idid必填用于授权数据平面调用的连接。
--query参数查询参数。接受key=value&key=value或 JSON 对象。
--bodyJSON请求正文。对于createupdatereplace为必要项。
-y--yes标记Required on delete only. Confirms this irreversible operation — the CLI never prompts.

示例

# Create a ticket
uip is resources run create uipath-zoho-desk tickets \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --body '{"subject":"New issue","departmentId":"DEP-1"}'

# List tickets — first page
uip is resources run list uipath-zoho-desk tickets \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001

# Delete a ticket by ID — destructive, requires --yes
uip is resources run delete uipath-zoho-desk tickets \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --query 'id=TK-1001' \
    --yes
# Create a ticket
uip is resources run create uipath-zoho-desk tickets \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --body '{"subject":"New issue","departmentId":"DEP-1"}'

# List tickets — first page
uip is resources run list uipath-zoho-desk tickets \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001

# Delete a ticket by ID — destructive, requires --yes
uip is resources run delete uipath-zoho-desk tickets \
    --connection-id a1b2c3d4-0000-0000-0000-000000000001 \
    --query 'id=TK-1001' \
    --yes

数据形状(--输出 json)

{
  "Code": "ExecuteOperation",
  "Data": { "id": "TK-1001", "subject": "New issue", "status": "Open" }
}
{
  "Code": "ExecuteOperation",
  "Data": { "id": "TK-1001", "subject": "New issue", "status": "Open" }
}

list操作返回{ "items": [...] } ,当后端通过Elements-Has-More / Elements-Next-Page-Token标头发出更多页面信号时,请在其中包含具有HasMoreNextPageToken Pagination对象。

失败的调用会显示为Failure ,HTTP 状态为Message ,服务器正文为Instructions

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新