Issue 12574

name_usage/{NUB_KEY}/occurrence/dataset service not configured to work properly on api.gbif.org

12574
Reporter: kbraak
Assignee: mdoering
Type: Bug
Summary: name_usage/{NUB_KEY}/occurrence/dataset service not configured to work properly on api.gbif.org
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2013-01-08 15:11:40.517
Updated: 2013-08-29 14:44:50.691
Resolved: 2013-02-05 14:34:10.034
        
Description: The service works fine on staging, for example: http://staging.gbif.org:8080/metrics-ws/name_usage/2874218/occurrence/dataset

Please investigate if the problem lies in the varnish configuration: http://code.google.com/p/gbif-portal/source/browse/api.gbif.org/trunk/default.vcl

Please see resource http://code.google.com/p/gbif-metrics/source/browse/metrics/trunk/metrics-ws/src/main/java/org/gbif/metrics/ws/resources/TaxonOccurrenceDatasetResource.java for more information.]]>
    


Author: kbraak@gbif.org
Comment: The web service has been detailed in our API document here: http://dev.gbif.org/wiki/display/POR/Webservice+API#WebserviceAPI-CubeMetricsServices:TaxonOccurrenceService
Created: 2013-01-08 15:37:13.397
Updated: 2013-01-08 15:37:13.397


Author: mdoering@gbif.org
Created: 2013-01-08 15:51:09.731
Updated: 2013-01-08 15:51:09.731
        
This service seems to be missing from the public API mapping. What should the public URL be? This seems a bit verbose:
http://api.gbif.org/dev/name_usage/2874218/occurrence/dataset

Maybe similar to the count metrics?
http://api.gbif.org/dev/occurrence/dataset?nubKey=2874218

    


Author: kbraak@gbif.org
Created: 2013-01-08 16:05:50.827
Updated: 2013-01-08 16:05:50.827
        
How about: http://api.gbif.org/dev/occurrence/dataset/count?nubKey=2874218 ?

http://api.gbif.org/dev/occurrence/dataset/count would get the total number of datasets, if no filter parameters are supplied. There could be an additional filter parameter for DatasetType, to filter between occurrence and checklist datasets. Currently these counts are gathered for display on the Dataset home page, see HomeAction in org.gbif.portal.action.dataset.

Basically I'm saying we should also use /count, since Cube Metrics occurrence service also uses /count at the end, please see: http://dev.gbif.org/wiki/display/POR/Webservice+API#WebserviceAPI-CubeMetricsServices:OccurrenceService
    


Author: mdoering@gbif.org
Created: 2013-01-08 16:31:33.449
Updated: 2013-01-08 16:31:33.449
        
this is only to list occurrence datasets, not checklist datasets. Basically an occurrence count grouped by dataset where nubKey=x
Im not sure, all of these feel wrong to me. Lets wait until Tim is back to get his opinion?
    


Author: kbraak@gbif.org
Created: 2013-01-08 17:07:28.873
Updated: 2013-01-08 17:07:28.873
        
You are right, forgive me, I should have taken out /occurrence leaving http://api.gbif.org/dev/dataset/count?nubKey=2874218 If that doesn't feel right, I can certainly wait for Tim.


    


Author: kbraak@gbif.org
Created: 2013-01-23 17:27:41.36
Updated: 2013-01-23 17:27:41.36
        
I'll re-ask the same question now to [~trobertson@gbif.org].

Currently we have http://staging.gbif.org:8080/metrics-ws/name_usage/2874218/occurrence/dataset
which is basically an occurrence count grouped by dataset where nubKey=x

This service is missing from the public API mapping. We want to come up with a public URL for this service.

Here are proposals, which do you prefer?

1) http://api.gbif.org/dev/name_usage/2874218/occurrence/dataset

2) http://api.gbif.org/dev/occurrence/dataset?nubKey=2874218

3) http://api.gbif.org/dev/dataset/count?nubKey=2874218
    


Author: mdoering@gbif.org
Created: 2013-01-24 11:00:13.322
Updated: 2013-01-24 11:00:13.322
        
adding some more options:

4) http://api.gbif.org/dev/name_usage/2874218/datasets?type=OCCURRENCE
(could add CHECKLIST too if wanted, counting number of usages instead of occurrences?)

5) http://api.gbif.org/dev/occurrence/datasets?nubKey=2874218


I _think_ I favor #5
    


Author: mdoering@gbif.org
Created: 2013-02-05 14:34:10.112
Updated: 2013-02-05 14:34:10.112
        
Using #5
http://code.google.com/p/gbif-metrics/source/detail?r=99