Search
Duplicate

API 명세서

Search
기능
HTTP 메서드
API Path
RequestHeader
Request
Response
ResponsHeader
POST
/api/user/signup
{ "username" : "jeon", "password" : "1234", “info" : "잘부탁드립니다.” }
{ "msg" : "가입성공", "status" : "200" }
POST
/api/user/login
{ "username" : "jeon", "password" : "1234" }
{ "msg" : "로그인 성공", "status" : "200" }
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
GET
/api/profile/{id}
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
{ "username" : "jeon", “info" : "잘부탁드립니다.” }
PUT
/api/profile/{id}
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
{ "username" : "hoon", “info" : "잘부탁드립니다. 수정” }
{ "username" : "hoon", “info" : "잘부탁드립니다. 수정” }
PUT
/api/profile/password
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
{ ”password” : “1234”, ”newpassword” : “4321” }
{ "msg" : "비밀번호 수정 성공", "status" : "200" }
POST
/api/user/logout
{ /redirect:/ }
POST
/api/boards
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
{ “title”:”title”, ”content”:”content” }
{ “title”:”title”, ”content”:”content”, "createdAt": "2023-11-16T15:29:28.790981", "modifiedAt": "2023-11-16T15:29:28.790981", }
PUT
/api/boards/{id}
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
{ “title”:”title 수정”, ”content”:”content 수정” }
{ “title”:”title 수정”, ”content”:”content 수정”, "createdAt": "2023-11-16T15:29:28.790981", "modifiedAt": "2023-11-16T15:29:28.790981", }
DELETE
/api/boards/{id}
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJiaW4xMjM0IiwiZXhwIjoxNjY5ODcwNDUyLCJpYXQiOjE2Njk4NjY4NTJ9.mm8wgaV8M70hidhPX4Ut6UONZGaxjA1KnOJT1mO59Xc
{ "msg" : "삭제 성공", "status" : "200" }
GET
/api/boards/{id}
{ “title”:”title”, ”content”:”content”, "createdAt": "2023-11-16T15:29:28.790981", "modifiedAt": "2023-11-16T15:29:28.790981", }
GET
/api/boards
{ “title”:”title1”, ”content”:”content1”, "createdAt": "2023-11-16T15:29:28.790981", "modifiedAt": "2023-11-16T15:29:28.790981", } { “title”:”title2”, ”content”:”content2”, "createdAt": "2023-11-16T15:29:28.790981", "modifiedAt": "2023-11-16T15:29:28.790981", }