--- title: API Docs tags: NPTUCSSS --- # auth ```/api/v1/auth``` ## user ```/api/v1/auth/user``` - [x] GET / > get all user list. > response uuid, name - header with token which is authority 2 - [x] GET /me > get user information > response uuid, name, join, last login - header with token - [x] GET /:id > get specific user list. > response uuid, name, join, last login - header with token which is authority 2 - [x] POST /register > user register > response uuid,email,name - json body - email, name require - password at least 8 char - [x] POST /login > user login > response msg, uuid, type, token - json body - email, password - [x] DELETE /:id > delete user > response 'OK' - header with token which is authority 1 - [x] PATCH /password > user change password > > response 'OK' - header with token - json body - password require, at least 8 char - [x] PUT / > user change information > > response 'OK' - header with token - json body - email, name require ## staff ```/api/v1/auth/staff``` - [x] GET / > get all staff list > response uuid, emailhash, name - [x] GET /me > get staff information > response uuid, name, email, skill, tags, description, > join, mailhash - header with token - [x] GET /:id > get specific staff information > response uuid, name, email, skill, tags, description, > join, mailhash - [x] POST /register > transfer user to staff > response 'OK' - header with token which is autority 1 - json body - id required - [x] POST /login > staff login > response msg, uuid, type, token - json body - email, password required - [x] DELETE /:id > delete staff > response 'OK' - header with token which is authority 1 - [x] PATCH /password > staff change password > response 'OK' - header with token - json body - password required - [x] PATCH /:id > change staff authority > response 'OK' - header with token which is authority 1 - json body - authority required - [ ] PUT / > staff edit information > response 'OK' - header with token - json body - name, email, skill, description, tags required # Announcement ```/api/v1/auth/announcement``` - [x] GET / > get announcement which is not expired > response uuid, title, content, type, > release time, update time, expire - [x] GET /all > get all announcement > response uuid, title, content, type, > release time, update time, expire - [x] GET /:id > get specific announcement > response uuid, title, content, type, > release time, update time, expire > history list - [x] POST / > post announcement - header with token which is authority 2 - json body - title, content, type, expire required - [x] DELETE /:id > delete announcement - header with token which is authority 2 - [x] PUT /:id > edit announcement - header with token which is authority 2 - json body - title, content, type, expire required - detail option