TNO database webservice : numberof functions
getNumberOf
This function returns the number of entry for each values of criteria.
For list of conditions available see the "Available tables" page for the table you want. All non numeric condition are available for use as a criteria.
SOAP
getNumberOf(table, cookie, conds, criteria);
Parameters:
- table: items to export (ex: astrometry)
- cookie: the cookie obtained by getNewCookie or empty string for public data
- conds: conditions required to select a entry
- criteria: column criteria to count or empty string to count all items (ex: objectName)
Returns a hashmap containing criteria value as key and number of items as value.
REST
GET http://tnodb.obs-besancon.fr/ws/tno/numberof/{table}
GET http://tnodb.obs-besancon.fr/ws/tno/numberof/{table}/{criteria}
Parameter in URL:
- table: items to export (ex: astrometry)
- criteria: column criteria to count (ex: objectName). If this argument is not present, counts all data.
Parameters in GET arguments:
- cookie: a cookie or empty string for public data (default: public data only)
- conds: conditions required to select a entry formatted in JSON and URL encoded (default: get all available data)
HTTP return code should be "200" and result is returned in response body formatted in JSON.
Back to documentation