Help Center/ DataArts Studio/ API Reference/ DataArts Catalog APIs/ Data Map/ Synchronizing Metadata in Real Time (Invitational Test)
Updated on 2025-11-17 GMT+08:00

Synchronizing Metadata in Real Time (Invitational Test)

Function

This API is used to synchronize metadata in real time. It is in invitational test and will be available for OBT in the future.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/metadata/async-bulk

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain it, see Project ID and Account ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. This parameter is mandatory when token authentication is used. You can obtain it from the value of X-Subject-Token in the response message header returned by the "Obtaining a User Token" API of the IAM service.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

engine

No

String

Engine service name.

engine_version

No

String

Engine version information.

instance_id

No

String

Instance ID of the engine. This parameter is mandatory for MRS and DWS.

project_id

No

String

Project ID. This parameter is mandatory for DLI.

events

No

Array of CatalogMetaDataEventInfo objects

Asset information.

Table 4 CatalogMetaDataEventInfo

Parameter

Mandatory

Type

Description

event_ts

No

Long

Indicates the timestamp when an event occurs.

event_type

No

String

Event type

  • AddForeignKeyEvent: adding a foreign key

  • AddNotNullConstraintEvent: adding a non-null constraint

  • AddPrimaryKeyEvent: adding a primary key

  • AddUniqueConstraintEvent: adding a unique constraint

  • AlterDatabaseEvent: modifying a database

  • AddPartitionEvent: adding a partition

  • AlterPartitionEvent: modifying a partition

  • AlterTableEvent: modifying a table

  • AlterCatalogEvent: modifying a catalog

  • CreateCatalogEvent: creating a catalog

  • CreateDatabaseEvent: creating a database

  • CreateFunctionEvent: creating a function

  • CreateTableEvent: creating a table

  • DropConstraintEvent: deleting a constraint

  • DropDatabaseEvent: deleting a database

  • DropFunctionEvent: deleting a function

  • DropPartitionEvent: deleting a partition

  • DropTableEvent: deleting a table

  • DropCatalogEvent: deleting a catalog

  • AddIndexEvent: adding an index

  • AlterIndexEvent: modifying an index

  • DropIndexEvent: deleting an index

  • AlterSchemaEvent: modifying a schema

  • CreateSchemaEvent: creating a schema

  • DropSchemaEvent: deleting a schema

  • AlterColumnEvent: modifying a field

  • AddColumnEvent: adding a field

  • DropColumnEvent: deleting a field

  • AlterTriggerEvent: modifying a trigger

  • AddTriggerEvent: adding a trigger

  • DropTriggerEvent: deleting a trigger

event_message

No

Object

Event message, which is a Map<String,Object> structure.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

success

Boolean

Whether the request is successful.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 403

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Status code: 404

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error description.

Example Requests

{
  "engine" : "MRS",
  "engine_version" : "3.1.2",
  "instance_id" : "4bacc6b5-9e94-4938-ac3f-3c3a7cd56c01",
  "events" : [ {
    "event_ts" : 0,
    "event_type" : "CreateTableEvent",
    "event_message" : {
      "table" : {
        "tableName" : "testTb1"
      }
    }
  } ]
}

Example Responses

Status code: 200

OK.

{
  "success" : true
}

Status Codes

Status Code

Description

200

OK.

400

Bad request.

401

Unauthorized.

403

Forbidden.

404

Not found.