Issue 15578

Metrics counts/inventory calls should return bad request when required parameters are missing

15578
Reporter: mdoering
Assignee: fmendez
Type: Bug
Summary: Metrics counts/inventory calls should return bad request when required parameters are missing
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2014-05-01 11:25:34.237
Updated: 2015-03-09 17:09:28.205
Resolved: 2015-03-09 17:09:28.181
        
Description: These occ metrics inventory calls require at least one parameter:

http://api.gbif.org/v0.9/occurrence/counts/datasets?country=DE  (or taxonKey)
http://api.gbif.org/v0.9/occurrence/counts/countries?publishingCountry=DE
http://api.gbif.org/v0.9/occurrence/counts/publishing_countries?country=DE

When called without any parameter they return an empty list.
It would make more sense to return a http 400 bad request]]>
    


Author: omeyn@gbif.org
Comment: Does this violate our API contract?
Created: 2015-03-02 16:22:28.013
Updated: 2015-03-02 16:22:28.013


Author: fmendez@gbif.org
Comment: varnish catches parameterless calls as invalid resources and returns 404  for those calls, if the entire "resource" signature requires parameter 404 seems to be the correct response to me...see: https://github.com/gbif/c-deploy/commit/437a6cbf01695d1f1101c6e2e1115062e9831a35
Created: 2015-03-05 00:02:32.903
Updated: 2015-03-05 00:02:32.903


Author: fmendez@gbif.org
Comment: according to my last comment this issue can be closed
Created: 2015-03-09 17:09:28.203
Updated: 2015-03-09 17:09:28.203