게시물 조회하기

해당 id를 가진 게시물 한 건을 조회하는 API입니다.

METHOD

GET

URL

/posts/:id
  • id: 게시물 고유 id

RESPONSE

  • id: 게시물 고유 id (number)

  • user: 게시물 작성자 정보(object)

    • email: 이메일 (string)

    • name: 이름 (string)

    • nickname: 별명 (string)

    • profileImage: 작성자 프로필 사진 (이미지 링크 string or base64 encoded string / BLOB)

  • title: 게시물 제목 (string)

  • content: 게시물 내용 (string)

  • likeCount: 좋아요 수 (number)

  • viewCount: 조회수 (number)

  • createdAt: 게시물 작성 날짜 (string / DATETIME)

  • modifiedAt: 게시물 수정 날짜 (string / DATETIME)

  • category: 게시물 카테고리 정보 (object)

    • id: 카테고리 id (number)

    • name: 카테고리 이름 (string)

    • level: 카레고리 level, (1: 상위 카테고리, 2: 하위 카테고리)

    • postNum: 카테고리가 가지고 있는 게시물 수

    • parentCategoryId: 상위 카테고리 id

  • images: 게시물 이미지 정보 (image 배열)

    • image: 이미지 정보(object)

      • id: 이미지 id (number)

      • path: 이미지 URI 경로 (string)

  • files: 게시물 첨부파일 (file 배열)

    • file: 파일 정보(object)

      • id: 파일 id (number)

      • path: 이미지 URI 경로 (string)

  • commentNum: 모든 댓글 수 (number)

  • commentPackList: 상위 댓글 리스트 (commentPack 리스트)

    • commentPack

      • comment: 상위 댓글 정보 (object)

        • id: 댓글 고유 id (number)

        • user: 댓글 작성자 정보(object)

          • email: 이메일 (string)

          • name: 이름 (string)

          • nickname: 별명 (string)

          • profileImage: 작성자 프로필 사진 (이미지 링크 string or base64 encoded string / BLOB)

        • content: 댓글 내용 (string)

        • isPublic: 공개 여부 (boolean)

        • createdAt: 댓글 작성 날짜 (string / DATETIME)

        • modifiedAt: 댓글 수정 날짜 (string / DATETIME)

      • childNum: 해당 댓글의 대댓글 수

      • childList: 하위 댓글 리스트 (child 리스트)

        • child

          • id: 댓글 고유 id (number)

          • user: 댓글 작성자 정보(object)

            • email: 이메일 (string)

            • name: 이름 (string)

            • nickname: 별명 (string)

            • profileImage: 작성자 프로필 사진 (이미지 링크 string or base64 encoded string / BLOB)

          • content: 댓글 내용 (string)

          • isPublic: 공개 여부 (boolean)

          • createdAt: 댓글 작성 날짜 (string / DATETIME)

          • modifiedAt: 댓글 수정 날짜 (string / DATETIME)

RESPONSE EXAMPLE

success

HTTP Status code : 200 OK

fail

HTTP Status code : 400 Bad Request

name

type

description

status

string

HTTP status

message

string

에러 메시지

Last updated

Was this helpful?