diff --git a/tubearchivist/api/README.md b/tubearchivist/api/README.md index 8620e3b..9852208 100644 --- a/tubearchivist/api/README.md +++ b/tubearchivist/api/README.md @@ -104,3 +104,16 @@ POST /api/download/ ## Download Queue Item View /api/download/\/ + + +## Ping View +Validate your connection with the API +GET /api/ping + +When valid returns message with user id: +```json +{ + "response": "pong", + "user": 1 +} +``` diff --git a/tubearchivist/api/views.py b/tubearchivist/api/views.py index 6d0ca3e..bf391a9 100644 --- a/tubearchivist/api/views.py +++ b/tubearchivist/api/views.py @@ -271,7 +271,7 @@ class PingView(ApiBaseView): @staticmethod def get(request): """get pong""" - data = {"pong": request.user.id} + data = {"response": "pong", "user": request.user.id} return Response(data)