From aece98e11c07014e0f25b4940cdaa79b7b50f0c8 Mon Sep 17 00:00:00 2001 From: Tanner Prestegard <tanner.prestegard@ligo.org> Date: Fri, 24 Aug 2018 12:52:32 -0500 Subject: [PATCH] Adding available API versions to API root --- gracedb/api/v1/main/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gracedb/api/v1/main/views.py b/gracedb/api/v1/main/views.py index cf7b120a2..d012751cd 100644 --- a/gracedb/api/v1/main/views.py +++ b/gracedb/api/v1/main/views.py @@ -10,6 +10,7 @@ from rest_framework import parsers, status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.reverse import reverse as drf_reverse +from rest_framework.settings import api_settings from rest_framework.views import APIView from api.backends import LigoAuthentication @@ -136,6 +137,7 @@ class GracedbRoot(APIView): "superevent-categories": dict(Superevent.SUPEREVENT_CATEGORY_CHOICES), "voevent-types" : dict(VOEvent.VOEVENT_TYPE_CHOICES), + "API_VERSIONS": api_settings.ALLOWED_VERSIONS, }) -- GitLab