GlobalFishingWatch / gfwr

R package for accessing data from Global Fishing Watch APIs
https://globalfishingwatch.github.io/gfwr/
Apache License 2.0
58 stars 7 forks source link

Forbidden for all datasets except public-global-fishing-events:latest #124

Closed davidshumway closed 6 months ago

davidshumway commented 8 months ago

Whenever I access 4wings with anything but the public-global-fishing-events:latest dataset, I'm receiving this error:

{"statusCode":403,"error":"Forbidden","messages":[{"title":"Forbidden","detail":"Insufficient permissions for <DATASET> datasets"}]}

Example query:

curl --location -g --request POST 'https://gateway.api.globalfishingwatch.org/v3/4wings/report?spatial-resolution=HIGH&temporal-resolution=HOURLY&group-by=FLAG&datasets[0]=public-global-port-visits-c2-events:latest&&date-range=2017-01-01T00:00:00.000Z,2018-01-01T00:00:00.000Z&format=JSON'\
  -H "Authorization: Bearer [token]"\
  --data-raw '{"geojson":{"type":"Polygon","coordinates":[[[...,...], [...,...], [...,...], [...,...], [...,...]]]}}'\
  --output 'test.json'

Output:

{"statusCode":403,"error":"Forbidden","messages":[{"title":"Forbidden","detail":"Insufficient permissions for public-global-port-visits-c2-events:latest datasets"}]}

Is this because I just opened my account? Or are certain datasets off-limits?

AndreaSanchezTapia commented 7 months ago

Hello @davidshumway as you can see in this API documentation page, the only dataset for the 4wings endpoint is public-global-fishing-effort:latest. The other datasets can be accessed via the Events and Vessels endpoints.

AndreaSanchezTapia commented 6 months ago

I'm closing this but let us know if you have an other questions.