- 概述
- 开始使用
- 概念
- 使用 UiPath CLI
- 操作指南
- CI/CD 方法
- 命令参考
- 迁移
- 参考与支持
uip ah 类别、标签、协作者、角色、用户
Automation Hub 类别分类的语法和选项、自由文本标签、每个自动化的协作者、可分配的角色目录和用户帐户。
类别是放置自动化的层次结构分类;标签是自由文本标签。协作者是处理一个自动化的人员,每个自动化担任一个或多个角色— Automation Hub 的可分配角色目录也是uip ah users create授予租户范围内访问权限的方式。请参阅uip ah ,了解适用于每个动词的共同概念(投影/ --all-fields 、分页与不分页列表)。
uip ah 类别
读取类别层次结构,并在其中放置自动化。
大纲
uip ah categories get [--all-fields]
uip ah categories update --file <json-file> [-y, --yes]
uip ah categories set <automation-id> --category-id <id>
uip ah categories get [--all-fields]
uip ah categories update --file <json-file> [-y, --yes]
uip ah categories set <automation-id> --category-id <id>
uip ah 类别获取
获取一树形式的类别层次结构,并包含其级别名称。get,而不是 list:端点返回一个嵌套文档,而不是分页集合 — 没有 --limit/--offset。
选项
| 长 | 描述 |
|---|---|
--all-fields | 返回原始有效负载,而不是 Levels/Categories。 |
示例
uip ah categories get
uip ah categories get
数据形状(--输出 json)
{
"Code": "AhCategoriesGet",
"Data": { "Levels": [{ "Id": 1, "Name": "Business Unit" }], "Categories": [{ "Id": 4, "Name": "Finance" }] }
}
{
"Code": "AhCategoriesGet",
"Data": { "Levels": [{ "Id": 1, "Name": "Business Unit" }], "Categories": [{ "Id": 4, "Name": "Finance" }] }
}
uip ah 类别更新
从文件中替换整个类别树。Automation Hub 无法按类别创建/删除 — 树作为一个文档同步。
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--file <json-file> | 路径 | 是 | 具有要同步的完整类别树的 JSON 将以 categories get 形式返回。 |
-y, --yes | 标记 | 是 | 确认这将替换整个租户类别树。必需 — CLI 从不提示。 |
在发送请求之前,客户端会拒绝空文件或明显格式错误的文件。
示例
uip ah categories update --file ./categories.json --yes
uip ah categories update --file ./categories.json --yes
数据形状(--输出 json)
{ "Code": "AhCategoriesUpdate", "Data": { "Status": "Synced" } }
{ "Code": "AhCategoriesUpdate", "Data": { "Status": "Synced" } }
uip ah 类别已设置
将一个自动化分配给类别。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<automation-id> | 是 | 自动化 ID。 |
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--category-id <id> | 整数 | 是 | 要分配的类别 ID。 |
示例
uip ah categories set 20 --category-id 4
uip ah categories set 20 --category-id 4
数据形状(--输出 json)
{ "Code": "AhCategoriesSet", "Data": { "AutomationId": 20, "CategoryId": 4 } }
{ "Code": "AhCategoriesSet", "Data": { "AutomationId": 20, "CategoryId": 4 } }
uip ah 标签
为自动化设置标签。
uip ah 标签已设置
将自动化标签替换为给定标签集—这将替换整个标签列表,而不是合并(匹配 uip config set 的替换语义)。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<automation-id> | 是 | 自动化 ID。 |
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--tags <tag...> | 可重复 | 是 | 为此自动化设置的完整标签。 |
示例
uip ah tags set 20 --tags finance "quick win"
uip ah tags set 20 --tags finance "quick win"
数据形状(--输出 json)
{ "Code": "AhTagsSet", "Data": { "AutomationId": 20, "Tags": ["finance", "quick win"] } }
{ "Code": "AhTagsSet", "Data": { "AutomationId": 20, "Tags": ["finance", "quick win"] } }
uip ah 协作者
管理自动化协作者。其自己的资源组,而不是 automations 上的动词,因此标准 CRUD 动词仍可用。
大纲
uip ah collaborators list --automation-id <id> [--limit <n>] [--offset <n>] [--all-fields]
uip ah collaborators create <automation-id> --user-id <id...> --role-id <id...>
uip ah collaborators delete <automation-id> --user-id <id...> --role-id <id...> [-y, --yes]
uip ah collaborators list --automation-id <id> [--limit <n>] [--offset <n>] [--all-fields]
uip ah collaborators create <automation-id> --user-id <id...> --role-id <id...>
uip ah collaborators delete <automation-id> --user-id <id...> --role-id <id...> [-y, --yes]
uip ah 协作者列表
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--automation-id <id> | 整数 | 是 | 要读取的自动化(此端点的查询参数,而非位置参数)。 |
--limit <n> / --offset <n> | 整数 | 否 | 分页,客户端应用(未分页端点)。 |
--all-fields | 标记 | 否 | 返回原始有效负载。 |
示例
uip ah collaborators list --automation-id 20
uip ah collaborators list --automation-id 20
数据形状(--输出 json)
{
"Code": "AhCollaboratorsList",
"Data": [
{ "Id": 1, "Email": "jane@acme.com", "FirstName": "Jane", "LastName": "Doe", "JobTitle": "Analyst", "Department": "Finance", "BusinessUnit": "EMEA", "IsActive": 1 }
]
}
{
"Code": "AhCollaboratorsList",
"Data": [
{ "Id": 1, "Email": "jane@acme.com", "FirstName": "Jane", "LastName": "Doe", "JobTitle": "Analyst", "Department": "Finance", "BusinessUnit": "EMEA", "IsActive": 1 }
]
}
uip ah 协作者创建
向自动化中添加协作者。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<automation-id> | 是 | 自动化 ID。 |
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--user-id <id...> | 可重复 | 是 | 要添加的用户 ID。 |
--role-id <id...> | 可重复 | 是 | 向每个添加的用户授予角色 ID(应用于所有用户 — 如果要按用户拆分角色,每个用户需要调用一次)。仅接受类型为 process 的活动角色;端点拒绝任何其他类型。 |
至少需要一个 --role-id — 端点会拒绝无角色的协作者条目。
示例
uip ah collaborators create 20 --user-id 3 --role-id 3
uip ah collaborators create 20 --user-id 3 --role-id 3
数据形状(--输出 json)
{ "Code": "AhCollaboratorsCreate", "Data": { "AutomationId": 20, "UserIds": [3] } }
{ "Code": "AhCollaboratorsCreate", "Data": { "AutomationId": 20, "UserIds": [3] } }
uip ah 协作者删除
删除用户在自动化项目中的协作者角色。端点会删除角色分配,而不是协作者记录,因此 --role-id 为必要项 — 去除用户拥有的每个角色后,他们将不再是协作者。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<automation-id> | 是 | 自动化 ID。 |
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--user-id <id...> | 可重复 | 是 | 要从中删除角色的用户 ID。 |
--role-id <id...> | 可重复 | 是 | 要从每个用户中删除的角色 ID。 |
-y, --yes | 标记 | 是 | 确认此不可逆操作。必需 — CLI 从不提示。 |
示例
uip ah collaborators delete 20 --user-id 3 --role-id 3 --yes
uip ah collaborators delete 20 --user-id 3 --role-id 3 --yes
数据形状(--输出 json)
{ "Code": "AhCollaboratorsDelete", "Data": { "AutomationId": 20, "UserIds": [3], "RoleIds": [3] } }
{ "Code": "AhCollaboratorsDelete", "Data": { "AutomationId": 20, "UserIds": [3], "RoleIds": [3] } }
uip ah 角色
探索可分配的 Automation Hub 角色。只读。
uip ah 角色列表
选项
| 长 | 描述 |
|---|---|
--limit <n> / --offset <n> | 分页,客户端应用(未分页端点)。 |
--all-fields | 返回原始有效负载。 |
示例
uip ah roles list
uip ah roles list
数据形状(--输出 json)
{
"Code": "AhRolesList",
"Data": [
{ "Id": 2, "Name": "System Admin", "Slug": "ah-system-admin", "Type": "service", "Description": "...", "IsActive": 1, "IsDefault": 0 }
]
}
{
"Code": "AhRolesList",
"Data": [
{ "Id": 2, "Name": "System Admin", "Slug": "ah-system-admin", "Type": "service", "Description": "...", "IsActive": 1, "IsDefault": 0 }
]
}
Slug 是 uip ah users create --role 的值; Id/Type 是 collaborators create --role-id 筛选的内容(仅接受 Type: "process" 角色)。
uip ah 用户
管理 Automation Hub 用户及其角色。
大纲
uip ah users list [--search <text>] [--sort-by <field>] [--sort-order asc|desc] [--department <name>] [--business-unit <name>] [--location <name>] [--job-title <title>] [--invite-status <status>] [--role <slug>] [--limit <n>] [--offset <n>] [--all-fields]
uip ah users create --email <email> [write options...] --role-id <id...>
uip ah users update --email <email> [write options...]
uip ah users list [--search <text>] [--sort-by <field>] [--sort-order asc|desc] [--department <name>] [--business-unit <name>] [--location <name>] [--job-title <title>] [--invite-status <status>] [--role <slug>] [--limit <n>] [--offset <n>] [--all-fields]
uip ah users create --email <email> [write options...] --role-id <id...>
uip ah users update --email <email> [write options...]
uip ah 用户列表
选项
| 长 | 值 | 描述 |
|---|---|---|
--search <text> | 字符串 | 自由文本搜索。 |
--sort-by <field> | 字符串 | 要排序的字段,例如user_email。 |
--sort-order <direction> | asc|desc | 排序方向 |
--department <name> / --business-unit <name> / --location <name> / --job-title <title> | 字符串 | 作用域筛选器。 |
--invite-status <status> | 字符串 | 仅限此邀请状态。 |
--role <slug> | 字符串 | 仅适用于拥有此角色缩略名的用户。 |
--limit <n> / --offset <n> | 整数 | 分页。默认 --limit 20。 |
--all-fields | 标记 | 返回原始有效负载。 |
示例
uip ah users list --department Finance --limit 20
uip ah users list --department Finance --limit 20
数据形状(--输出 json)
{
"Code": "AhUsersList",
"Data": [
{ "Id": 3, "Email": "jane@acme.com", "FirstName": "Jane", "LastName": "Doe", "JobTitle": "Analyst", "Department": "Finance", "BusinessUnit": "EMEA", "Location": "Boston", "IsAdmin": 0, "IsActive": 1, "InviteStatus": 2, "AutomationCount": 3 }
],
"Pagination": { "Returned": 1, "Limit": 20, "Offset": 0 }
}
{
"Code": "AhUsersList",
"Data": [
{ "Id": 3, "Email": "jane@acme.com", "FirstName": "Jane", "LastName": "Doe", "JobTitle": "Analyst", "Department": "Finance", "BusinessUnit": "EMEA", "Location": "Boston", "IsAdmin": 0, "IsActive": 1, "InviteStatus": 2, "AutomationCount": 3 }
],
"Pagination": { "Returned": 1, "Limit": 20, "Offset": 0 }
}
uip ah 用户创建
将现有 Automation Cloud 用户添加到 Automation Hub。这将导入组织中已存在的用户 — 无法邀请新用户,并且如果 Automation Cloud 未知地址,并且会失败并显示明确的指令错误。
选项
| 长 | 值 | 必填 | 描述 |
|---|---|---|---|
--email <email> | 电子邮件 | 是 | 用户电子邮件地址。 |
--first-name <name> / --last-name <name> | 字符串 | 有条件地 | 服务在写入时需要(见下文)。 |
--job-title <title> / --department <name> / --business-unit <name> / --location <name> | 字符串 | 有条件地 | 服务在写入时需要。 |
--invite-status <status> | 整数 | 否 | Automation Hub 邀请状态代码的数字。创建时的默认 2。 |
--active | 标记 | 否 | 将用户标记为活动。创建时的默认值。与 --inactive 冲突。 |
--inactive | 标记 | 否 | 将用户标记为不活动。与 --active 冲突。 |
--role-id <id...> | 可重复 | 否 | 要分配的角色 ID(对于 ID,为 uip ah roles list)。 |
Automation Hub 需要九个字段,以便在每次写入时携带值(email、first-name、last-name、business-unit、department、location、job-title、invite-status、active/inactive)— 在 create,没有一个字段具有存储的回退功能,因此任何省略的字段都无法在客户端准确命名要传递的标志。
示例
uip ah users create --email jane@acme.com --first-name Jane --last-name Doe \
--job-title Analyst --department Finance --business-unit EMEA --location Boston --role-id 3
uip ah users create --email jane@acme.com --first-name Jane --last-name Doe \
--job-title Analyst --department Finance --business-unit EMEA --location Boston --role-id 3
数据形状(--输出 json)
{ "Code": "AhUsersCreate", "Data": { "Email": "jane@acme.com", "Status": "Created" } }
{ "Code": "AhUsersCreate", "Data": { "Email": "jane@acme.com", "Status": "Created" } }
uip ah 用户更新
更新 --email 找到的用户。Automation Hub 会在写入时替换整个用户记录,因此您没有传递的字段将从存储的记录中继承 — — 不同之处在于,如果标志和存储的记录上的九个必填字段中的任何字段为空,则服务仍会拒绝写入。
选项
与 create 相同标志,但仅需要 --email — 其余部分用于填充现有记录中的空白。
示例
uip ah users update --email jane@acme.com --job-title 'Senior Analyst'
uip ah users update --email jane@acme.com --job-title 'Senior Analyst'
数据形状(--输出 json)
{ "Code": "AhUsersUpdate", "Data": { "Email": "jane@acme.com", "Status": "Updated" } }
{ "Code": "AhUsersUpdate", "Data": { "Email": "jane@acme.com", "Status": "Updated" } }
相关内容
uip ah— 概述、概念、audit-logs、auth-info。- 自动化、概念流程、业务用例、阶段、问卷调查、管道
- 应用程序、组件、文档、媒体、商店列表、商店评论