Skip to content

Commit 99c4261

Browse files
committed
DOCS: Added section on inspecting query payloads for gemini
1 parent a30a7d4 commit 99c4261

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/gemini/gemini.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,25 @@ the *NotFail* or *notengineering* terms respectively.
129129
0.0 Full Frame -- ... 2019-11-22 --
130130

131131

132+
Inspecting Query Payloads
133+
-------------------------
134+
135+
All query methods accept an optional ``get_query_payload`` keyword argument. When set to
136+
``True``, no network request is made and a dictionary is returned instead of an
137+
`~astropy.table.Table`. The dictionary contains the URL, HTTP method, and any data that
138+
would have been sent to the Gemini archive. This is useful for debugging and verifying
139+
the query that will be executed.
140+
141+
.. doctest-skip::
142+
143+
>>> from astroquery.gemini import Observations
144+
>>> payload = Observations.query_criteria(instrument='GMOS-N',
145+
... observation_type='BIAS',
146+
... get_query_payload=True)
147+
>>> print(payload)
148+
{'url': 'https://archive.gemini.edu/jsonsummary/notengineering/NotFail/GMOS-N/BIAS', 'method': 'GET', 'data': {}}
149+
150+
132151
Authenticated Sessions
133152
----------------------
134153

0 commit comments

Comments
 (0)