Can I use the Watson Data API with the Cloud Pak for Data Lite plan?

742 Views Asked by At

I've created a Cloud Pak for Data Lite account (free version) and added a few assets to a catalog. I wanted to try accessing the metadata of those assets using an API. I thought that I could use the Watson Data API for this, but it doesn't seem to be working. For example, the following request in Postman returns a 404 error:

GET https://dataplatform.cloud.ibm.com/v2/assets/{asset-id}?catalog_id={catalog-id}

Authorization: Bearer {access-token}

I successfully created the api key at https://cloud.ibm.com/iam/overview, used a request to https://iam.ng.bluemix.net/identity/token to get the {access-token}, and I found the {asset-id} and {catalog-id} from the asset's Cloud Pak URL on the https://dataplatform.cloud.ibm.com/.

I found this Medium article https://medium.com/@vrvignesh/manage-and-automate-assets-of-cloud-pak-for-data-2-5-using-collect-and-organize-rest-apis-part-1-6b1b07d252e1 which states that I need to have Watson™ Knowledge Catalog and Watson studio setup. Unfortunately, it seems that I can't setup Watson™ Knowledge Catalog on the lite-plan when I already am using Cloud Pak for Data on the lite-plan. Except that I thought Cloud Pak uses the Watson Knowledge Catalog internally, so maybe it already is setup? I'm confused.

I'm new to the IBM Cloud, so I'm probably missing something simple here.

My main question is whether it's possible to request the metadata of assets in Cloud Pak for Data using an API on the Lite plan.

1

There are 1 best solutions below

0
On

Yes. The Lite version of Cloud Pak for Data does support API access using the Watson Data API.

The problem was that I was using the wrong API endpoint URL. The correct endpoint URL is

https://api.dataplatform.cloud.ibm.com

Source: https://cloud.ibm.com/apidocs/watson-data-api?_ga=2.69949400.931528022.1628866891-939983482.1628697566

I was able to successfully use the following request

GET https://api.dataplatform.cloud.ibm.com/v2/assets/{asset-id}?catalog_id={catalog-id}

As for the other parts of the question, it does seem that I have an active Watson Knowledge Catalog running as part of Cloud Pak for Data. It can be seen as active on the Resource List page https://cloud.ibm.com/resources