diff --git a/app/api/v2/handlers/contact_api.py b/app/api/v2/handlers/contact_api.py index 2308210e4..b57841de9 100644 --- a/app/api/v2/handlers/contact_api.py +++ b/app/api/v2/handlers/contact_api.py @@ -15,7 +15,20 @@ def add_routes(self, app: web.Application): router = app.router router.add_get('/contacts/{name}', self.get_contact_report) - @aiohttp_apispec.docs(tags=['contacts']) + @aiohttp_apispec.docs(tags=['contacts'], + summary='Retrieve a List of Beacons made by Agents to the specified Contact', + description='Returns a list of beacons made by agents to the specified contact. The response' + ' is formatted as a list of dictionaries. The dictionaries have the keys `paw`,' + ' `instructions`, and `date`. `paw` being the paw of the agent that made the' + ' beacon. `instructions` being a list of strings (commands) executed by the' + ' agent since its last beacon. `date` being a UTC date/time string.', + parameters=[{ + 'in': 'path', + 'name': 'name', + 'schema': {'type': 'string'}, + 'required': 'true', + 'description': 'Name of the contact to get beacons for, e.g. HTTP, TCP, et cetera.' + }]) async def get_contact_report(self, request: web.Request): contact_name = request.match_info['name'] report = self._api_manager.get_contact_report(contact_name)