-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
Daniel Upchurch edited this page Feb 26, 2021
·
3 revisions
The Community Table API is organized around REST. Our API has predictable resource oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.
/api/auth
/api/resources
Routes associates with user authentication.
- GET
/
: Check if a user is authenticated - POST
/login
: Attempts to log in a user - GET
/logout
: Logs out a user
Routes for querying and accessing all resource data, all of which return the data as JSON.
- GET
/
: Returns a list of all resources. - GET
/:id
: Returns a specific resource. - DELETE
/:id
: Delete the specified resource and return a response if deleted correctly or the error otherwise. - GET
/categories/:id
: Returns a list of all resources of a specified resource category. - POST
/create_resource
: Posts a new resource to the resource database and returns the resource if successful or the error if unsuccessful.