Updated on 2024-11-06 GMT+08:00

Importing Resources

Function

This API is used to import resources to DataArts Quality.

Calling Method

For details, see Calling APIs.

URI

POST /v2/{project_id}/quality/resource/import

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

workspace

Yes

String

DataArts Studio workspace ID. For details about how to obtain the workspace ID, see Instance ID and Workspace ID.

X-Auth-Token

Yes

String

IAM token. For details about how to obtain the token, see Authentication.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

resource_id

Yes

String

Resource ID

type

Yes

String

Type of the resources to be imported. rule-template indicates quality rule templates, quality-task indicates quality jobs, and consistency-task indicates comparison jobs.

strategy

No

String

Policy for handling duplicate resource names during import. The value can be SKIP, OVERRIDE, or TERMINATION.

directories

No

Array of ValueMappingVO objects

Directories

topics

No

Array of ValueMappingVO objects

Alarm notification topics

connections

No

Array of ValueMappingVO objects

Connections. This parameter is available only for DLI.

queues

No

Array of ValueMappingVO objects

Queues. This parameter is available only for DLI.

Table 4 ValueMappingVO

Parameter

Mandatory

Type

Description

old_value

No

String

Data before mapping

new_value

No

String

Data after mapping

mapping_value

No

String

Data after mapping. The value can be empty. If the value is empty, new_value is used.

Response Parameters

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DQC.0000 which indicates that the request was successfully processed

error_msg

String

Error message

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

204

Success

500

INTERNAL SERVER ERROR