Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. # Transparency Functionality List
  2.  
  3. ## AUTHENTICATION
  4. ### Login
  5. Login request sent from the login page. Returns with the `set-cookie` header
  6. ```
  7. POST /login
  8. {
  9. username: "bob"
  10. password: "pa$$w0rd"
  11. }
  12. ```
  13.  
  14. ### Register
  15. ```
  16. POST /register
  17. ```
  18.  
  19. ### Make user an Admin
  20. Request sent by an admin to mark a project for approval
  21. ```
  22. POST /admin/{userId}
  23. ```
  24.  
  25. ### Remove user from being an Admin
  26. An admin removing another user from being an admin
  27. ```
  28. DELETE /admin/{userId}
  29. ```
  30.  
  31. ### Make user a Regulator
  32. ```
  33. POST /regulators/{userId}
  34. ```
  35.  
  36. ### Remove user from being a Regulator
  37. ```
  38. DELETE /regulators/{userId}
  39. ```
  40.  
  41. ### Retrieve Logs
  42. Able to get logs filtered by type, search string, start date or end date
  43. ```
  44. GET /logs?type=&q=&start=&end=
  45. ```
  46. ## USERS
  47.  
  48. ### List Users
  49. ```
  50. GET /users
  51. ```
  52.  
  53. ### Get Information about a single User
  54. ```
  55. GET /users/{userId}
  56. ```
  57.  
  58. ### Get Information about Self
  59. An alias for `/users/{your own userId}`
  60. ```
  61. GET /users/self
  62. ```
  63.  
  64. ### Update User Information
  65. ```
  66. POST /users/{userId}
  67. ```
  68.  
  69. ### List donations made by a User
  70. ```
  71. GET /users/{userId}/donations
  72. ```
  73.  
  74. ### List projects participated by a User
  75. Filter by their role in the project
  76. ```
  77. GET /users/{userId}/projects?role=
  78. ```
  79.  
  80. ### Remove a User account
  81. Allow admins to remove a user account
  82. ```
  83. DELETE /users/{userId}
  84. ```
  85.  
  86. ## PROJECTS
  87. ### List Projects
  88. Filter by category, owner, location, or distance
  89. ```
  90. GET /projects?category=&user=&location=&distance=
  91. ```
  92. ### Create a Project Request
  93. ```
  94. POST /projects
  95. ```
  96. ### Get information about a Project
  97. ```
  98. GET /projects/{projectId}
  99. ```
  100. ### Update a Project
  101. ```
  102. POST /projects/{projectId}
  103. ```
  104. ### Get the leaders of project
  105. ```
  106. GET /projects/{projectId}/leaders
  107. ```
  108. ### Create a leader of a project
  109. ```
  110. POST /projects/{projectId}/leaders
  111. ```
  112. ### Remove a leader from a project
  113. ```
  114. DELETE /projects/{projectId}/leaders
  115. ```
  116. ### Join a project
  117. ```
  118. POST /projects/{projectId}/join
  119. ```
  120. ### Follow a project
  121. ```
  122. POST /projects/{projectId}/follow
  123. ```
  124. ### Donate to a project
  125. ```
  126. POST /projects/{projectId}/donate
  127. ```
  128. ### Approve a project
  129. Allows an Admin to approve a requested project
  130. ```
  131. POST /projects/{projectId}/approve
  132. ```
  133. ### Remove a project
  134. ```
  135. DELETE /projects/{projectId}
  136. ```
  137.  
  138. ## CATEGORIES
  139. ### List Project Categories
  140. ```
  141. GET /categories
  142. ```
  143. ### Create a Project Category
  144. ```
  145. POST /categories
  146. ```
  147. ### Get information about a Project Category
  148. ```
  149. GET /categories/{categoryId}
  150. ```
  151. ### Update a Project Category
  152. ```
  153. POST /categories/{categoryId}
  154. ```
  155.  
  156. ## NOTIFICATIONS
  157. ### List Notifications
  158. Query by start date, end date, project, or user
  159. ```
  160. GET /notifications&start=&end=&user=&project=
  161. ```
  162. ### Send a notification
  163. ```
  164. POST /notifications
  165. {
  166. projectId: 4892
  167. message: "Just want y'all to know..."
  168. }
  169. ```
  170. ### Remove a notification
  171. ```
  172. DELETE /notifications/{notificationId}
  173. ```
  174. ## ORGANIZATIONS
  175. ### List Organizations
  176. ```
  177. GET /organizations
  178. ```
  179. ### Create an Organization
  180. ```
  181. POST /organizations
  182. ```
  183. ### Get information about an Organization
  184. ```
  185. GET /organizations/{orgId}
  186. ```
  187. ### Update an Organization
  188. ```
  189. POST /organizations/{orgId}
  190. ```
  191. ### Remove an Organization
  192. ```
  193. DELETE /organizations/{orgId}
  194. ```
  195.  
  196. ## DONATIONS
  197. ### List Donations
  198. Query by project or user
  199. ```
  200. GET /donations&project=&user=
  201. ```
  202. ### Get information about a specific donation
  203. ```
  204. GET /donations/{donationId}
  205. ```
  206. ### Update a donation
  207. ```
  208. POST /donations/{donationId}
  209. ```
  210. ### Make a general donation
  211. ```
  212. POST /donations/general
  213. ```
  214.  
  215. ## FEEDBACK
  216. ### List feedback
  217. Query by project or user
  218. ```
  219. GET /feedback&project=&user=
  220. ```
  221. ### Create feedback
  222. ```
  223. POST /feedback
  224. {
  225. projectId: 842
  226. message: "Felt like I was really fullfilling..."
  227. }
  228. ```
  229. ### Remove feedback
  230. ```
  231. DELETE /feedback/{feedbackId}
  232. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement