๊ณตํ†ต headers

Name Description optional

access_token

JWT accessToken

refresh_token

JWT refreshToken (accessToken์ด ๋งŒ๋ฃŒ๋œ ๊ฒฝ์šฐ, ์žฌ๋ฐœ๊ธ‰ ์šฉ๋„๋กœ ์‚ฌ์šฉ)

๊ณตํ†ต ResponseCode

Code Description

SUCCESS

success.

INVALID_TOKEN_ERROR

invalid token error occurred.

WRONG_PASSWORD_ERROR

wrong password error occurred.

ALREADY_LOGOUT_ERROR

already logout error occurred.

AUTH_ERROR

auth error occurred.

ACCESS_DENIED_ERROR

access denied error occurred.

EXIST_MEMBER

already member error occurred.

UNKNOWN_ERROR

unknown error occurred.

MANUAL_ERROR

manual error occurred.

NOT_FOUNT_ERROR

not found error occurred.

INVALID_REQUEST_PARAM

invalid request parameter error occurred.

ENCRYPT_ERROR

encrypt error occurred

DECRYPT_ERROR

decrypt error occurred

์œ ์ € API

์œ ์ € ํšŒ์›๊ฐ€์ž…

๐Ÿ‘€ ์œ ์ € ํšŒ์›๊ฐ€์ž…์„ ํ•œ๋‹ค.
POST localhost:8080/api/user/join HTTP/1.1

 
Request

curl
$ curl 'http://localhost:8080/api/user/join' -i -X POST \
    -H 'Content-Type: application/json;charset=utf-8' \
    -H 'Accept: application/json' \
    -H 'access_token: access_token_value' \
    -H 'refresh_token: refresh_token_value' \
    -d '{
  "username" : "test",
  "password" : "test",
  "name" : "test",
  "phoneNumber" : "01011111111"
}'
request body
Depth1 type Description optional

name

String

ํšŒ์› ์ด๋ฆ„

username

String

๋กœ๊ทธ์ธ ID

password

String

๋กœ๊ทธ์ธ PWD

phoneNumber

String

ํšŒ์› ์ „ํ™”๋ฒˆํ˜ธ

sample
POST /api/user/join HTTP/1.1
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: 100
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value

{
  "username" : "test",
  "password" : "test",
  "name" : "test",
  "phoneNumber" : "01011111111"
}

 
Response

response body
Depth1 Depth2 type optional Description format

resultCode

 

String

o

๊ฒฐ๊ณผ ์ฝ”๋“œ

 

resultMessage

 

String

o

๊ฒฐ๊ณผ ๋ฉ”์„ธ์ง€

 

body

 

Object

x

๊ฒฐ๊ณผ

 

 

id

Number

x

ํšŒ์› SEQ

 

sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93

{
  "resultCode" : "SUCCESS",
  "resultMessage" : "success.",
  "body" : {
    "id" : 1
  }
}

์œ ์ € ๋กœ๊ทธ์ธ

๐Ÿ‘€ ์œ ์ € ๋กœ๊ทธ์ธ์„ ์‹œ๋„ํ•œ๋‹ค.
POST localhost:8080/api/user/login HTTP/1.1

 
Request

curl
$ curl 'http://localhost:8080/api/user/login' -i -X POST \
    -H 'Content-Type: application/json;charset=utf-8' \
    -H 'Accept: application/json' \
    -H 'access_token: access_token_value' \
    -H 'refresh_token: refresh_token_value' \
    -d '{
  "username" : "test",
  "password" : "test"
}'
request body
Depth1 type Description optional

username

String

๋กœ๊ทธ์ธ ID

password

String

๋กœ๊ทธ์ธ PWD

sample
POST /api/user/login HTTP/1.1
Content-Type: application/json;charset=utf-8
Accept: application/json
Content-Length: 48
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value

{
  "username" : "test",
  "password" : "test"
}

 
Response

response body
Depth1 Depth2 type optional Description format

resultCode

 

String

o

๊ฒฐ๊ณผ ์ฝ”๋“œ

 

resultMessage

 

String

o

๊ฒฐ๊ณผ ๋ฉ”์„ธ์ง€

 

body

 

Object

x

๊ฒฐ๊ณผ

 

 

accessToken

String

x

JWT accessToken

 

 

refreshToken

String

x

JWT refreshToken

 

sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 165

{
  "resultCode" : "SUCCESS",
  "resultMessage" : "success.",
  "body" : {
    "accessToken" : "access_token_value",
    "refreshToken" : "refresh_token_value"
  }
}

์œ ์ € ๋กœ๊ทธ์•„์›ƒ

๐Ÿ‘€ ์œ ์ € ๋กœ๊ทธ์•„์›ƒ์„ ํ•œ๋‹ค.
DELETE localhost:8080/api/user/logout HTTP/1.1

 
Request

curl
$ curl 'http://localhost:8080/api/user/logout' -i -X DELETE \
    -H 'access_token: access_token_value' \
    -H 'refresh_token: refresh_token_value'
sample
DELETE /api/user/logout HTTP/1.1
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value

 
Response

response body
Depth1 type optional Description format

resultCode

String

o

๊ฒฐ๊ณผ ์ฝ”๋“œ

 

resultMessage

String

o

๊ฒฐ๊ณผ ๋ฉ”์„ธ์ง€

 

body

Null

x

๊ฒฐ๊ณผ

 

sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 79

{
  "resultCode" : "SUCCESS",
  "resultMessage" : "success.",
  "body" : null
}

ํšŒ์› API

ํšŒ์› ์กฐํšŒ(๋กœ๊ทธ์ธ ID)

๐Ÿ‘€ ๋กœ๊ทธ์ธ ID๋กœ ํšŒ์›์„ ์กฐํšŒํ•œ๋‹ค.
GET localhost:8080/api/member/{username} HTTP/1.1

 
Request

curl
$ curl 'http://localhost:8080/api/member/test' -i -X GET \
    -H 'access_token: access_token_value' \
    -H 'refresh_token: refresh_token_value'
path parameter
Name Description

username

๋กœ๊ทธ์ธ ID

sample
GET /api/member/test HTTP/1.1
Host: localhost:8080
access_token: access_token_value
refresh_token: refresh_token_value

 
Response

response body
Depth1 Depth2 type optional Description format

resultCode

 

String

o

๊ฒฐ๊ณผ ์ฝ”๋“œ

 

resultMessage

 

String

o

๊ฒฐ๊ณผ ๋ฉ”์„ธ์ง€

 

body

 

Object

x

๊ฒฐ๊ณผ

 

 

id

Number

x

ํšŒ์› SEQ

 

 

username

String

x

๋กœ๊ทธ์ธ ID

 

 

name

String

x

ํšŒ์› ์ด๋ฆ„

 

 

phoneNumber

String

o

ํšŒ์› ์ „ํ™”๋ฒˆํ˜ธ

 

 

createdAt

String

x

ํšŒ์› ์ƒ์„ฑ์ผ์ž

yyyy-mm-dd HH:mm:ss

 

updatedAt

String

x

ํšŒ์› ์ˆ˜์ •์ผ์ž

yyyy-mm-dd HH:mm:ss

 

imageUrl

String

o

ํšŒ์› ํ”„๋กœํ•„ URL

 

sample
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 305

{
  "resultCode" : "SUCCESS",
  "resultMessage" : "success.",
  "body" : {
    "id" : 1,
    "username" : "test",
    "name" : "test",
    "phoneNumber" : "01011111111",
    "createdAt" : "2025-02-17T17:59:28.911535",
    "updatedAt" : "2025-02-17T17:59:28.911551",
    "imageUrl" : "https://~~.com"
  }
}