Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Transparency Functionality List
- ## AUTHENTICATION
- ### Login
- Login request sent from the login page. Returns with the `set-cookie` header
- ```
- POST /login
- {
- username: "bob"
- password: "pa$$w0rd"
- }
- ```
- ### Register
- ```
- POST /register
- ```
- ### Make user an Admin
- Request sent by an admin to mark a project for approval
- ```
- POST /admin/{userId}
- ```
- ### Remove user from being an Admin
- An admin removing another user from being an admin
- ```
- DELETE /admin/{userId}
- ```
- ### Make user a Regulator
- ```
- POST /regulators/{userId}
- ```
- ### Remove user from being a Regulator
- ```
- DELETE /regulators/{userId}
- ```
- ### Retrieve Logs
- Able to get logs filtered by type, search string, start date or end date
- ```
- GET /logs?type=&q=&start=&end=
- ```
- ## USERS
- ### List Users
- ```
- GET /users
- ```
- ### Get Information about a single User
- ```
- GET /users/{userId}
- ```
- ### Get Information about Self
- An alias for `/users/{your own userId}`
- ```
- GET /users/self
- ```
- ### Update User Information
- ```
- POST /users/{userId}
- ```
- ### List donations made by a User
- ```
- GET /users/{userId}/donations
- ```
- ### List projects participated by a User
- Filter by their role in the project
- ```
- GET /users/{userId}/projects?role=
- ```
- ### Remove a User account
- Allow admins to remove a user account
- ```
- DELETE /users/{userId}
- ```
- ## PROJECTS
- ### List Projects
- Filter by category, owner, location, or distance
- ```
- GET /projects?category=&user=&location=&distance=
- ```
- ### Create a Project Request
- ```
- POST /projects
- ```
- ### Get information about a Project
- ```
- GET /projects/{projectId}
- ```
- ### Update a Project
- ```
- POST /projects/{projectId}
- ```
- ### Get the leaders of project
- ```
- GET /projects/{projectId}/leaders
- ```
- ### Create a leader of a project
- ```
- POST /projects/{projectId}/leaders
- ```
- ### Remove a leader from a project
- ```
- DELETE /projects/{projectId}/leaders
- ```
- ### Join a project
- ```
- POST /projects/{projectId}/join
- ```
- ### Follow a project
- ```
- POST /projects/{projectId}/follow
- ```
- ### Donate to a project
- ```
- POST /projects/{projectId}/donate
- ```
- ### Approve a project
- Allows an Admin to approve a requested project
- ```
- POST /projects/{projectId}/approve
- ```
- ### Remove a project
- ```
- DELETE /projects/{projectId}
- ```
- ## CATEGORIES
- ### List Project Categories
- ```
- GET /categories
- ```
- ### Create a Project Category
- ```
- POST /categories
- ```
- ### Get information about a Project Category
- ```
- GET /categories/{categoryId}
- ```
- ### Update a Project Category
- ```
- POST /categories/{categoryId}
- ```
- ## NOTIFICATIONS
- ### List Notifications
- Query by start date, end date, project, or user
- ```
- GET /notifications&start=&end=&user=&project=
- ```
- ### Send a notification
- ```
- POST /notifications
- {
- projectId: 4892
- message: "Just want y'all to know..."
- }
- ```
- ### Remove a notification
- ```
- DELETE /notifications/{notificationId}
- ```
- ## ORGANIZATIONS
- ### List Organizations
- ```
- GET /organizations
- ```
- ### Create an Organization
- ```
- POST /organizations
- ```
- ### Get information about an Organization
- ```
- GET /organizations/{orgId}
- ```
- ### Update an Organization
- ```
- POST /organizations/{orgId}
- ```
- ### Remove an Organization
- ```
- DELETE /organizations/{orgId}
- ```
- ## DONATIONS
- ### List Donations
- Query by project or user
- ```
- GET /donations&project=&user=
- ```
- ### Get information about a specific donation
- ```
- GET /donations/{donationId}
- ```
- ### Update a donation
- ```
- POST /donations/{donationId}
- ```
- ### Make a general donation
- ```
- POST /donations/general
- ```
- ## FEEDBACK
- ### List feedback
- Query by project or user
- ```
- GET /feedback&project=&user=
- ```
- ### Create feedback
- ```
- POST /feedback
- {
- projectId: 842
- message: "Felt like I was really fullfilling..."
- }
- ```
- ### Remove feedback
- ```
- DELETE /feedback/{feedbackId}
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement