Updated on 2025-05-13 GMT+08:00

Importing Metadata

Function

This API is used to import metadata of a table. If the metadata of a data table is available, you can quickly create an object table based on the metadata.

URI

POST Huawei Cloud Astro Zero domain name/u-route/baas/bulk/v1.0/import/schema?filename=X

Table 1 URI parameters

Parameter

Mandatory

Type

Description

filename

Yes

String

Explanation

Name of a file to upload. The file must be in ZIP format and contain multiple metadata files.

Constraints

The file must be in ZIP format.

Value

None

Default value

None

Request Parameters

The file to upload must be converted into streams, and no other parameters are required.

Response Parameters

Table 2 Response parameters

Parameter

Type

Description

resCode

String

Explanation

Return code.

Value

If the request is successful, 0 is returned. For details about other error codes, see Error Codes.

resMsg

String

Explanation

Message returned.

Value

If the request is successful, "Success" is returned. In other cases, an error message is returned.

result

String

Explanation

ID of the record that is successfully created.

Value

None

Example Request

To import metadata in the importtemplate.zip file and obtain the scheduled task whose ID is 1234567890abcdefg, run the following command:
POST https://Huawei Cloud Astro Zero domain name/u-route/baas/bulk/v1.0/import/schema?filename=importtemplate.zip

Example Response

{
    "resCode": "0",
    "resMsg": "Success",
    "result": "1234567890abcdefg"
}

Status Code

See Status Codes.

Error Code

See Error Codes.