Spring 게시판 8 - 회원 API spec

춤인형의 개발일지·2025년 1월 17일

Spring실습

목록 보기
9/40

회원 API

API Spec

  • 생성

    • Method : POST
    • Path : /users/infos
    • Example Endpoint : 'https://localhost:8080/users/infos'
    • Request : Request Body
      • String userName : 사용자이름
      • String userId : 사용자 id
      • String userPassword : 사용자 비밀번호
      • String userEmail : 사용자 이메일
    • Response :
      • Long id : 사용자 ID
      • String userName : 사용자이름
      • String userId : 사용자 id
      • String userPassword : 사용자 비밀번호
      • String userEmail : 사용자 이메일
        {
        "id" : 1
        "userName" : "추추"
        "userId" : "chuchu"
        "userPassword" : "chu123"
        "userEmail" : "chu@naver.com"
        }
  • 조회(프로필 조회 / userName만 보임)

    • Method : GET
    • Path : /users
    • Example Endpoint : 'https://localhost:8080/users'
    • Request : Request Body
      • String userName : 사용자이름
    • Response :
      • Long id : 사용자 ID
      • String userName : 사용자이름
        {
        "id" : 1,
        "userName" : 추추
        }
  • 조회(사용자 정보 조회 / 아이디 비번 전부 다 조회)

    • Method : GET
    • Path : /users
    • Example Endpoint : 'https://localhost:8080/user?id=1'
    • Request : QueryString
      • Long id : 사용자 ID
    • Response :
      • Long id : 사용자 ID
      • String userName : 사용자 이름
      • String userId : 사용자 id
      • String userPassword : 사용자 비밀번호
      • String userEmail : 사용자 이메일
        {
        "id" : 1
        "userName" : "추추"
        "userId" : "chuchu"
        "userPassword" : "chu123"
        "userEmail" : "chu@naver.com"
        }
  • 수정

    • Method : PUT
    • Path : /users/{userId}
    • Example Endpoint : 'https://localhost:8080/users/userId=1'
    • Request
      • Path
        • Long id 사용자 ID
      • Request Body
        • String userName : 사용자이름
        • String userId : 사용자 id
        • String userPassword : 사용자 비밀번호
        • String userEmail : 사용자 이메일
    • Response :
      • Long id : 사용자 ID
      • String userName : 사용자이름
      • String userId : 사용자 id
      • String userPassword : 사용자 비밀번호
      • String userEmail : 사용자 이메일
        {"id" : 1
        "userName" : "추추"
        "userId" : "chuchu"
        "userPassword" : "chu123"
        "userEmail" : "chu@naver.com"
        }
  • 삭제

0개의 댓글