MCPcopy Create free account
hub / github.com/cppla/ServerStatus / collection_routes

Function collection_routes

server/manage_api.py:265–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263
264
265def collection_routes():
266 endpoints = []
267 for key in ["monitors", "sslcerts", "watchdog"]:
268 endpoints.extend([
269 {"method": "GET", "path": f"/api/{key}", "auth": True},
270 {"method": "POST", "path": f"/api/{key}", "auth": True, "body": f"{COLLECTIONS[key]['item']} JSON"},
271 {"method": "PUT", "path": f"/api/{key}/{{index-or-name}}", "auth": True, "body": f"{COLLECTIONS[key]['item']} JSON"},
272 {"method": "DELETE", "path": f"/api/{key}/{{index-or-name}}", "auth": True},
273 ])
274 return endpoints
275
276
277def api_schema():

Callers 1

api_schemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected