이 문서는 REST API를 구현한 JEEOK-MEMBER API 사용 방법을 안내합니다.
개요
Http 동사
본 REST API에서 사용하는 HTTP 동사(verbs)는 가능한 표준 HTTP 와 REST 규약을 따릅니다.
동사 | 용례 |
---|---|
|
리소스를 가져올 때 사용 |
|
새 리소스를 만들 때 사용 |
|
기존 리소스를 수정할 때 사용 |
|
기존 리소스의 일부를 수정할 때 사용 |
|
기존 리소스를 삭제할 떄 사용 |
HTTP 상태 코드
본 REST API에서 사용하는 HTTP 상태 코드는 가능한 표준 HTTP와 REST 규약을 따릅니다.
상태 코드 | 용례 |
---|---|
|
요청을 성공적으로 처리함 |
|
새 리소스를 성공적으로 생성함. 응답의 |
|
기존 리소스를 성공적으로 수정함. |
|
잘못된 요청을 보낸 경우. 응답 본문에 더 오류에 대한 정보가 담겨있다. |
|
요청한 리소스가 없음. |
|
클라이언트의 요청이 서버의 상태와 충돌이 발생한 경우. |
기본 정보
Host : https://member.jeeok.com
로그인 및 권한정보를 request header에 포함하여 인증
header에 member-id 입력할 필요 없음
Key | Value | Description |
---|---|---|
|
|
로그인 후 리턴 받은 accessToken |
사용자 모드
내 정보 조회
요청
Name | Description |
---|---|
|
회원 고유번호(입력하지 말것!) |
GET //delivery.jeeokshop.jeeok.com/member/info HTTP/1.1
member-id: 27
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 204
{"transaction_time":"2022-11-19T20:45:17.230184","code":"SUCCESS","message":null,"errors":null,"data":{"memberId":27,"email":"gildong-hong@jeeok.com","memberName":"홍길동","phoneNumber":"01012345678"}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
회원 고유번호 |
|
|
이메일 |
|
|
회원 이름 |
|
|
회원 휴대폰번호 |
내 정보 수정
요청
Parameter | Description |
---|---|
|
회원 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/member/26/edit HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 54
Host: https
{"memberName":"홍길순","phoneNumber":"01087654321"}
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 119
{"transaction_time":"2022-11-19T20:45:17.1029331","code":"SUCCESS","message":null,"errors":null,"data":{"memberId":26}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
회원 고유번호 |
관리자 모드
회원 목록 조회
요청
GET //delivery.jeeokshop.jeeok.com/admin/members?searchKeyword=jeeok&searchCondition=NAME&page=0&size=10 HTTP/1.1
Host: https
Parameter | Description |
---|---|
|
검색 조건 |
|
검색 키워드 |
|
검색 페이지 |
|
검색 사이즈 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 1935
{"transaction_time":"2022-11-19T20:45:16.9885591","code":"SUCCESS","message":null,"errors":null,"data":[{"memberId":25,"email":"jeeok@gmail.com14","memberName":"jeeok14","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":24,"email":"jeeok@gmail.com13","memberName":"jeeok13","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":23,"email":"jeeok@gmail.com12","memberName":"jeeok12","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":22,"email":"jeeok@gmail.com11","memberName":"jeeok11","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":21,"email":"jeeok@gmail.com10","memberName":"jeeok10","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":20,"email":"jeeok@gmail.com9","memberName":"jeeok9","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":19,"email":"jeeok@gmail.com8","memberName":"jeeok8","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":18,"email":"jeeok@gmail.com7","memberName":"jeeok7","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":17,"email":"jeeok@gmail.com6","memberName":"jeeok6","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}},{"memberId":16,"email":"jeeok@gmail.com5","memberName":"jeeok5","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}}]}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
회원 고유번호 |
|
|
이메일 |
|
|
회원 이름 |
|
|
회원 권한 |
|
|
회원 로그인 유형 |
|
|
회원 휴대폰번호 |
|
|
우편번호 |
|
|
회원 주소 |
회원 단건 조회
요청
Parameter | Description |
---|---|
|
회원 고유 번호 |
GET //delivery.jeeokshop.jeeok.com/admin/members/9 HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 282
{"transaction_time":"2022-11-19T20:45:15.7312776","code":"SUCCESS","message":null,"errors":null,"data":{"memberId":9,"email":"jeeok@gmail.com","memberName":"jeeok","role":"일반유저","auth":"JEEOK","phoneNumber":"01011112222","address":{"zipcode":"83726","address":"서울시"}}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
회원 고유번호 |
|
|
이메일 |
|
|
회원 이름 |
|
|
회원 권한 |
|
|
회원 로그인 유형 |
|
|
회원 휴대폰번호 |
|
|
우편번호 |
|
|
회원 주소 |
회원 저장
요청
POST //delivery.jeeokshop.jeeok.com/admin/members HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 157
Host: https
{"email":"jeeok@gmail.com","password":"1234","memberName":"jeeok","roleType":"ROLE_USER","phoneNumber":"01011112222","zipcode":"83726","address":"서울시"}
Path | Type | Description |
---|---|---|
|
|
이메일 |
|
|
비밀번호 |
|
|
회원 이름 |
|
|
회원 권한 타입 |
|
|
회원 휴대폰번호 |
|
|
우편번호 |
|
|
회원 주소 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 124
{"transaction_time":"2022-11-19T20:45:15.8558899","code":"SUCCESS","message":null,"errors":null,"data":{"savedMemberId":10}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
저장된 회원 고유번호 |
회원 수정
요청
Parameter | Description |
---|---|
|
회원 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/admin/members/7 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 97
Host: https
{"memberName":"update_jeeok","phoneNumber":"01033331234","zipcode":"99802","address":"세종시"}
Path | Type | Description |
---|---|---|
|
|
회원 이름 |
|
|
회원 휴대폰번호 |
|
|
우편번호 |
|
|
회원 주소 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 124
{"transaction_time":"2022-11-19T20:45:15.453699","code":"SUCCESS","message":null,"errors":null,"data":{"updatedMemberId":7}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
수정된 회원 고유번호 |
회원 삭제
요청
Parameter | Description |
---|---|
|
회원 고유번호 |
DELETE //delivery.jeeokshop.jeeok.com/admin/members/8 HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 108
{"transaction_time":"2022-11-19T20:45:15.6382758","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
데이터 |