Updated on 2022-09-15 GMT+08:00

Querying Technical Assets

Function

This API is used to query technical assets.

URI

POST /v3/{project_id}/asset/entities/search

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

IAM Token

workspace

Yes

String

DGC workspace ID

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

query

Yes

String

Keyword used for the query

Maximum: 100

type_names

Yes

Array of strings

Classification names, which can be obtained using List

connection_names

No

Array of strings

Connection names, which can be obtained using List

search_all_attributes

No

Boolean

Whether to query assets by matching all attributes. Value true means to match all attributes, and value false means to match only the name and description.

tags

No

Array of strings

Tags, which can be obtained using List

limit

Yes

Integer

Number of results displayed on each page. The default value is 10.

offset

No

Integer

Offset. The default value is 0.

attributes

No

Object

The key can be a table, and the value can be rowCounts, tableSize, database, schema, namespace, ddlUpdateTime, dataUpdateTime, or ddlCreateTime, or a combination of some of these values.

filter_criteria

No

FilterCriteria object

Filter criteria

time_range

No

TimeRange object

Time criteria for filtering assets

scroll_id

No

String

scroll_id

security_levels

No

Array of strings

Security levels, which can be obtained using List

is_import

No

Boolean

Whether the asset is imported

classifications

No

Array of strings

Classifications, which can be obtained using List

description

No

String

Description

Minimum: 2

Maximum: 512

Table 4 FilterCriteria

Parameter

Mandatory

Type

Description

name

Yes

String

Name. The value can only be database.

value

Yes

String

Database name

operator

Yes

String

Operator

Table 5 TimeRange

Parameter

Mandatory

Type

Description

time_type

Yes

String

Time type. The value can be ddlUpdateTime, dataUpdateTime, or ddlCreateTime.

start

Yes

String

Start time

end

Yes

String

End time

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

count

Integer

Number of technical assets

entities

Array of OpenEntityHeader objects

List of technical assets

scroll_Id

String

scroll_Id

Table 7 OpenEntityHeader

Parameter

Type

Description

attributes

Object

Attributes

connection

Array of Connection objects

Data connection

display_text

String

Displayed text

guid

String

Asset GUID

type_name

String

Type name

tags

String

Tags

classification_names

Array of strings

Classification names

Table 8 Connection

Parameter

Type

Description

guid

String

Associated GUID

dispaly_text

String

Displayed content

type_name

String

Type name

connection_type

String

Connection type

qualified_name

String

Qualified name

Status code: 400

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 401

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 403

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 404

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Example Requests

{
  "offset" : 0,
  "limit" : 10,
  "type_names" : [ "Database" ],
  "query" : "cbu_training"
}

Example Responses

Status code: 200

OK

{
  "count" : 1,
  "entities" : [ {
    "attributes" : {
      "owner" : "wangyongjie",
      "create_time" : null,
      "qualified_name" : "cbu_training@dli.0833a5737480d53b2f25c010dc1a7b88-workspace-61aa10df45e54431a1901cb3527adab8",
      "name" : "cbu_training",
      "description" : "",
      "security_level" : null
    },
    "classification_names" : [ ],
    "connection" : {
      "connection_type" : "dli",
      "display_text" : "dli",
      "guid" : "0fff4057-c206-4dc3-a4ac-73ffc332bc9a",
      "qualified_name" : "dli@0833a5737480d53b2f25c010dc1a7b88-workspace-61aa10df45e54431a1901cb3527adab8",
      "type_name" : "Connection"
    },
    "display_text" : "cbu_training",
    "guid" : "e2b12c35-48ee-441f-a357-e338a85f5d00",
    "tags" : [ ],
    "type_name" : "dli_database"
  } ],
  "scroll_id" : null
}

Status Codes

Status Code

Description

200

OK

400

BadRequest

401

Unauthorized

403

Forbidden

404

Not Found

500

InternalServerError