Add trailing slashes to URLs

master
Tanner Collin 6 years ago
parent 3ae25304c2
commit cfe6677e3d
  1. 18
      authserver/README.md

@ -15,11 +15,11 @@ $ . env/bin/activate
## API
The API is RESTful and returns hyperlinked json data.
The API is RESTful and returns hyperlinked json data. URLs require a trailing slash.
### For anonymous users
#### GET `/tooldata`
#### GET `/tooldata/`
Returns all the info about the shop and its tools. Tools are split into categories.
@ -79,7 +79,7 @@ Example response:
### For authenticated users
#### GET `/user`
#### GET `/user/`
Returns info about the logged in user, including which tools they are authorized on. Note the top-level array (a quirk of django-rest-framework).
@ -106,29 +106,29 @@ Example response:
Ensure images are square and 1280x1280 px large. Slugs should be lowercase and one word (replace spaces with hyphens).
#### GET, POST `/tool`
#### GET, POST `/tool/`
Get a list of tools, or post a new tool to the database.
#### GET, PUT, DELETE `/tool/[slug]`
#### GET, PUT, DELETE `/tool/[slug]/`
Get a specific tool, modify or delete an existing one.
#### GET, POST `/category`
#### GET, POST `/category/`
Get a list of categories, or post a new category to the database.
#### GET, PUT, DELETE `/category/[slug]`
#### GET, PUT, DELETE `/category/[slug]/`
Get a specific category, modify or delete an existing one.
Note: you can only delete a category that has no tools.
#### GET `/profile`
#### GET `/profile/`
Get a list of all profiles.
#### GET, PUT `/profile/[id]`
#### GET, PUT `/profile/[id]/`
Get a specific profile, or modify an existing one.

Loading…
Cancel
Save