添加实体
功能介绍
添加实体。
URI
POST /v3/{project_id}/abm/instances/{instance_id}/metadata3/entities
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID,获取方法请参考获取项目ID。 |
instance_id | 是 | String | 实例的ID。
|
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
entities | 是 | Array of 表3 objects | 实体请求列表,最大个数不超过200个。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
package_id | 是 | String | 模型包ID。
|
entity_name | 是 | String | 实体名称。
|
entity_type | 是 | String | 实体类型。
|
subtype | 否 | String | 实体子类型。 最大长度:50 |
entity_attributes | 否 | Array of 表5 objects | 实体属性。 |
signatures | 否 | Array of 表4 objects | 特征。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
signature_type | 是 | String | 特征类型。 |
signature_name | 否 | String | 特征名称。 |
signature_attributes | 否 | Array of 表5 objects | 特征属性。 |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
entity_urn | String | 实体urn。 |
entity_name | String | 实体名称。 |
entity_type | String | 实体类别。 |
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误信息。 |
entity_name | String | 实体名称。 |
entity_type | String | 实体类别。 |
状态码: 400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
状态码: 500
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 错误码。 |
error_msg | String | 错误描述。 |
请求示例
POST https://{endpoint}/v3/{project_id}/abm/instances/{instance_id}/metadata3/entities
{
"entities": [
{
"package_id": "Metamodel3",
"entity_name": "q8",
"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": "q8"
}
],
"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
{
"msg": null,
"success": [
{
"entity_type": "Metamodel3-SubjectArea",
"entity_urn": "urn:abm:Metamodel3-SubjectArea:b2570da68c011fbf7bf8e784e9cd2c",
"entity_name": "q8"
}
],
"failure": []
} 状态码
状态码 | 描述 |
|---|---|
200 | successful operation. |
400 | Bad Request. |
500 | Internal Server Error. |
错误码
请参见错误码。

