如何在 watson data science experience 的目录中列出所有资产?

How to list all assets in a catalog in watson data science experience?

我创建了一个 Watson 数据科学体验 (DSX) 帐户,在其中创建了目录并向其中添加了数据资产。 我正在尝试使用记录在以下位置的 REST API:https://developer.ibm.com/api/view/id-1084:title-Watson_Data_Platform_Core_Services#id36962 ...使用 curl 检索资产。

curl -H "Authorization: Bearer <---stripped the auth token --->" -X GET 'https://api.dataplatform.ibm.com/v2/assets?catalog_id=bd2b56c3-091f-4ff5-beab-b3a1da85488d'

I get the following response:
{
    "errors": [
        {
            "code": "invalid_parameter",
            "message": "COMSV3006E: Missing or Invalid 'asset' id",
            "target": {
                "name": "asset",
                "type": "parameter"
            }
        }
    ],
    "trace": "e7b07khusvkj7s0ymgrggm6si"
}

如何指定资产 ID 以检索相同的资产 ID? 此外,我希望上传资产,使用 REST API 将 metadata/tags 分配给现有资产。有没有 documentation/tutorial 可以帮助我解释一下?

一个选项是搜索 api,尽管它被列为已弃用:

curl -X POST -d '{"query":"asset.asset_state:available"}' -H "Content-Type: application/json" https://api.dataplatform.ibm.com/v2/catalogs/<catalog_guid>/types/<type>/search -H "Authorization: Bearer ...."

https://developer.ibm.com/api/view/id-1084:title-Watson_Data_Platform_Core_Services#id37001

对于<type>,您可能需要data_asset,但您也可以查找所有现有类型:

curl -X GET https://api.dataplatform.ibm.com/v2/catalogs/<catalog_guid>/types -H "Authorization: Bearer ...."

https://developer.ibm.com/api/view/id-1084:title-Watson_Data_Platform_Core_Services#id36916