3

I'm trying to construct a URL to request with GET method:

https://dataform.googleapis.com/v1beta1/{workspace=projects/*/locations/*/repositories/*/workspaces/*}:readFile

https://cloud.google.com/dataform/reference/rest/v1beta1/projects.locations.repositories.workspaces/readFile#query-parameters

what I have but not working:

https://dataform.googleapis.com/v1beta1/{workspace=projects/my-project/locations/europe-west4/repositories/my-repo/workspaces/my-workspace}:readFile

Now I don't know how to put in the query parameter path.

I've tried to add ;path=my_file%2Ejson or ?path=my_file%2Ejson at the end of above URL and path is my_file at root of my-repo

My question is: Is this even the right way to do this and how to do this correctly?

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
eemilk
  • 1,375
  • 13
  • 17

1 Answers1

2

This is the correct query syntax for setting the path in your case:

https://dataform.googleapis.com/v1beta1/projects/MY_GCP_PROJECT/locations/europe-west4/repositories/REPOSITORY_NAME/workspaces/MY_WORKSPACE:readFile?path=my_file.json

So it works without the curly brackets and "workspace=".

Heikura
  • 1,009
  • 3
  • 13
  • 27
  • 1
    Ah okay, I did try without curly brackets but left the ```workspace=``` in. The docs could be better – eemilk Sep 29 '22 at 13:11