更新实体
功能介绍
更新实体。
URI
PUT /v3/{project_id}/abm/instances/{instance_id}/metadata3/entities/{entity_urn}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
entity_urn |
是 |
String |
实例urn。 |
|
project_id |
是 |
String |
项目ID,获取方法请参考获取项目ID。 |
|
instance_id |
是 |
String |
实例的ID。
|
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
package_id |
是 |
String |
模型包ID。
|
|
entity_name |
是 |
String |
实体名称。
|
|
entity_type |
是 |
String |
实体类型。
|
|
subtype |
否 |
String |
实体子类型。 最大长度:50 |
|
entity_attributes |
否 |
Array of 表4 objects |
实体属性。 |
|
signatures |
否 |
Array of 表3 objects |
特征。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
signature_type |
是 |
String |
特征类型。 最大长度:150 |
|
signature_name |
否 |
String |
特征名称。 最大长度:200 |
|
signature_attributes |
否 |
Array of 表4 objects |
特征属性。 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
package_id |
String |
模型包ID。 |
|
entity_urn |
String |
实体urn。 |
|
entity_name |
String |
实体名称。 |
|
entity_type |
String |
实体类别。 |
|
entity_attributes |
Array of 表7 objects |
实体属性。 |
|
signatures |
Array of 表6 objects |
特征。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
signature_name |
String |
特征名称。 |
|
signature_type |
String |
特征类型。 |
|
signature_attributes |
Array of 表7 objects |
特征属性。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
attribute_id |
String |
属性ID。 |
|
attribute_value |
String |
属性值。 |
|
attribute_code |
String |
属性编码。 |
|
attribute_name |
String |
属性名称。 |
|
attribute_name_en |
String |
属性英文名称。 |
状态码: 400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码: 500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
请求示例
PUT https://{endpoint}/v3/{project_id}/abm/instances/{instance_id}/metadata3/entities/{entity_urn}
{
"package_id": "Metamodel3",
"entity_name": "主题域02",
"entity_type": "Metamodel3-SubjectArea",
"entity_attributes": [
{
"attribute_id": "Metamodel3-SubjectArea-NAME",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-SubjectArea-PermissionCode",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-SubjectArea-OrderNumber",
"attribute_value": ""
},
{
"attribute_id": "entity_name",
"attribute_value": "主题域02"
}
],
"signatures": [
{
"signature_name": "测试",
"signature_type": "Metamodel3-descriptionInfo",
"signature_attributes": [
{
"attribute_id": "Metamodel3-descriptionInfo-NAME",
"attribute_value": "测试"
},
{
"attribute_id": "Metamodel3-descriptionInfo-description",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-descriptionInfo-nameEn",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-descriptionInfo-nameCn",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-descriptionInfo-dataAssetNumber",
"attribute_value": ""
}
]
},
{
"signature_name": "",
"signature_type": "Metamodel3-maintenanceInfo",
"signature_attributes": [
{
"attribute_id": "Metamodel3-maintenanceInfo-NAME",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-maintenanceInfo-createdBy",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-maintenanceInfo-createTime",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-maintenanceInfo-updatedBy",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-maintenanceInfo-updateTime",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-maintenanceInfo-creatorAccount",
"attribute_value": ""
},
{
"attribute_id": "Metamodel3-maintenanceInfo-updaterAccount",
"attribute_value": ""
}
]
}
]
}
响应示例
状态码: 200
successful operation
{
"entity_type": "Metamodel3-SubjectArea",
"entity_attributes": [
{
"attribute_id": "Metamodel3-SubjectArea-NAME",
"attribute_name_en": "NAME",
"attribute_name": "名称",
"attribute_value": "",
"attribute_code": "NAME"
},
{
"attribute_id": "Metamodel3-SubjectArea-PermissionCode",
"attribute_name_en": "PermissionCode",
"attribute_name": "权限编码",
"attribute_value": "",
"attribute_code": "PermissionCode"
},
{
"attribute_id": "Metamodel3-SubjectArea-OrderNumber",
"attribute_name_en": "OrderNumber",
"attribute_name": "顺序值",
"attribute_value": "",
"attribute_code": "OrderNumber"
},
{
"attribute_id": "entity_name",
"attribute_name_en": null,
"attribute_name": null,
"attribute_value": "主题域02",
"attribute_code": null
}
],
"entity_urn": "urn:abm:Metamodel3-SubjectArea:e0ee33d38c01167db2c63695f20929",
"entity_name": "主题域02",
"package_id": "Metamodel3",
"signatures": [
{
"signature_attributes": [
{
"attribute_id": "Metamodel3-descriptionInfo-NAME",
"attribute_name_en": "NAME",
"attribute_name": "名称",
"attribute_value": "测试",
"attribute_code": "NAME"
},
{
"attribute_id": "Metamodel3-descriptionInfo-description",
"attribute_name_en": "Description",
"attribute_name": "描述内容",
"attribute_value": "",
"attribute_code": "description"
},
{
"attribute_id": "Metamodel3-descriptionInfo-nameEn",
"attribute_name_en": "NameEn",
"attribute_name": "英文名",
"attribute_value": "",
"attribute_code": "nameEn"
},
{
"attribute_id": "Metamodel3-descriptionInfo-nameCn",
"attribute_name_en": "NameCn",
"attribute_name": "中文名",
"attribute_value": "",
"attribute_code": "nameCn"
},
{
"attribute_id": "Metamodel3-descriptionInfo-dataAssetNumber",
"attribute_name_en": "DataAssetNumber",
"attribute_name": "资产编码",
"attribute_value": "",
"attribute_code": "dataAssetNumber"
}
],
"signature_name": "测试",
"version": "0",
"signature_type": "Metamodel3-descriptionInfo"
},
{
"signature_attributes": [
{
"attribute_id": "Metamodel3-maintenanceInfo-NAME",
"attribute_name_en": "NAME",
"attribute_name": "名称",
"attribute_value": "",
"attribute_code": "NAME"
},
{
"attribute_id": "Metamodel3-maintenanceInfo-createdBy",
"attribute_name_en": "CreatedBy",
"attribute_name": "创建人",
"attribute_value": "",
"attribute_code": "createdBy"
},
{
"attribute_id": "Metamodel3-maintenanceInfo-createTime",
"attribute_name_en": "CreateTime",
"attribute_name": "创建时间",
"attribute_value": "",
"attribute_code": "createTime"
},
{
"attribute_id": "Metamodel3-maintenanceInfo-updatedBy",
"attribute_name_en": "UpdatedBy",
"attribute_name": "修改人",
"attribute_value": "",
"attribute_code": "updatedBy"
},
{
"attribute_id": "Metamodel3-maintenanceInfo-updateTime",
"attribute_name_en": "UpdateTime",
"attribute_name": "修改时间",
"attribute_value": "",
"attribute_code": "updateTime"
},
{
"attribute_id": "Metamodel3-maintenanceInfo-creatorAccount",
"attribute_name_en": "CreatorAccount",
"attribute_name": "创建账号",
"attribute_value": "",
"attribute_code": "creatorAccount"
},
{
"attribute_id": "Metamodel3-maintenanceInfo-updaterAccount",
"attribute_name_en": "UpdaterAccount",
"attribute_name": "修改账号",
"attribute_value": "",
"attribute_code": "updaterAccount"
}
],
"signature_name": "",
"version": "0",
"signature_type": "Metamodel3-maintenanceInfo"
}
]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
successful operation. |
|
400 |
Bad Request. |
|
500 |
Internal Server Error. |
错误码
请参见错误码。