Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.56 KB | None | 0 0
  1. ------------------------------------
  2. POST http://{BASE_URL}/api/login
  3. ------------------------------------
  4. Request:
  5. {
  6.     "user_name":(USER_NAME),
  7.     "password":(PASSWORD)
  8. }
  9.  
  10. Response:
  11. {
  12.     "code":(CODE),
  13.     "description::(IF NOT SUCCESS),
  14.     "token":(TOKEN, IF SUCCESS)
  15. }
  16.  
  17. ------------------------------------
  18. GET http://{BASE_URL}/api/task
  19. ------------------------------------
  20. Request:
  21. {
  22.     "token":(TOKEN)
  23. }
  24.  
  25. Response:
  26. {
  27.     "code":(CODE)
  28.     "description::(IF NOT SUCCESS)
  29.     "list":
  30.     {
  31.         "id":(ID),
  32.         "name":(NAME),
  33.         "priority":(HIGH|LOW|NORMAL),
  34.         "description":(DESCRIPTION),
  35.         "status":(TO_DO|IN_PROGRESS|COMPLETED)
  36.     }
  37. }
  38.  
  39. ------------------------------------
  40. POST http://{BASE_URL}/api/task
  41. ------------------------------------
  42. Request:
  43. {
  44.     "token":(TOKEN),
  45.     "name":(NAME),
  46.     "priority":(HIGH|LOW|NORMAL),
  47.     "description":(DESCRIPTION)
  48. }
  49.  
  50. Response:
  51. {
  52.     "code":(CODE),
  53.     "description::(IF NOT SUCCESS),
  54.     "id":(ID, IF SUCCESS)
  55. }
  56.  
  57. ------------------------------------
  58. PUT http://{BASE_URL}/api/task
  59. ------------------------------------
  60. Request:
  61. {
  62.     "token":(TOKEN),
  63.     "id":(ID),
  64.     "name":(NAME),                              //OPTIONAL
  65.     "priority":(HIGH|LOW|NORMAL),               //OPTIONAL
  66.     "description":(DESCRIPTION),                //OPTIONAL
  67.     "status":(TO_DO|IN_PROGRESS|COMPLETED)      //OPTIONAL
  68. }
  69.  
  70. Response:
  71. {
  72.     "code":(CODE),
  73.     "description::(IF NOT SUCCESS)
  74. }
  75.  
  76. ------------------------------------
  77. DELETE http://{BASE_URL}/api/task
  78. ------------------------------------
  79. Request:
  80. {
  81.     "token":(TOKEN),
  82.     "id":(ID)
  83. }
  84.  
  85. Response:
  86. {
  87.     "code":(CODE),
  88.     "description::(IF NOT SUCCESS)
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement