REST API greeting endpoint
This django app project include a REST API POST endpoint which accept a greeting message from the user.
This endpoint should do the following things with the user-submitted greeting:
- Log it in the LMS platform.
- Save it in the database.
- If the greeting is “hello”, then the view of this API endpoint should call the original greeting endpoint again with “goodbye” as the parameter.
It is secured with Oauth2 authentication.
# Get token curl -X POST -d "client_id=<client_id>&client_secret=<client_secret>&grant_type=client_credentials&token_type=jwt" http://<Base_URL>/oauth2/access_token/ # Greeting REST API curl -X POST http://<URL>/ibledxgreeting/api/v0/greeting/ -H "Authorization: JWT <token>" -d '{"message": "hello"}'
- Setup:
https://docs.tutor.overhang.io/index.html
https://github.com/openedx/edx-platform/blob/master/docs/guides/extension_points.rst
https://github.com/openedx/edx-platform/tree/master/openedx/core/djangoapps/plugins
https://github.com/openedx/edx-cookiecutters/tree/master/cookiecutter-django-app
- Coding:
https://github.com/openedx/edx-django-utils/blob/master/edx_django_utils/plugins/README.rst
https://blog.lawrencemcdaniel.com/getting-started-with-open-edx-plugin-architecture/
- Authentication and Rest API best practices:
https://github.com/openedx/edx-platform/tree/master/openedx/core/djangoapps/oauth_dispatch
https://github.com/openedx/edx-rest-api-client
The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.
Please see LICENSE.txt for details.