Skip to content

tkm83za/forumAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forumAPI

##API Documentation## The API is root is accessible via /api/v1/<resourcetype>/(id/)

####Register User####

  • URL: http://<server>/api/v1/register/
  • JSON fields:
  • email: string
  • username: string
  • password: string
  • is_staff:boolean (optional. defaults to false)
  • methods: POST
  • to add an admin user, set is_staff field to true

####User List####

  • operations on non-admin users
  • URL: http://<server>/api/v1/user/
  • methods: GET

####Non-admin user operations####

  • URL: http://<server>/api/v1/user/<id>/
  • fields:
  • email: string
  • username: string
  • methods: GET, PATCH, DELETE

####Admin User List####

  • gets a list of admin users (have is_staff=true)
  • URL: http://<server>/api/v1/adminuser/
  • fields:
  • email:string
  • username: string
  • methods: GET

####Admin users operations####

  • URL: http://<server>/api/v1/adminuser/<id>/
  • fields:
  • email: string
  • username: string
  • methods: GET, PATCH, DELETE

####Topic List####

  • URL: http://<server>/api/v1/topic/
  • methods: GET

####Topic List####

  • URL: http://<server>/api/v1/topic/(id/)
  • fields:
  • name:string
  • blurb:string
  • methods: GET, POST, PUT, PATCH, DELETE

####Retrieve Topic's comment####

  • retrieves all the comments associated with a topic
  • URL: http://<server>/api/v1/topic/<id>/comments/
  • methods: GET

####Comment####

  • URL: http://<server>/api/v1/comment/
  • fields:
  • comment_body: string
  • topic: string (href to topic)
  • author: string
  • in_reply_to:string (id of comment to which this is a reply of)
  • methods: GET, POST, PUT, PATCH, DELETE

Fields marked as bold are mandatory

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published