Update API assets
You can batch update information for assets that have the same name in a tenant by importing and exporting them. This process only supplements information for existing assets and does not support adding or deleting assets, which is useful for asset migration scenarios. This topic describes how to batch update API assets.
Cross-tenant update
This process involves importing asset information from another tenant to update assets with the same name in the current tenant.
-
Log on to the Data Resource Platform console.
-
In the upper-left corner of the page, click the
icon and select Operations. -
In the top menu bar, click Asset Management.
-
In the navigation pane on the left, choose to go to the API Asset Management page.
-
Optional: To export information for all assets that meet the current filter criteria, you can first filter the assets in one of the following ways.
-
In the Keyword search box, enter a keyword for an API name and click Query. The assets that match the keyword are displayed.
-
From the Workspace drop-down list, select a workspace and click Query. The assets that meet the specified criteria are displayed.
-
API Type: From the API Type drop-down list, select a type and click Query. The matching assets are displayed.
-
Category: From the Category drop-down list, select a category and click Query. Assets that meet the condition are displayed.
-
Creation Time: Select a start and end time and click Query. The assets created in the specified time range are displayed.
NoteBy default, all published API assets are displayed.
-
-
In the upper-right corner of the page, click Batch Update.
-
In the Batch Update panel, click Cross-tenant Update to export asset information based on your criteria.
-
Click Export information for all viewable assets or Export information for all assets that meet the current filter criteria.
Important-
Export information for all assets that meet the current filter criteria: Exports only the filtered assets.
-
A single export cannot exceed 10,000 records. If your data exceeds this limit, adjust the filter criteria and perform multiple exports.
-
-
Click Export Assets.
After the export is complete, the file is automatically downloaded to your computer. Alternatively, in the upper-right corner of the page, click Operation Record to view the status and download the file.
-
-
Upload the modified asset information file.
-
In the exported asset template, modify the necessary information to match the current tenant. For example, change the original tenant's workspace to the current tenant's workspace.
-
Drag and drop the file to upload it, or click View Local Files to select it.
-
Click OK. In the Notice dialog box, verify the information and click I understand and confirm the import.
-
Optional: In the Import Result dialog box, you can review the import result and click OK.
Important-
If this is your first time importing a file, download and complete the `Batch_Import_Asset_Information_API_Template` file, and then upload it.
-
If you already have a file that is in the correct format, you can upload it directly.
-
Same-tenant update
You can export asset information from the current tenant, modify information such as the data category and extension properties in a local Excel file, and then import the file to batch update the assets.
-
Log on to the Data Resource Platform console.
-
In the upper-left corner of the page, click the
icon and select Operations. -
In the top menu bar, click Asset Management.
-
In the navigation pane on the left, choose to go to the API Asset Management page.
-
Optional: To export information for all assets that meet the current filter criteria, first filter the assets using one of the following methods.
-
Keyword: In the Keyword search box, you can enter a keyword for an API name and click Query. The assets that match your search are displayed.
-
Workspace: Select a workspace from the Workspace drop-down list and click Query. The matching assets are displayed.
-
API Type: Select a type from the API Type drop-down list and click Query. The matching assets are displayed.
-
Category: Select a category from the Category drop-down list and click Query. The matching assets are displayed.
-
Creation Time: Select a start and end time and click Query. The matching assets are displayed.
NoteBy default, all published API assets are displayed.
-
-
In the upper-right corner of the page, click Batch Update.
-
In the Batch Update panel, click Same-tenant Update to export asset information based on your criteria.
-
Click Export information for all viewable assets or Export information for all assets that meet the current filter criteria to specify which assets to export.
Important-
Export information for all assets that meet the current filter criteria: Exports only the filtered assets.
-
A single export cannot exceed 10,000 records. If your data exceeds this limit, adjust the filter criteria and perform multiple exports.
-
-
Click Export Assets.
After a successful export, the file is automatically downloaded to your local computer. Alternatively, in the upper-right corner of the page, click Operation Record to view the export status and download the file.
-
-
Upload the modified asset information file.
-
In the exported asset template, modify information such as the data category and extension properties.
-
After making your changes, drag the file to upload it, or click View Local Files to select the file.
-
Click OK. In the Notice dialog box, verify the information and click I understand and confirm the import.
-
Optional: In the Import Result dialog box, review the results and click OK.
ImportantIf you already have a file that is in the correct format, you can upload it directly.
-