# API Design This file describes the API that the software adheres to. All routes are defined under a shared `api` namespace. `(A)` means the route can only be accessed by an admin user. ## v1 ## Authentification * POST `/auth/login` - generate new JWT & refresh token pair given user credentials * POST `/auth/refresh` - generate new JWT & refresh token pair given valid refresh token ## Posts * GET `/posts?&` - get list of posts from the default feed given offset & limit * GET `/posts?&&` - get list of posts of a specific section * (A) POST `/posts` - create a new post * GET `/posts/` - get a specific post * (A) DELETE `/posts/` - delete a post * (A) PATCH `/posts/` - patch a post ## Sections * GET `/sections?&` - get list of sections * GET `/sections/` - get specific section * (A) POST `/sections` - create a new section * (A) PATCH `/sections/` - patch a section * (A) DELETE `/sections/` - delete a section (what happens with posts?) ## Users * (A) GET `/users?&` * (A) POST `/users` * (A) GET `/users/` * (A) PATCH `/users/` * (A) DELETE `/users/` ## Feeds WIP