uipath-cli
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath CLI 用户指南
uip df entities浏览和变异 Data Fabric 实体架构。实体是一种类型化的数据模型,即具有命名字段和类型的行形状。动词涵盖发现( list 、 get )和创作( create 、 update );记录级操作存在于uip df records中。update有意不支持字段删除。
大纲
uip df entities <verb> [options]
uip df entities <verb> [options]
动词
| 动词 | 用途 |
|---|---|
list | 列出租户中的所有实体;可选择排除联合用户组。 |
get | 返回单个实体的架构(包括所有字段)。 |
create | 根据 JSON 定义新建实体。 |
update | 更新实体的元数据或架构(添加或更新字段; removeFields会被拒绝)。 |
uip df 实体列表
列出租户中的所有实体。
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
| — | --native-only | 标记 | 关闭 | 仅显示原生实体;排除由外部连接器连接支持的联合实体。 |
示例
uip df entities list
uip df entities list --native-only
uip df entities list \
--output-filter 'Data[].{name:Name, id:ID, fields:FieldCount}'
uip df entities list
uip df entities list --native-only
uip df entities list \
--output-filter 'Data[].{name:Name, id:ID, fields:FieldCount}'
数据形状(--输出 json)
{
"Code": "EntityList",
"Data": [
{
"Name": "Invoice",
"DisplayName": "Invoice",
"ID": "a1b2c3d4-0000-0000-0000-000000000001",
"Type": "Standard",
"Source": "Native",
"Description": "Invoice records",
"FieldCount": 8
}
]
}
{
"Code": "EntityList",
"Data": [
{
"Name": "Invoice",
"DisplayName": "Invoice",
"ID": "a1b2c3d4-0000-0000-0000-000000000001",
"Type": "Standard",
"Source": "Native",
"Description": "Invoice records",
"FieldCount": 8
}
]
}
联合实体将Source报告为Federated或Federated (<connector>) 。
uip df 实体获取
返回单个实体的架构,包括所有字段。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<id> | 是 | 实体 ID (UUID)。使用entities list查找。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip df entities get a1b2c3d4-0000-0000-0000-000000000001
# Just the field list
uip df entities get a1b2c3d4-0000-0000-0000-000000000001 \
--output-filter 'Data.Fields[].{name:Name, type:Type}'
uip df entities get a1b2c3d4-0000-0000-0000-000000000001
# Just the field list
uip df entities get a1b2c3d4-0000-0000-0000-000000000001 \
--output-filter 'Data.Fields[].{name:Name, type:Type}'
数据形状(--输出 json)
{
"Code": "EntitySchema",
"Data": {
"Name": "Invoice",
"DisplayName": "Invoice",
"ID": "a1b2c3d4-0000-0000-0000-000000000001",
"Type": "Standard",
"Description": "Invoice records",
"Fields": [
{
"ID": "f1000000-0000-0000-0000-000000000001",
"Name": "id",
"DisplayName": "ID",
"Type": "Guid",
"Required": true,
"PrimaryKey": true,
"System": true
}
]
}
}
{
"Code": "EntitySchema",
"Data": {
"Name": "Invoice",
"DisplayName": "Invoice",
"ID": "a1b2c3d4-0000-0000-0000-000000000001",
"Type": "Standard",
"Description": "Invoice records",
"Fields": [
{
"ID": "f1000000-0000-0000-0000-000000000001",
"Name": "id",
"DisplayName": "ID",
"Type": "Guid",
"Required": true,
"PrimaryKey": true,
"System": true
}
]
}
}
uip df 实体创建
创建新实体。实体名称必须以字母开头,并且仅包含字母、数字和下划线。以内联方式 ( --body ) 或从文件中 ( --file ) 传递定义;注意:两者互斥。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<name> | 是 | 实体名称(以字母开头;仅限字母、数字和下划线)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
-f | --file | 路径 | — | 包含实体定义的 JSON 文件的路径(需要fields数组)。 |
| — | --body | JSON | — | 内联 JSON 实体定义。 |
实体定义对象:
{
"displayName": "Invoice",
"description": "Invoice records",
"isRbacEnabled": false,
"fields": [
{ "fieldName": "title", "type": "STRING" }
]
}
{
"displayName": "Invoice",
"description": "Invoice records",
"isRbacEnabled": false,
"fields": [
{ "fieldName": "title", "type": "STRING" }
]
}
每个字段必须包含fieldName字符串。有效的type值取自 SDK 的EntityFieldDataType枚举(例如STRING 、 DECIMAL 、 GUID 、 BOOLEAN 、 DATE 、 DATETIME )。无效类型将失败, ValidationError会列出允许的集合。
示例
uip df entities create Invoice --file ./invoice.entity.json
uip df entities create Invoice \
--body '{"displayName":"Invoice","fields":[{"fieldName":"amount","type":"DECIMAL"}]}'
uip df entities create Invoice --file ./invoice.entity.json
uip df entities create Invoice \
--body '{"displayName":"Invoice","fields":[{"fieldName":"amount","type":"DECIMAL"}]}'
数据形状(--输出 json)
{
"Code": "EntityCreated",
"Data": { "ID": "a1b2c3d4-0000-0000-0000-000000000001" }
}
{
"Code": "EntityCreated",
"Data": { "ID": "a1b2c3d4-0000-0000-0000-000000000001" }
}
uip df 实体更新
更新实体的元数据或架构。正文接受addFields 、 updateFields 、 displayName 、 description和isRbacEnabled 。removeFields被有意拒绝 — 不支持删除字段。每个addFields条目都需要fieldName ;每个updateFields条目都需要id (使用entities get发现字段 ID)。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<id> | 是 | 实体 ID (UUID)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
-f | --file | 路径 | — | 包含更新选项的 JSON 文件的路径。 |
| — | --body | JSON | — | 内联 JSON 更新选项。 |
示例
# Add a field
uip df entities update a1b2c3d4-0000-0000-0000-000000000001 \
--body '{"addFields":[{"fieldName":"status","type":"STRING"}]}'
# Rename an existing field
uip df entities update a1b2c3d4-0000-0000-0000-000000000001 \
--body '{"updateFields":[{"id":"f1000000-0000-0000-0000-000000000002","displayName":"Total"}]}'
# Add a field
uip df entities update a1b2c3d4-0000-0000-0000-000000000001 \
--body '{"addFields":[{"fieldName":"status","type":"STRING"}]}'
# Rename an existing field
uip df entities update a1b2c3d4-0000-0000-0000-000000000001 \
--body '{"updateFields":[{"id":"f1000000-0000-0000-0000-000000000002","displayName":"Total"}]}'
数据形状(--输出 json)
{
"Code": "EntityUpdated",
"Data": { "ID": "a1b2c3d4-0000-0000-0000-000000000001" }
}
{
"Code": "EntityUpdated",
"Data": { "ID": "a1b2c3d4-0000-0000-0000-000000000001" }
}
相关内容
uip df records— 管理这些实体拥有的行。uip df files— 记录上的文件附件。uip vss generate— 从 Data Fabric 架构导出文件生成 TypeScript 类型。