0

I am trying to do a GET API call to get specific pipeline run history. The API URL is as follows

APIEndpoint/api/v3/namespaces/default/apps/DataPipeline_name/workflows/DataPipelineWorkflow/runs?limit=1

This API call needs a access token which I get by the command line gcloud print-access-token The above works fine on a Basic Edition

When I run this on enterprise edition instance, I get the following error Invalid IAP Credentials: Expected JWT to have 3 parts separated by '.' but there are 2 parts

I need help here as to how I make this CDAP API call successfully.

Naitik
  • 49
  • 10
  • Do you have any documentation followed for your concern? This is for me to validate the steps you've taken. Additionally, I would like to ask you to share the logs. Thanks! – aga Jul 17 '20 at 12:44
  • were the Basic and Enterprise instance located at the same project? Also did you do gcloud auth login? – Edwin Elia Jul 21 '20 at 18:49
  • Hello Edwin, No the projects are different. I observed for the project where I am getting the issue, has the instance on enterprise edition. yes, I did the gcloud auth login as well. doesn't work. I am trying to get the details via postman and the oauth token i enter after running command gcloud auth print-access-token – Naitik Jul 22 '20 at 06:40
  • Hi Muscat, I do not get any logs. I just get the error screenshot. I follow the official google document wherein it works fine for another project in which instance is on a basic edition. here, the instance is on enterprise edition and i am getting this error. Here is the link that i refer https://cloud.google.com/data-fusion/docs/reference/cdap-reference#batch_pipeline_run_records – Naitik Jul 22 '20 at 06:42

2 Answers2

1

Since the project of the Enterprise Edition of Cloud Data Fusion is different, you need to make sure that the account you logged in the gcloud has the correct permission to the Cloud Data Fusion instance. You need to grant the service account with the roles/datafusion.viewer.

You can read more about access control here

Edwin Elia
  • 399
  • 3
  • 5
0

I'm not sure what caused the problem. But now it is working absolutely fine. Maybe the permissions were an issue / there was something changed on the GCP Project.

Thanks for all your answers. Those make complete sense to check

Naitik
  • 49
  • 10