From 00588979421ba4d1af725e29e3bf4526bf24ea87 Mon Sep 17 00:00:00 2001 From: Theophile du Laz Date: Wed, 23 Oct 2024 10:01:53 -0700 Subject: [PATCH] Documentation: server list and endpoint summary (#560) * add summary key to the docs * set the list of servers to the correct URLs --- extensions/skyportal/skyportal/handlers/api/alert.py | 7 +++++++ .../skyportal/skyportal/handlers/api/archive.py | 12 ++++++++---- .../skyportal/skyportal/handlers/api/db_stats.py | 1 + .../skyportal/handlers/api/kowalski_filter.py | 4 ++++ fritz.defaults.yaml | 7 +++++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/extensions/skyportal/skyportal/handlers/api/alert.py b/extensions/skyportal/skyportal/handlers/api/alert.py index eb3392c6..cbf0876e 100644 --- a/extensions/skyportal/skyportal/handlers/api/alert.py +++ b/extensions/skyportal/skyportal/handlers/api/alert.py @@ -834,6 +834,7 @@ async def get(self, object_id: str = None): """ --- single: + summary: Retrieve an object from Kowalski by objectId description: Retrieve an object from Kowalski by objectId tags: - alerts @@ -873,6 +874,7 @@ async def get(self, object_id: str = None): application/json: schema: Error multiple: + summary: Retrieve objects from Kowalski by objectId/position description: Retrieve objects from Kowalski by objectId and or position tags: - alerts @@ -1040,6 +1042,7 @@ async def get(self, object_id: str = None): def post(self, objectId): """ --- + summary: Save ZTF objectId from Kowalski as source in SkyPortal description: Save ZTF objectId from Kowalski as source in SkyPortal tags: - alerts @@ -1126,6 +1129,7 @@ def get(self, object_id: str = None): """ --- single: + summary: Retrieve aux data for an objectId from Kowalski description: Retrieve aux data for an objectId from Kowalski tags: - alerts @@ -1400,6 +1404,7 @@ async def get(self, object_id: str = None): """ --- summary: Serve alert cutout as fits or png + description: Serve alert cutout as fits or png tags: - alerts - kowalski @@ -1609,6 +1614,7 @@ async def get(self, object_id: str = None): """ --- summary: Serve alert cutouts as a triplet + description: Serve alert cutouts as a triplet tags: - alerts - kowalski @@ -1767,6 +1773,7 @@ async def get(self, alert_stream="ZTF"): """ --- summary: Get number of alerts in a time range + description: Get number of alerts in a time range tags: - alerts - kowalski diff --git a/extensions/skyportal/skyportal/handlers/api/archive.py b/extensions/skyportal/skyportal/handlers/api/archive.py index d778f742..55d644e3 100644 --- a/extensions/skyportal/skyportal/handlers/api/archive.py +++ b/extensions/skyportal/skyportal/handlers/api/archive.py @@ -147,7 +147,8 @@ class ArchiveCatalogsHandler(BaseHandler): def get(self): """ --- - summary: Retrieve available catalog names from Kowalski/Gloria/Melman + summary: Retrieve available catalog names from Kowalski + description: Retrieve available catalog names from Kowalski/Gloria/Melman tags: - archive - kowalski @@ -186,7 +187,8 @@ class CrossMatchHandler(BaseHandler): def get(self): """ --- - summary: Retrieve data from available catalogs on Kowalski/Gloria/Melman by position + summary: Retrieve data from available catalogs in Kowalski by position + description: Retrieve data from available catalogs on Kowalski/Gloria/Melman by position tags: - archive - kowalski @@ -363,7 +365,8 @@ class ScopeFeaturesHandler(BaseHandler): def post(self): """ --- - summary: Retrieve archival SCoPe features from Kowalski/Gloria/Melman by position, post as annotation + summary: Retrieve archival SCoPe features by position, post as annotation + description: Retrieve archival SCoPe features from Kowalski/Gloria/Melman by position, post as annotation tags: - features - kowalski @@ -625,7 +628,8 @@ class ArchiveHandler(BaseHandler): def get(self, lc_id=None): """ --- - summary: Retrieve archival light curve data from Kowalski/Gloria by position + summary: Retrieve archival light curve data by position + description: Retrieve archival light curve data from Kowalski/Gloria by position tags: - archive - kowalski diff --git a/extensions/skyportal/skyportal/handlers/api/db_stats.py b/extensions/skyportal/skyportal/handlers/api/db_stats.py index a5eb0751..ae3a5f3c 100644 --- a/extensions/skyportal/skyportal/handlers/api/db_stats.py +++ b/extensions/skyportal/skyportal/handlers/api/db_stats.py @@ -54,6 +54,7 @@ class StatsHandler(BaseHandler): def get(self): """ --- + summary: Retrieve basic DB statistics description: Retrieve basic DB statistics tags: - system_info diff --git a/extensions/skyportal/skyportal/handlers/api/kowalski_filter.py b/extensions/skyportal/skyportal/handlers/api/kowalski_filter.py index e17eb27a..5eb6c697 100644 --- a/extensions/skyportal/skyportal/handlers/api/kowalski_filter.py +++ b/extensions/skyportal/skyportal/handlers/api/kowalski_filter.py @@ -34,6 +34,7 @@ def get(self, filter_id): """ --- single: + summary: Retrieve a filter as stored on Kowalski description: Retrieve a filter as stored on Kowalski tags: - filters @@ -96,6 +97,7 @@ def get(self, filter_id): def post(self, filter_id): """ --- + summary: POST a new filter version description: POST a new filter version. tags: - filters @@ -176,6 +178,7 @@ def post(self, filter_id): def patch(self, filter_id): """ --- + summary: Update a filter on Kowalski description: Update a filter on Kowalski tags: - filters @@ -411,6 +414,7 @@ def patch(self, filter_id): def delete(self, filter_id): """ --- + summary: Delete a filter on Kowalski description: Delete a filter on Kowalski tags: - filters diff --git a/fritz.defaults.yaml b/fritz.defaults.yaml index 9ab74d09..3c8d6785 100644 --- a/fritz.defaults.yaml +++ b/fritz.defaults.yaml @@ -2011,3 +2011,10 @@ kowalski: pgir: True wntr: True turbo: True + +docs: + servers: + - url: https://fritz.science + description: Production server + - url: https://preview.fritz.science + description: Test server