Skip to content

Commit 11be4ef

Browse files
committed
Create service descriptor for hoverdrive endpoints
Hoverdrive provides two endpoints for getting documentation links about tables and columns respectively. These endpoints are described in https://sqr-086.lsst.io. Both endpoints provide an optional mode triggered by a ?redirect=true query parameter where the client is redirected to the most-relevant documentation URL. In this case, only a single column or table can be specified by the ?table and ?column parameters. I'm not sure how to encode this logic in the service descriptor.
1 parent 7ae9223 commit 11be4ef

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

datalink/hoverdrive.xml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<VOTABLE xmlns="http://www.ivoa.net/xml/VOTable/v1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2">
3+
4+
<RESOURCE type="meta" utype="adhoc:service" name="ColumnDocumentationLinks">
5+
<DESCRIPTION>
6+
Get documentation links about table columns.
7+
</DESCRIPTION>
8+
<PARAM name="accessURL" datatype="char" arraysize="*"
9+
value="$baseUrl$/api/hoverdrive/column-docs-links"/>
10+
<GROUP name="inputParams">
11+
<PARAM name="table" datatype="char" use="required">
12+
<DESCRIPTION>The name of the table.</DESCRIPTION>
13+
</PARAM>
14+
<PARAM name="column" datatype="char" arraysize="*" use="required">
15+
<DESCRIPTION>The name of the column.</DESCRIPTION>
16+
</PARAM>
17+
<PARAM name="redirect" datatype="boolean" value="False" use="optional">
18+
<DESCRIPTION>Whether to redirect to the most relevant documentation link.</DESCRIPTION>
19+
</PARAM>
20+
</GROUP>
21+
<PARAM name="exampleURL" datatype="char" arraysize="*"
22+
value="$baseUrl$/api/hoverdrive/column-docs-links?table=dp02_dc2_catalogs.Object&amp;column=detect_isPrimary&amp;redirect=true">
23+
<DESCRIPTION>Example request to redirect to the documentation for the 'detect_isPrimary' column in the 'dp02_dc2_catalogs.Object' table.</DESCRIPTION>
24+
</PARAM>
25+
<PARAM name="exampleURL" datatype="char" arraysize="*"
26+
value="$baseUrl$/api/hoverdrive/column-docs-links?table=dp02_dc2_catalogs.Object&amp;column=ra&amp;column=dec">
27+
<DESCRIPTION>Example request to get (but not redirect to) documentation links for the 'ra' and 'dec' columns in the 'dp02_dc2_catalogs.Object' table (redirect=false is the default).</DESCRIPTION>
28+
</PARAM>
29+
</RESOURCE>
30+
31+
<RESOURCE type="meta" utype="adhoc:service" name="TableDocumentationLinks">
32+
<DESCRIPTION>
33+
Get documentation links about tables.
34+
</DESCRIPTION>
35+
<PARAM name="accessURL" datatype="char" arraysize="*"
36+
value="$baseUrl$/api/hoverdrive/table-docs-links"/>
37+
<GROUP name="inputParams">
38+
<PARAM name="table" datatype="char" arraysize="*" use="required">
39+
<DESCRIPTION>The name of the table.</DESCRIPTION>
40+
</PARAM>
41+
<PARAM name="redirect" datatype="boolean" value="False" use="optional">
42+
<DESCRIPTION>Whether to redirect to the most relevant documentation link.</DESCRIPTION>
43+
</PARAM>
44+
</GROUP>
45+
<PARAM name="exampleURL" datatype="char" arraysize="*"
46+
value="$baseUrl$/api/hoverdrive/table-docs-links?table=dp02_dc2_catalogs.Object&amp;redirect=true">
47+
<DESCRIPTION>Example request to redirect to the documentation for the 'dp02_dc2_catalogs.Object' table.</DESCRIPTION>
48+
</PARAM>
49+
<PARAM name="exampleURL" datatype="char" arraysize="*"
50+
value="$baseUrl$/api/hoverdrive/table-docs-links?table=dp02_dc2_catalogs.Object">
51+
<DESCRIPTION>Example request to get (but not redirect to) the documentation link for the 'dp02_dc2_catalogs.Object' table (redirect=false is the default).</DESCRIPTION>
52+
</PARAM>
53+
</RESOURCE>
54+
</VOTABLE>

docs/changes/DM-50405.misc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added service descriptors for Hoverdrive endpoints.

0 commit comments

Comments
 (0)