Member API
๋ฉค๋ฒ ํ์๊ฐ์
HTTP ์์ฒญ
POST /api/member/join HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 94
Host: localhost:8080
{
"email" : "lena.hyatt@yahoo.com",
"password" : "B88B564E8B79",
"nickname" : "Jeremy"
}
| Path | Type | Description |
|---|---|---|
|
|
๋ฉค๋ฒ ์ด๋ฉ์ผ |
|
|
๋ฉค๋ฒ ๋น๋ฐ๋ฒํธ |
|
|
๋ฉค๋ฒ ๋๋ค์ |
HTTP ์๋ต
HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 75
{
"id" : 3,
"email" : "lena.hyatt@yahoo.com",
"nickname" : "Jeremy"
}
| Path | Type | Description |
|---|---|---|
|
|
๋ฉค๋ฒ ID |
|
|
๋ฉค๋ฒ ์ด๋ฉ์ผ |
|
|
๋ฉค๋ฒ ๋๋ค์ |
๋ฉค๋ฒ ๋ก๊ทธ์ธ
HTTP ์์ฒญ
POST /api/member/login HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 72
Host: localhost:8080
{
"email" : "denver.blanda@gmail.com",
"password" : "24F7410803A4"
}
| Path | Type | Description |
|---|---|---|
|
|
๋ฉค๋ฒ ์ด๋ฉ์ผ |
|
|
๋ฉค๋ฒ ๋น๋ฐ๋ฒํธ |
HTTP ์๋ต
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 488
{
"id" : 2,
"email" : "denver.blanda@gmail.com",
"nickname" : "Adrian",
"jwtTokenPair" : {
"accessToken" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwiaWF0IjoxNjk3MDI0NjY3LCJleHAiOjE2OTcwMjU1Njd9.plYl_EPUd82mhuyvZxBXn-sWOU2GaJnQJ5lIohBVF9dgiz29gZf-IMVY5mxO3XhAvzuVq5jza3ncjMuMpwJpIA",
"refreshToken" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIyIiwiaWF0IjoxNjk3MDI0NjY3LCJleHAiOjE2OTcxMTEwNjd9.vtjO3JB6PAyW2AXq-tH7MdD45qfhGq5ToMseVbSqGkvwBIaHuKt59t4R5c9QeuQGV2svrO-GSmyex5xI3lzkEw"
}
}
| Path | Type | Description |
|---|---|---|
|
|
๋ฉค๋ฒ ID |
|
|
๋ฉค๋ฒ ์ด๋ฉ์ผ |
|
|
๋ฉค๋ฒ ๋๋ค์ |
|
|
JWT ์ก์ธ์ค ํ ํฐ |
|
|
JWT ๋ฆฌํ๋ ์ ํ ํฐ |
๋ฉค๋ฒ ์กฐํ
HTTP ์์ฒญ
GET /api/member/1 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
| Parameter | Description |
|---|---|
|
๋ฉค๋ฒ ID |
HTTP ์๋ต
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 77
{
"id" : 1,
"email" : "dana.wolf@hotmail.com",
"nickname" : "Maribel"
}
| Path | Type | Description |
|---|---|---|
|
|
๋ฉค๋ฒ ID |
|
|
๋ฉค๋ฒ ์ด๋ฉ์ผ |
|
|
๋ฉค๋ฒ ๋๋ค์ |
JWT API
์ก์ธ์ค ํ ํฐ ์ฌ์์ฑ
HTTP ์์ฒญ
POST /api/auth/refresh HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMjM0IiwiaWF0IjoxNjk3MDI0NjY2LCJleHAiOjE2OTcwMjU1NjZ9._df_uT9peku8XG7Y0olwSbYnM7IqlMgFo_VivX07LVgHdsqqtqTFO1MIJXkzXvQQL7b1e6dft6GKqxz_NI__Uw
Content-Length: 223
Host: localhost:8080
{
"grantType" : "Bearer",
"refreshToken" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMjM0IiwiaWF0IjoxNjk3MDI0NjY2LCJleHAiOjE2OTcxMTEwNjZ9.0btETiulOj1TijVoFDwEI2416A-rMyEJfpTM4E4wc7lN3fI_qYI8uiCS4_fwVEJ1miZSbDTf2rLV1q9puF_XzA"
}
| Path | Type | Description |
|---|---|---|
|
|
ํ ํฐ ๊ถํ ํ์ |
|
|
๋ก๊ทธ์ธ ์ ๋ฐ๊ธ ๋ฐ์ ๋ฆฌํ๋ ์ ํ ํฐ |
HTTP ์๋ต
HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 417
{
"grantType" : "Bearer",
"accessToken" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMjM0IiwiaWF0IjoxNjk3MDI0NjY2LCJleHAiOjE2OTcwMjU1NjZ9._df_uT9peku8XG7Y0olwSbYnM7IqlMgFo_VivX07LVgHdsqqtqTFO1MIJXkzXvQQL7b1e6dft6GKqxz_NI__Uw",
"refreshToken" : "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMjM0IiwiaWF0IjoxNjk3MDI0NjY2LCJleHAiOjE2OTcxMTEwNjZ9.0btETiulOj1TijVoFDwEI2416A-rMyEJfpTM4E4wc7lN3fI_qYI8uiCS4_fwVEJ1miZSbDTf2rLV1q9puF_XzA"
}
| Path | Type | Description |
|---|---|---|
|
|
ํ ํฐ ๊ถํ ํ์ |
|
|
์ฌ์์ฑ๋ ์ก์ธ์ค ํ ํฐ |
|
|
๋ฆฌํ๋ ์ ํ ํฐ |
POST API
ํฌ์คํธ ๋ชฉ๋ก ์กฐํ
HTTP ์์ฒญ
GET /api/post?page=1&size=3 HTTP/1.1
Host: localhost:8080
| Parameter | Description |
|---|---|
|
ํ์ด์ง ๋ฒํธ |
|
ํ์ด์ง ๋น ๊ฒ์๊ธ ๊ฐ์ |
HTTP ์๋ต
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 669
[ {
"postId" : 12,
"memberId" : 7,
"title" : "Ea hic rerum sint.",
"content" : "Dolorem quibusdam quia sed aliquam commodi nesciunt et. Voluptatem esse fugiat non. Saepe vel ut velit voluptas neque."
}, {
"postId" : 11,
"memberId" : 7,
"title" : "Praesentium et voluptates maiores est magni soluta.",
"content" : "Magnam aliquam tenetur. Ipsam doloremque et."
}, {
"postId" : 10,
"memberId" : 7,
"title" : "Accusamus reiciendis blanditiis officia laborum.",
"content" : "Quibusdam eius iure cupiditate mollitia sit. Illo aut et. Fugit omnis debitis eveniet consequatur saepe. Qui consequatur veniam consectetur incidunt amet inventore vero."
} ]
| Path | Type | Description |
|---|---|---|
|
|
๊ฒ์๊ธ ID |
|
|
๋ฉค๋ฒ(์์ฑ์) ID |
|
|
๊ฒ์๊ธ ์ ๋ชฉ |
|
|
๊ฒ์๊ธ ๋ด์ฉ |
ํฌ์คํธ ์กฐํ
HTTP ์์ฒญ
GET /api/post/6 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
HTTP ์๋ต
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 283
{
"postId" : 6,
"memberId" : 7,
"title" : "Exercitationem iste fugit totam modi porro odio.",
"content" : "Id minus et molestiae. Voluptas consequatur cupiditate non neque voluptas velit ut. Itaque voluptas sunt sed blanditiis aut voluptatem iure. Consequatur sed dolores."
}
| Path | Type | Description |
|---|---|---|
|
|
๊ฒ์๊ธ ID |
|
|
๋ฉค๋ฒ(์์ฑ์) ID |
|
|
๊ฒ์๊ธ ์ ๋ชฉ |
|
|
๊ฒ์๊ธ ๋ด์ฉ |
ํฌ์คํธ ์์ฑ
HTTP ์์ฒญ
POST /api/post HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI2IiwiaWF0IjoxNjk3MDI0NjY4LCJleHAiOjE2OTcwMjU1Njh9.dnKHtkgJPt0Vg0gYP6_PnRsf3FdLsOL85a_WC0D408-2xZfZEjHVICgPpsQ2WZMHK1fqYTIVC1BfhsEMHNGAAA
Content-Length: 277
Host: localhost:8080
{
"title" : "Culpa velit atque quia atque possimus ea reprehenderit maiores sint iste et.",
"content" : "Asperiores voluptates et eveniet facilis aut repudiandae. Nulla ducimus perferendis ratione. Aut occaecati ex ut et et. Eius aut quo hic voluptatem laboriosam nulla."
}
| Path | Type | Description |
|---|---|---|
|
|
๊ฒ์๊ธ ์ ๋ชฉ |
|
|
๊ฒ์๊ธ ๋ด์ฉ |
HTTP ์๋ต
HTTP/1.1 201 Created
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 311
{
"postId" : 5,
"memberId" : 6,
"title" : "Culpa velit atque quia atque possimus ea reprehenderit maiores sint iste et.",
"content" : "Asperiores voluptates et eveniet facilis aut repudiandae. Nulla ducimus perferendis ratione. Aut occaecati ex ut et et. Eius aut quo hic voluptatem laboriosam nulla."
}
| Path | Type | Description |
|---|---|---|
|
|
๊ฒ์๊ธ ID |
|
|
๋ฉค๋ฒ ID |
|
|
๊ฒ์๊ธ ์ ๋ชฉ |
|
|
๊ฒ์๊ธ ๋ด์ฉ |
ํฌ์คํธ ์์
HTTP ์์ฒญ
PUT /api/post/2 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI1IiwiaWF0IjoxNjk3MDI0NjY4LCJleHAiOjE2OTcwMjU1Njh9.0wRCNhaU8b-8D2SIfzZ9vDLq4nJ9AxUK5iZ6ZCmlVsWhD1L8NYGzpMJ5eBMs0hFxBaOWGkvwG-JdJXNk6QM0Fg
Content-Length: 151
Host: localhost:8080
{
"title" : "Perspiciatis ab dolores dolorem quas veniam.",
"content" : "Magni est molestiae dolorem velit nihil. Voluptatem rerum quis facilis."
}
| Path | Type | Description |
|---|---|---|
|
|
๊ฒ์๊ธ ์ ๋ชฉ |
|
|
๊ฒ์๊ธ ๋ด์ฉ |
HTTP ์๋ต
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 185
{
"memberId" : 5,
"postId" : 2,
"title" : "Perspiciatis ab dolores dolorem quas veniam.",
"content" : "Magni est molestiae dolorem velit nihil. Voluptatem rerum quis facilis."
}
| Path | Type | Description |
|---|---|---|
|
|
๊ฒ์๊ธ ID |
|
|
๋ฉค๋ฒ ID |
|
|
๊ฒ์๊ธ ์ ๋ชฉ |
|
|
๊ฒ์๊ธ ๋ด์ฉ |
ํฌ์คํธ ์ญ์
HTTP ์์ฒญ
DELETE /api/post/1 HTTP/1.1
Authorization: bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiI0IiwiaWF0IjoxNjk3MDI0NjY3LCJleHAiOjE2OTcwMjU1Njd9.xztr8goHS6EkmgZn5eTSrOK7wmHQHNsw-uZE6MZu7zE_VpYCGXb4bn_od-sHP6iGC9pWfYiTIgAbD2aumFqLIw
Host: localhost:8080
HTTP ์๋ต
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 18
{
"postId" : 1
}
| Path | Type | Description |
|---|---|---|
|
|
์ญ์ ๋ ๊ฒ์๊ธ ID |