versions¶
get_versions(request)
¶
Respond with the text/csv representation for the served versions.
Source code in optimade/server/routers/versions.py
@router.get(
"/versions",
tags=["Versions"],
response_class=CsvResponse,
)
def get_versions(request: Request):
"""Respond with the text/csv representation for the served versions."""
version = BASE_URL_PREFIXES["major"].replace("/v", "")
response = f"version\n{version}"
return CsvResponse(content=response)