Interfacing to the programmatic TAP page via URL

2019-01-22

Specs

Examples

tap_obs

tap_obs requires setting e=0

Click to run the exampleCorresponding syntax (remember to always prepend the base url)
types and subtypes #TAP?q=SELECT count(*) as qty, dataproduct_type, dataproduct_subtype%0AFROM ivoa.ObsCore group by dataproduct_type, dataproduct_subtype%0Aorder by dataproduct_type, dataproduct_subtype&e=0&m=1000&f=text
VIMOS programmatic access #TAP?q=select+top+10+*+%0Afrom+ivoa.ObsCore+%0Awhere+obs_collection='VIMOS'&e=0&m=1234&f=text
use case 1 #TAP?e=0&m=200&f=text&u=1
use case 8 #TAP?e=0&m=9&f=text&u=8
What happens if I place both:
a query (param q=) and a use case (param u=)?

Answer: the input query takes precedence!
#TAP?q=select+top+10+*+from+ivoa.ObsCore+where+obs_collection='VIMOS'&e=0&m=11&f=text&u=2
use case 0 can be used to leave the query box EMPTY #TAP?e=0&m=9&f=text&u=0

tap_cat

tap_cat requires setting e=1

PESSTO CONE SEARCH #TAP?e=1&m=12&f=text&q=SELECT host_id, transient_id, transient_classification, transient_raj2000, transient_decj2000%0AFROM pessto_tran_cat_fits_V2%0AWHERE CONTAINS(point('', transient_raj2000, transient_decj2000), circle('', 41.2863, -55.7406, 0.04))=1
reference to use case by name: cts5, text output, 12 max records #TAP?e=1&m=12&f=text&u=cts5
reference to use case by index: 1, text output, 12 max records #TAP?e=1&m=12&f=text&u=1
use case 1, default format, default maxrec #TAP?e=1&u=1
use case 8 programmatic access, text, default maxrec #TAP?e=1&f=text&u=8