segment_query_url

dqsegdb2.api.segment_query_url(host, ifo, name, version, start=None, end=None, include='metadata,known,active')

Returns the URL to use in querying for segments

Parameters
hoststr

the URL of the target DQSEGDB2 host

ifostr

the interferometer prefix

namestr

the name of the flag

versionint

the version of the flag

startint

the start GPS time of the query

endint

the end GPS time of the query

includestr, optional

the data to return, should be a comma-separated list of keys

Returns
urlstr

the full REST URL to query for information

Examples

>>> from dqsegdb2.api import segment_query_url
>>> print(segment_query_url('https://segments.ligo.org', 'G1',
...                         'GEO-SCIENCE', 1, 1000000000, 11000000000))
'https://segments.ligo.org/dq/G1/GEO-SCIENCE/1?s=1000000000&e=11000000000&include=metadata,known,active'