-1

I have found GET request url for getting datasets from documentation https://cloud.google.com/vision/automl/docs/reference/rest/ as below: https://automl.googleapis.com/v1beta1/Concreting (Concreting is dataset name)

In response I am getting 404 file not found error so there is something missing in url.

can you please provide me correct documentation link which I should refer?

JoshGC
  • 469
  • 2
  • 7

1 Answers1

2

{name} needs to be the fully qualified identifier of the dataset in format projects/{project-id}/locations/us-central1/datasets/{dataset-id}.

Dataset IDs are not unique across projects so you need to specify your Project ID in the REST endpoint URL.

You can find an example in the docs using the analogous DELETE method.

In your case, this should be something like:

projectId=$(gcloud config get-value project)    
curl -X GET \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
https://automl.googleapis.com/v1beta1/projects/$projectId/locations/us-central1/datasets/Concreting
Guillem Xercavins
  • 6,938
  • 1
  • 16
  • 35