DjangoRestAPI_RR

API hosted live here

Features

  1. Login
  2. Registration
  3. CRUD operations on posts
  4. JWT Authentication

Endpoints

  1. Admin Panel
  2. Posts
  3. Login
  4. Register
  5. JWT Token Refresh

Few other pointers

  1. Data cannot be accessed with JWT token which can be obtained at the time of registration and also when logging in.
  2. To edit/delete a post, go to BASE_URL/<id_num>.
  3. Postman works best for API testing.
  4. For accessing/creating posts via JWT token, the header should be {"Authorization" : "JWT <token_code>"}.
  5. Access all posts via GET request to here and for creating a new post POST request to here with the json data as {"title":"whatever title", "body":"whatever body"} and also the header as mentioned before.
  6. For registration, the POST request to here should have json of the form - {"username":"whatever username", "password":"whatever password", "password2":"same as whatever password"}.
  7. For login, the POST request to here with the body as {"username":"xyz","password":"pwd123"} has to be provided.
  8. For refreshing token, POST request to here with body as {"token":"kfsbgkjfgfv....."} has to be provided.

Author

Shaurya Vijayvargiya