Updated on 2025-11-28 GMT+08:00

Uploading a Resource File

Function

This API is used to import a file to DataArts Quality.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

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

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 FormData parameters

Parameter

Mandatory

Type

Description

type

Yes

String

Type of the resource to be uploaded. The value can be rule-template, quality-task, or consistency-task.

file

Yes

File

Resource file to be uploaded.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

resource_id

String

Resource ID

topics

Array of strings

SMN topic

matched_topics

Array of MatchedTopicMsg objects

Matched topics

directories

Array of strings

Directories in DataArts Quality

queues

Array of strings

Queue name

connections

Array of NameType objects

Data connection information

Table 5 MatchedTopicMsg

Parameter

Type

Description

id

String

Topic ID

name

String

Topic name

Table 6 NameType

Parameter

Type

Description

name

String

Name

type

String

Type

Status code: 500

Table 7 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

200

Success

500

INTERNAL SERVER ERROR