Search Data Objects

Query data objects under a specified data type. Supports filtering data by data objects attribute value, associated tags and tag attributes, and associated business terms.

Request Format

POST https://{apigw-address}/data-catalog/v2.0/entities/search

Request Parameters(URI)

Name

Location(Path/Query)

Mandatory/Optional

Data Type

Description

orgId

Query

Mandatory

String

OU ID

Request Parameters(Body)

Name

Mandatory/Optional

Data Type

Description

typeId

Mandatory

String

The type identifier (Including master data and metadata)

pageNo

Mandatory

Int

The page turning parameter, representing page number (Numbering starting from 1)

pageSize

Mandatory

Int

The page turning parameter, representing the number of returned data

excludeDelete

Optional

bool

Whether to exclude deleted data objects (The field in the nebula engine version is not valid, that is, deleted objects will not be returned. The default value is “true”, which means that deleted objects will not be returned.)

entityAttrFilters

Optional

json

The json string. Filter data by data attribute value. Supports multiple attributes filtering. For different data object types, the attributes that support filtering are as follows:
  • DataSource : name

  • HiveTable : name

  • DTV Service: id , name

  • FileSet: id , name , fileType

  • Asset id: name, nameCn, nameEn, modelId, timezone

  • AssetTreeNode: assetId, assetName, modelId, treeId, parentAssetId

  • Measure: id, name

  • Business Term/Metric: filtering by attributes is not supported currently.

  • Custom master data type: support filtering by all user-defined attributes

tagAttrFilters

Optional

json

The json string. Filter by tags and tag attributes. Only supports filtering by one single tag.

termFilters

Optional

String

The business term filtering condition. The terms need to have glossary information, and pass parameters in glossaryIdd:termId format. Only supports filtering by one single term.

entityAttrFilters

Name

Mandatory/Optional

Data Type

Description

condition

Optional

String

The enumeration values: AND, OR

criterion

Optional

jsonArray

The filtering condition

criterion

Name

Mandatory/Optional

Data Type

Description

attributeName

Optional

String

The attribute name used for filtering

operator

Optional

String

The filter. The enumeration value types are described as follows:
  • lt:less than

  • gt:greater than

  • lte:less than or equal to

  • gte:greater than or equal to

  • eq:equal to

  • neq:not equal to

  • contains:containing matching

  • startsWith:prefix matching

  • endsWith:suffix matching

int, short, long, float, double, byte, date type support [Less than, greater than, less than or equal to, greater than or equal to, equal to, not equal to].

String type supports [equal to, contains, startsWith, endsWith]. Bool type supports [equal to].

bool type supports [equal to].

attributeValue

Optional

Object

The attribute value used for filtering

tagAttrFilters

Name

Mandatory/Optional

Data Type

Description

tagId

Optional

String

The Tag ID

condition

Optional

String

The enumeration values: AND, OR

criterion

Optional

jsonArray

The filtering condition

criterion

Name

Mandatory/Optional

Data Type

Description

attributeName

Optional

String

The attribute name used for filtering

operator

Optional

String

The filter. The enumeration value types are described as follows:
  • lt:less than

  • gt:greater than

  • lte:less than or equal to

  • gte:greater than or equal to

  • eq:equal to

  • neq:not equal to

  • contains:containing matching

  • startsWith:prefix matching

  • endsWith:suffix matching

int, short, long, float, double, byte, date type support [Less than, greater than, less than or equal to, greater than or equal to, equal to, not equal to].

String type supports [equal to, contains, startsWith, endsWith]. Bool type supports [equal to].

bool type supports [equal to].

attributeValue

Optional

Object

The attribute value used for filtering

Response Parameter

Name

Data Type

Description

data

jsonArray

Return the list information of the specific data object queried

data

Name

Data Type

Description

owner

String

Owned by

updatedTime

timestamp

Last updated on

createdBy

String

Created by

name

String

The name

guid

String

The unique identifier in the OU. Data object ID.

Samples

Request Sample

url:    https://{apigw-address}/data-catalog/v2.0/entities/search?orgId=yourOrgId

method: POST

Content-Type: application/json

{
    "typeId": "UD_test",
    "pageNo": 1,
    "pageSize": 20,
    "excludeDelete": false,
    "entityAttrFilters": {
        "condition": "AND",
        "criterion": [{
            "attributeName": "height",
            "operator": "lt",
            "attributeValue": "70"
        }, {
            "attributeName": "turbineId",
            "operator": "=",
            "attributeValue": "ch9876"
        }]
    },
    "tagAttrFilters": {
        "tagId": "lc:lctag",
        "condition": "OR",
        "criterion": [{
            "attributeName": "attribute1",
            "operator": "lt",
            "attributeValue": 10
        }, {
            "attributeName": "attribute2",
            "operator": "gt",
            "attributeValue": 9.876
        }]
    },
    "termFilters":"test:test"
}

Return Sample

{
    "code": 0,
    "message": "",
    "data": [{
                "owner": "testOwnerName",
                "updatedTime": null,
                "createdBy": "testOwnerName",
                "name": "Turbine1",
                "guid": "43ce1497-cbc5-4787-9b46-803297361ec6"
            },
            {
                "owner": "testOwnerName",
                "updatedTime": null,
                "createdBy": "testOwnerName",
                "name": "Turbine2",
                "guid": "43ce1497-cbc5-4787-9b46-803297361ec6"
            }
        ]
}

Error Code

Code

Message

41001

Parameters [%s] required.

41054

Param [%s: %s] is invalid.

41090

Atlas detail error msg: %s.

41131

Condition [%s] is invalid,Condition supported AND/OR.

41132

Operator[%s] is invalid: The operator of the attribute [%s] supports [%s].

41133

Attribute [%s] not exist or not supported to search.

42037

Tag[%s] Attribute[%s] value does not match type.

42039

Attribute[%s] value does not match type.

42052

[%s] type not exist!

99000

Internal Server Error.