Query Data by Attribute

根据数据对象属性获取数据对象详情,包括基础信息、关联数据对象、关联标签及标签属性、关联业务术语。

请求格式

GET https://{apigw-address}/data-catalog/v2.0/entities/uniqueAttrs/detail

请求参数(URI)

名称 位置(Path/Query) 必需/可选 数据类型 描述
orgId Query 必需 String 组织 ID
typeId Query 必需 String 类型标识符
attributeName Query 必需 String unique 属性名称
attributeValue Query 必需 String unique 属性值

响应参数

名称 数据类型 描述
data json 返回查询到的具体数据对象详情信息

data

名称 数据类型 描述
basic json 数据对象的基本信息
tags jsonArray 数据对象关联的标签信息
terms jsonArray 数据对象关联的术语信息
relationships json 数据对象关联的数据对象信息

basic

名称 数据类型 描述
owner String 所有者
typeId String 类型标识符
createdTime timestamp 创建时间
updatedTime timestamp 更新时间
updatedBy String 更新者
createdBy String 创建者
name String 名称
attributes json 属性,以 json 的形式表示 <key,value> 键值对,key 的值根据类型标识符所表示的具体类型定义来确定,key 的类型为 String,value 的类型根据类型标识符所表示的具体类型定义来确定

tags

名称 数据类型 描述
tagId String 标签 ID
attributes json 标签属性,以 json 的形式表示 <key,value> 键值对,key 的值根据类型标识符所表示的具体类型定义来确定,key 的类型为 String,value 的类型根据类型标识符所表示的具体类型定义来确定

terms

名称 数据类型 描述
termId String 术语 ID

relationships

名称 数据类型 描述
typeId String 关联数据对象的类型标识符
displayName String 关联数据对象的显示名称
guid String 关联数据对象的系统 ID

示例

请求示例

url:    https://{apigw-address}/data-catalog/v2.0/entities/uniqueAttrs/detail?orgId=yourOrgId&typeId=yourTypeId&attributeName=yourAttributeName&attributeValue=yourAttributeValue

method: GET

Content-Type: application/json

返回示例

{
    "code": 0,
    "message": "",
    "data": {
        "basic": {
            "owner": null,
            "typeId": "yourTypeId",
            "updatedTime": 1623921622948,
            "updatedBy": "SYS",
            "createdBy": "SYS",
            "name": "cry654",
            "createdTime": 1623921622948,
            "attributes": {
                "turbineId": "cry654"
            }
        },
        "tags": [{
            "tagId": "test:test2",
            "attributes": {
                "attr1": "test",
                "attr2": 2
            }
        }],
        "terms": [{
                "termId": "test2"
            },
            {
                "termId": "test1"

            }
        ],
        "relationships": {
            "site": [{
                "typeId": "UD_test2",
                "displayName": "ch89",
                "guid": "43ce1497-cbc5-4787-9b46-803297361ec6"
            }],
            "physicalData": [{
                    "typeId": "UD_test3",
                    "displayName": "ch654",
                    "guid": "43ce1497-cbc5-4787-9b46-803297361ec5"
                },
                {
                    "typeId": "UD_test4",
                    "displayName": "cy6",
                    "guid": "43ce1497-cbc5-4787-9b46-803297361ec3"
                }
            ]
        }
    }
}

错误码

代码 错误信息
41001 参数[%s]不能为空。
41130 属性[%s]为[%s]的实体不唯一!
41090 Atlas详细错误信息: %s
41122 Entity不存在,guid为: [%s]。
41141 Entity不存在,属性信息为: [%s]。
41146 属性[%s]不存在或者不支持搜索。
42039 属性[%s]的值与类型不匹配。
99000 服务器内部错误。

备注

若传入数据对象的属性值不唯一则报错。