Hi,

I am trying to post a download request which is as follows,

curl -i -u username:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"creator":"username","notification_address": ["username@domain.com"],"predicate":{"type":"and","predicates":[{"type":"equals","key":"HAS_COORDINATE","value":"true"},{"type":"equals","key":"HAS_GEOSPATIAL_ISSUE","value":"false"},{"type":"greaterThanOrEquals","key":"YEAR","value":1995},{"type":"greaterThanOrEquals","key":"MONTH","value":1},{"type":"equals","key":"COUNTRY","value":"IN"},{"type":"in","key":"TAXON_KEY","values":[797]}]}}' http://api.gbif.org/v1/occurrence/download/request

But the server is throwing a 500 error. The relevant part among the entire printed error trace I think is

Caused by: java.lang.IllegalArgumentException: Search parameter TAXON_KEY is not mapped to Hive

at org.gbif.occurrence.download.service.HiveQueryVisitor.toHiveField(HiveQueryVisitor.java:147)

at org.gbif.occurrence.download.service.HiveQueryVisitor.visit(HiveQueryVisitor.java:209)

... 58 more

It says that search parameter TAXON_KEY is not mapped, but I see TAXON_KEY being used in the examples at http://www.gbif.org/developer/occurrence#predicates.

Is it a documentation issue or 'in' predicate does not support 'TAXON_KEY'?


Thanks,
Priyank