Skip to content

Latest commit

 

History

History
68 lines (54 loc) · 1.01 KB

ENDPOINTS.md

File metadata and controls

68 lines (54 loc) · 1.01 KB

API Endpoints:

Users

GET /users                        //returns all users

POST /users                       //register user
  Body:
    * username
    * password
    * name
    * email
    
GET /users/:username               //return specific user

POST /users/login
  Body:
    * username
    * password

PUT /users/:username               //modify user
  Header:
    * token
  Body:
    * password
    * (Future to allow other changes)

GET /users/logoff
  Header:
    * token

GET /users/logoffallothersessions       //log off all other sessions on other devices
  Header:
    * token

DELETE /users                     //delete user specified by token
  Header:
    * token
  Body:
    * password

Posts:

POST /posts
  Header:
    * token 
  Body:
    * description
    * url
    * tags

GET /posts/id/:postid

GET /posts/user/:username
GET /posts
  Query:
    * limit
    * sort
    * tags
    * offset
    
DELETE /posts
  Body:
    *postID