ApiInfoController v1
Implement a new ApiInfoController
v1 at public static final String CONTROLLER_URL = ApiBaseController.APIv1_BASE + "/info";
in the server.api.v1 package.
Copy info method from existing ApiInfoController (from Catalog)
Extra data
Add additional properties to the returned object:
-
String[] cdnServers
loaded fromapplication.properties
(see genesys-pgr/genesys-server/issues/328) -
long accessionCount
number of all accessions fromaccessionService.count()
-
long datasetCount
number of published datasets -
long subsetCount
number of published subsets -
long instituteCount
number of institutes with accessions in Genesys -
long descriptorCount
number of published descriptors -
long partnerCount
number of Partners
Implementation
Please implement these "count" methods when they are missing and use this template (when possible):
@Override
public long countAccessions(AccessionFilter filter) {
long total = elasticsearchService.count(Accession.class, filter);
if (total < 10000) {
// If total is below 10K, use actual count
total = accessionRepository.count(filter.buildQuery());
}
return total;
}
Extras
Also expose:
-
captchaSiteKey
ascaptchaSiteKey
-
google.analytics.account
asgoogleAnalyticsId
-
itpgrfa.glis.basepath
asglisUrl