aboutsummaryrefslogtreecommitdiffstats
path: root/api/views.py
blob: dbc04b564b547c675290d207c03bb252ed233de6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from rest_framework.response import Response
from rest_framework.views import APIView


class HealthcheckView(APIView):
    """
    Provides a simple view to check that the website is alive and well.

    ## Routes
    ### GET /healthcheck
    Returns a simple JSON document showcasing whether the system is working:

    >>> {
    ...     'status': 'ok'
    ... }

    Seems to be.

    ## Authentication
    Does not require any authentication nor permissions..
    """

    authentication_classes = ()
    permission_classes = ()

    def get(self, request, format=None):
        return Response({'status': 'ok'})