1. HTTP 메서드

메서드

설명

GET

리소스를 조회할 때 사용합니다. 서버의 상태나 데이터를 변경하지 않습니다. (안정성 보장)

POST

주로 새로운 리소스를 생성하거나, 서버에 명령을 전달하여 상태 변화를 유도할 때 사용합니다.

PUT

대상 리소스를 완전히 대체하거나, 존재하지 않으면 새로 생성할 때 사용합니다. (멱등성 보장)

DELETE

대상 리소스를 서버에서 제거할 때 사용합니다. (멱등성 보장)

  • 여기서 멱등성이란, 동일한 요청을 여러 번 반복하더라도 결과적으로 리소스는 요청이 의도한 성공 상태로 유지되며, 서버의 상태는 변하지 않음을 의미합니다. (예: 삭제된 리소스에 대해 다시 DELETE 요청을 보낼 경우 404 Not Found 가 발생할 수 있지만, 리소스가 삭제된 상태는 유지되므로 멱등성은 지켜집니다.)

2. HTTP 상태코드

상태코드

설명

200 OK

요청이 성공적으로 완료됐습니다.

201 Created

요청이 성공적으로 처리되었고, 새로운 리소스가 생성되었습니다. (주로 POST 요청 시 사용)

204 No Content

요청이 성공적으로 처리되었으나, 반환할 콘텐츠가 없습니다. (예: 삭제 성공 또는 업데이트 성공 후 응답 본문이 필요 없는 경우)

302 Found

클라이언트는 Location 헤더에 명시된 URL로 임시 리디렉션되어야 합니다. (예: 소셜 로그인 인가 페이지로 이동할 때 사용)

400 Bad Request

잘못된 요청입니다. 클라이언트가 보낸 데이터가 유효하지 않거나 서버가 이해할 수 없습니다.

401 Unauthorized

인증이 필요하거나, 인증에 실패했습니다. (예: 토큰 없음, 잘못된 자격 증명)

403 Forbidden

서버가 요청을 이해했지만, 권한이 없어 요청을 거부했습니다. (인증은 되었지만, 접근 권한이 없음)

404 Not Found

요청한 리소스를 찾을 수 없습니다. (예: 존재하지 않는 ID로 요청)

409 Conflict

현재 서버 상태와 충돌이 발생하여 요청을 처리할 수 없습니다. (예: 중복된 데이터, 리소스 상태 충돌 등)

500 Internal Server Error

서버 내부 오류로 요청을 처리할 수 없습니다. (예기치 못한 예외 발생 등)

3. 회원/인증 API 명세

3.1. 이메일 유효성 확인

3.1.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/users/email-available

  • 권한 : 누구든지

이메일이 우리 서비스에서 사용 가능한 이메일인지 확인합니다.

3.1.2. 요청

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

email

유효성 확인 대상이 되는 이메일

true

3.1.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

yourEmail

String

요청 시 전달한 이메일

true

isAvailable

Boolean

이메일 사용이 가능한지 여부(부울값)

true

reasonCode

String

이메일 사용 가능/불가능 시 그 이유를 설명하는 코드

true

reasonMessage

String

reasonCode 를 설명하는 간단한 사유 메시지

true

reasonDescription

String

reasonCode 를 설명하는 상세한 사유 메시지

true

응답 참고사항 : reasonCode 필드?

이메일 유효성 확인 시, 이메일 사용 가능/불가능 사유를 설명하는 reasonCode 필드가 포함됩니다. 이 reasonCode 는 다음 유형이 있습니다.

  • EmailAvailableCheck.Available: 이메일이 우리 서비스에서 사용 가능한 이메일일 때

  • EmailAvailableCheck.Taken: 이메일의 포맷은 유효하지만 이미 다른 사용자에 의해 사용되고 있어 사용불가능한 이메일일 때

  • EmailAvailableCheck.InvalidFormat: 이메일의 포맷이 유효하지 않을 때

3.1.4. 예시

요청 예시
GET /api/v1/users/email-available?email=hello@gmail.com HTTP/1.1
Host: api.board-system.site
응답 예시
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: 229

{
  "yourEmail" : "hello@gmail.com",
  "isAvailable" : true,
  "reasonCode" : "EmailAvailableCheck.Available",
  "reasonMessage" : "사용 가능한 이메일",
  "reasonDescription" : "이 이메일은 사용 가능합니다."
}

3.2. username 유효성 확인

3.2.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/users/username-available

  • 권한 : 누구든지

username(사용자관점 아이디) 이 우리 서비스에서 사용 가능한 username 인지 확인합니다.

3.2.2. 요청

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

username

유효성 확인 대상이 되는 사용자관점 아이디(username)

true

3.2.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

yourUsername

String

요청 시 전달한 사용자관점 아이디(username)

true

isAvailable

Boolean

username 사용이 가능한지 여부(부울값)

true

reasonCode

String

username 사용 가능/불가능 시 그 이유를 설명하는 코드

true

reasonMessage

String

reasonCode 를 설명하는 간단한 사유 메시지

true

reasonDescription

String

reasonCode 를 설명하는 상세한 사유 메시지

true

응답 참고사항 : reasonCode 필드?

username 유효성 확인 시, username 사용 가능/불가능 사유를 설명하는 reasonCode 필드가 포함됩니다. 이 reasonCode 는 다음 유형이 있습니다.

  • UsernameAvailableCheck.Available: username 이 우리 서비스에서 사용 가능할 때

  • UsernameAvailableCheck.Taken: username 의 포맷은 유효하지만 이미 다른 사용자에 의해 사용되고 있어 사용불가능할 때

  • UsernameAvailableCheck.InvalidFormat: username 의 포맷이 유효하지 않을 때

3.2.4. 예시

요청 예시
GET /api/v1/users/username-available?username=ttasjwi HTTP/1.1
Host: api.board-system.site
응답 예시
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: 265

{
  "yourUsername" : "ttasjwi",
  "isAvailable" : true,
  "reasonCode" : "UsernameAvailableCheck.Available",
  "reasonMessage" : "사용 가능한 사용자아이디(username)",
  "reasonDescription" : "이 사용자아이디(username)는 사용 가능합니다."
}

3.3. 닉네임 유효성 확인

3.3.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/users/nickname-available

  • 권한 : 누구든지

닉네임이 우리 서비스에서 사용 가능한 닉네임인지 확인합니다.

3.3.2. 요청

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

nickname

유효성 확인 대상이 되는 닉네임

true

3.3.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

yourNickname

String

요청 시 전달한 닉네임

true

isAvailable

Boolean

닉네임 사용이 가능한지 여부(부울값)

true

reasonCode

String

닉네임 사용 가능/불가능 시 그 이유를 설명하는 코드

true

reasonMessage

String

reasonCode 를 설명하는 간단한 사유 메시지

true

reasonDescription

String

reasonCode 를 설명하는 상세한 사유 메시지

true

응답 참고사항 : reasonCode 필드?

닉네임 유효성 확인 시, 닉네임 사용 가능/불가능 사유를 설명하는 reasonCode 필드가 포함됩니다. 이 reasonCode 는 다음 유형이 있습니다.

  • NicknameAvailableCheck.Available: 닉네임이 우리 서비스에서 사용 가능할 때

  • NicknameAvailableCheck.Taken: 닉네임의 포맷은 유효하지만 이미 다른 사용자에 의해 사용되고 있어 사용불가능할 때

  • NicknameAvailableCheck.InvalidFormat: 닉네임의 포맷이 유효하지 않을 때

3.3.4. 예시

요청 예시
GET /api/v1/users/nickname-available?nickname=%EB%95%83%EC%A5%90 HTTP/1.1
Host: api.board-system.site
응답 예시
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: 226

{
  "yourNickname" : "땃쥐",
  "isAvailable" : true,
  "reasonCode" : "NicknameAvailableCheck.Available",
  "reasonMessage" : "사용 가능한 닉네임",
  "reasonDescription" : "이 닉네임은 사용 가능합니다."
}

3.4. 인증이메일 발송

3.4.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/users/email-verification/start

  • 권한 : 누구나

이메일 인증을 위해, 이메일을 발송합니다. 이 때, 지정된 이메일을 통해 사용자의 이메일 인증 코드(code)가 전달됩니다. 지정된 시간(code 만료 시각)까지 이메일 인증을 완료해야합니다.

3.4.2. 요청

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

email

String

이메일

true

유효한 형식의 이메일이어야함.

3.4.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

email

String

요청 시 전달한 이메일

true

codeExpiresAt

String

이메일 인증을 위한 code 값이 만료되는 시각(유효한계시각)

true

3.4.4. 예시

요청 예시
POST /api/v1/users/email-verification/start HTTP/1.1
Content-Type: application/json
Content-Length: 33
Host: api.board-system.site

{
  "email" : "hello@gmail.com"
}
응답 예시
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: 82

{
  "email" : "hello@gmail.com",
  "codeExpiresAt" : "2025-01-01T00:05:00+09:00"
}

3.5. 이메일 인증

3.5.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/users/email-verification

  • 권한 : 누구나

이메일 인증을 수행합니다. 인증에 성공하면, 인증만료시각까지 이메일 인증이 유효합니다.

3.5.2. 요청

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

email

String

인증의 대상이 되는 email

true

code

String

이메일을 통해 전달받은 이메일 인증코드

true

3.5.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

email

String

요청 시 전달한 이메일

true

verificationExpiresAt

String

이메일 인증이 만료되는 시각

true

3.5.4. 예시

요청 예시
POST /api/v1/users/email-verification HTTP/1.1
Content-Type: application/json
Content-Length: 52
Host: api.board-system.site

{
  "email" : "hello@gmail.com",
  "code" : "1234"
}
응답 예시
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: 90

{
  "email" : "hello@gmail.com",
  "verificationExpiresAt" : "2025-01-01T00:34:00+09:00"
}

3.6. 회원가입

3.6.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/users

  • 권한 : 누구나

회원가입을 수행합니다. 소셜 로그인 방식으로도 회원가입이 가능합니다. 이 방식으로 회원 가입 후 소셜 로그인을 통해 소셜 연동을 해도 무방합니다. (대신 소셜 계정의 이메일이 같아야합니다.)

3.6.2. 요청

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

email

String

이메일

true

유효한 포맷이어야 하고, 인증된(현재 유효한) 이메일이어야 함.

password

String

패스워드

true

4자 이상 32자 이하의 문자열

username

String

사용자아이디(username)

true

4자 이상 15자 이하, 영어 소문자, 숫자, 언더바만 허용. 공백 허용 안 됨.

nickname

String

닉네임

true

1자 이상 15자 이하, 한글, 영문자(대,소), 숫자만 허용

3.6.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

userId

String

사용자 식별자(Id)

true

email

String

사용자 이메일

true

username

String

사용자관점 아이디

true

nickname

String

사용자 닉네임

true

role

String

사용자 역할

true

registeredAt

String

회원 가입 시점

true

3.6.4. 예시

요청 예시
POST /api/v1/users HTTP/1.1
Content-Type: application/json
Content-Length: 107
Host: api.board-system.site

{
  "email" : "hello@gmail.com",
  "password" : "1234",
  "username" : "ttasjwi",
  "nickname" : "땃쥐"
}
응답 예시
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: 169

{
  "userId" : "1",
  "email" : "hello@gmail.com",
  "username" : "ttasjwi",
  "nickname" : "땃쥐",
  "role" : "USER",
  "registeredAt" : "2025-01-01T00:29:00+09:00"
}

3.7. 로그인

3.7.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/auth/login

  • 권한 : 누구나

이메일과 패스워드를 통해 서비스에 로그인합니다.

3.7.2. 요청

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

email

String

이메일

true

존재하는 회원의 이메일이어야함.

password

String

패스워드

true

실제 회원의 패스워드와 일치해야함.

3.7.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

accessToken

String

액세스 토큰

true

accessTokenExpiresAt

String

액세스 토큰 만료시각

true

accessTokenType

String

액세스 토큰 타입

true

refreshToken

String

리프레시 토큰

true

refreshTokenExpiresAt

String

리프레시 토큰 만료시각

true

3.7.4. 예시

요청 예시
POST /api/v1/auth/login HTTP/1.1
Content-Type: application/json
Content-Length: 57
Host: api.board-system.site

{
  "email" : "test@test.com",
  "password" : "1234567"
}
응답 예시
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: 215

{
  "accessToken" : "accessToken",
  "accessTokenExpiresAt" : "2025-01-01T00:48:00+09:00",
  "accessTokenType" : "Bearer",
  "refreshToken" : "refreshToken",
  "refreshTokenExpiresAt" : "2025-01-02T00:18:00+09:00"
}

3.8. 소셜서비스 인가

3.8.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/auth/social-service-authorization/{socialServiceId}

  • 권한 : 누구나

소셜 로그인을 위해서는, 우리 서비스가 소셜 서비스로부터 사용자의 정보를 얻어올 수 있는 허가가 필요합니다. 사용자 허가를 받을 수 있도록, 사용자를 소셜 서비스의 승인 페이지로 리다이렉트 시키는 작업이 필요합니다. 이 API를 호출하면, 소셜 서비스 측의 승인 페이지로 리다이렉트 시킵니다.

소셜 로그인을 위해서는 반드시 사전에 이 API 를 호출해야합니다.

현재 우리 서비스에서 지원하는 소셜 서비스는 구글, 카카오, 네이버입니다.

3.8.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

socialServiceId

소셜서비스 식별자(naver, kakao, google 중 하나)

true

3.8.3. 응답

응답 헤더

헤더명

설명

필수여부

Location

소셜서비스 인가 요청 URL

true

3.8.4. 예시

요청 예시
GET /api/v1/auth/social-service-authorization/google HTTP/1.1
Host: api.board-system.site
응답 예시
HTTP/1.1 302 Found
Location: https://accounts.google.com/o/oauth2/v2/auth?client_id={clientId}&redirect_uri={redirectUri}&response_type={responseType}&scope={scope}&state={state}&code_challenge={codeChallenge}&code_challenge_method={codeChallengeMethod}&nonce={nonce}
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

3.9. 소셜로그인

  • 메서드 : POST

  • URL : /api/v1/auth/social-login

  • 권한 : 누구나

소셜 서비스에 허락을 구하고나면, 리다이렉트와 동시에 쿼리 파라미터에 code, state가 전달됩니다. URL 디코딩을 한 뒤 소셜로그인 엔드포인트로 이 값들을 JSON 형태로 전달하면 소셜로그인을 할 수 있습니다.

이 때 우리 서비스에 가입되지 않은 사용자는 회원가입이 되면서 소셜 서비스 연동이 되고, 우리 서비스에 가입됐으나 소셜 연동이 되지 않은 사용자는 소셜 서비스 연동이 됩니다.

3.9.1. 요청

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

state

String

최초 소셜로그인 인가 요청 시 발급받은 state

true

code

String

소셜 서비스 승인 후 발급받은 code

true

3.9.2. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

accessToken

String

액세스 토큰

true

accessTokenExpiresAt

String

액세스 토큰 만료시각

true

accessTokenType

String

액세스 토큰 타입

true

refreshToken

String

리프레시 토큰

true

refreshTokenExpiresAt

String

리프레시 토큰 만료시각

true

userCreated

Boolean

사용자 생성 여부(최초 가입시 true)

true

createdUser

CreatedUser

생성된 사용자(최초 가입시)

createdUser.userId

String

사용자 식별자(Id)

createdUser.email

String

사용자 이메일

createdUser.username

String

사용자관점 아이디

createdUser.nickname

String

사용자 닉네임

createdUser.role

String

사용자 역할

createdUser.registeredAt

String

회원 가입 시점

3.9.3. 예시

요청 예시
POST /api/v1/auth/social-login HTTP/1.1
Content-Type: application/json
Content-Length: 61
Host: api.board-system.site

{
  "code" : "adfadfadfadf",
  "state" : "adfadfadfhadhfag"
}
응답 예시
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: 460

{
  "accessToken" : "accessToken",
  "accessTokenType" : "Bearer",
  "accessTokenExpiresAt" : "2025-01-01T00:18:00+09:00",
  "refreshToken" : "refreshToken",
  "refreshTokenExpiresAt" : "2025-01-02T00:13:00+09:00",
  "userCreated" : true,
  "createdUser" : {
    "userId" : "12345",
    "email" : "test@gmail.com",
    "username" : "randomUserName",
    "nickname" : "randomNickname",
    "role" : "USER",
    "registeredAt" : "2025-01-01T00:13:00+09:00"
  }
}

3.10. 토큰 재갱신

  • 메서드 : POST

  • URL : /api/v1/auth/token-refresh

  • 권한 : 누구나

리프레시토큰을 통해 토큰을 재발급(갱신)합니다.

액세스토큰이 새로 발급되고, 리프레시토큰의 만료시간에 임박한 경우, 리프레시 토큰도 재갱신합니다. (이 경우 기존 리프레시토큰은 무효화되므로 이 리프레시 토큰을 꼭 써주세요.)

매 요청마다, 헤더로 Authorization: <token_type> 액세스토큰 을 보내면, 서비스 사용자 인증에 사용합니다.

액세스토큰이 만료될 경우 리프레시 토큰을 가지고, 토큰 재갱신 API를 호출하면 액세스 토큰 재갱신에 사용할 수 있습니다.

3.10.1. 요청

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

refreshToken

String

현재 유효한 리프레시토큰 값

true

3.10.2. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

accessToken

String

액세스 토큰

true

accessTokenExpiresAt

String

액세스 토큰 만료시각

true

accessTokenType

String

액세스 토큰 타입

true

refreshToken

String

리프레시 토큰

true

refreshTokenExpiresAt

String

리프레시 토큰 만료시각

true

refreshTokenRefreshed

Boolean

리프레시 토큰이 재갱신됐는 지 여부

true

3.10.3. 예시

요청 예시
POST /api/v1/auth/token-refresh HTTP/1.1
Content-Type: application/json
Content-Length: 37
Host: api.board-system.site

{
  "refreshToken" : "refreshToken"
}
응답 예시
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: 253

{
  "accessToken" : "newAccessToken",
  "accessTokenType" : "Bearer",
  "accessTokenExpiresAt" : "2025-01-01T00:37:00+09:00",
  "refreshToken" : "refreshToken",
  "refreshTokenExpiresAt" : "2025-01-02T00:32:00+09:00",
  "refreshTokenRefreshed" : false
}

4. 게시판 API 명세

4.1. 게시판 생성

4.1.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/boards

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시판을 생성합니다.

4.1.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

slug

String

게시판 슬러그(게시판 구분 영문자)

true

최소 4자, 최대 20자. 영어 소문자와 숫자로만 구성되어야 함.

name

String

게시판 이름

true

최소 2자, 최대 6자. 영어, 숫자, 완성형 한글, 스페이스, / 로만 구성되어야 함.

description

String

게시판 설명

true

최대 100자

4.1.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

boardId

String

게시판 식별자(Id)

true

slug

String

게시판 슬러그

true

name

String

게시판 이름

true

description

String

게시판 설명

true

managerId

String

게시판 관리자 식별자(Id)

true

createdAt

String

게시판 생성 시점

true

4.1.4. 예시

요청 예시
POST /api/v1/boards HTTP/1.1
Content-Type: application/json
Authorization: Bearer AccessToken
Content-Length: 95
Host: api.board-system.site

{
  "name" : "고양이",
  "description" : "고양이 게시판입니다.",
  "slug" : "cat"
}
응답 예시
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: 183

{
  "boardId" : "1",
  "name" : "고양이",
  "description" : "고양이 게시판입니다.",
  "managerId" : "1557",
  "slug" : "cat",
  "createdAt" : "2025-01-01T00:06:00+09:00"
}

4.2. 게시글 카테고리 생성

4.2.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/boards/{boardId}/article-categories

  • 권한 : 게시판의 관리자만 허용

  • 인증방식 : 액세스 토큰

게시판 내에서 게시글을 분류하기 위한, 게시글 카테고리을 생성합니다. 게시글을 작성하기 위해서는 게시글 카테고리를 지정해야하므로, 게시판이 정상적으로 동작하기 위해서는 게시글 카테고리를 적어도 하나 생성해야합니다.

4.2.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

boardId

게시판 식별자(Id)

true

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

name

String

게시글 카테고리 이름

true

최소 1자, 최대 20자, 양끝 공백 허용 안 함.

slug

String

게시글 카테고리 슬러그(게시글 카테고리 구분 영문자)

true

최소 1자, 최대 8자, 영어 대소문자 및 숫자만 허용

allowWrite

Boolean

일반 사용자가 게시글 작성을 할 수 있는 지 여부

true

allowSelfEditDelete

Boolean

작성자가 스스로 게시글 삭제 또는 수정을 할 수 있는 지 여부

true

allowComment

Boolean

일반 사용자가 댓글을 작성할 수 있는 지 여부

true

allowLike

Boolean

사용자들이 게시글을 좋아요 할 수 있는 지 여부

true

allowDislike

Boolean

사용자들이 게시글을 싫어요 할 수 있는 지 여부

true

4.2.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleCategoryId

String

게시글 카테고리 식별자(Id)

true

boardId

String

게시판 식별자(Id)

true

name

String

게시글 카테고리 이름

true

slug

String

게시글 카테고리 슬러그(게시글 카테고리 구분 영문자)

true

allowWrite

Boolean

일반 사용자가 게시글 작성을 할 수 있는 지 여부

true

allowSelfEditDelete

Boolean

작성자가 스스로 게시글 삭제 또는 수정을 할 수 있는 지 여부

true

allowComment

Boolean

일반 사용자가 댓글을 작성할 수 있는 지 여부

true

allowLike

Boolean

사용자들이 게시글을 좋아요 할 수 있는 지 여부

true

allowDislike

Boolean

사용자들이 게시글을 싫어요 할 수 있는 지 여부

true

createdAt

String

게시글 카테고리 생성시점

true

4.2.4. 예시

요청 예시
POST /api/v1/boards/1/article-categories HTTP/1.1
Content-Type: application/json
Authorization: Bearer AccessToken
Content-Length: 172
Host: api.board-system.site

{
  "name" : "일반",
  "slug" : "general",
  "allowWrite" : true,
  "allowSelfEditDelete" : true,
  "allowComment" : true,
  "allowLike" : true,
  "allowDislike" : true
}
응답 예시
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: 272

{
  "articleCategoryId" : "12435346",
  "boardId" : "1",
  "name" : "일반",
  "slug" : "general",
  "allowWrite" : true,
  "allowSelfEditDelete" : true,
  "allowComment" : true,
  "allowLike" : true,
  "allowDislike" : true,
  "createdAt" : "2025-01-01T00:00:00+09:00"
}

5. 게시글 API 명세

5.1. 게시글 작성

5.1.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/articles

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글을 작성합니다.

5.1.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

title

String

게시글 제목

true

최대 50자. 공백만으로 구성되어선 안 됨.

content

String

게시판 본문

true

최대 3000자.

articleCategoryId

Number

게시글 카테고리 식별자

true

실제 게시글 카테고리가 존재해야함.

5.1.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

title

String

게시글 제목

true

content

String

게시글 본문

true

boardId

String

게시글이 속한 게시판 식별자(Id)

true

articleCategoryId

String

게시글 카테고리 식별자(Id)

true

writerId

String

작성자 식별자(Id)

true

writerNickname

String

작성시점의 작성자 닉네임

true

createdAt

String

작성 시각

true

modifiedAt

String

마지막 수정 시각

true

5.1.4. 예시

요청 예시
POST /api/v1/articles HTTP/1.1
Content-Type: application/json
Authorization: Bearer AccessToken
Content-Length: 121
Host: api.board-system.site

{
  "title" : "고양이 귀여워요",
  "content" : "근데 내가 더 귀여워요",
  "articleCategoryId" : 1234558
}
응답 예시
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: 329

{
  "articleId" : "28383737373",
  "title" : "고양이 귀여워요",
  "content" : "근데 내가 더 귀여워요",
  "boardId" : "131433451451",
  "articleCategoryId" : "1234558",
  "writerId" : "1557",
  "writerNickname" : "땃쥐",
  "createdAt" : "2025-01-01T00:18:00+09:00",
  "modifiedAt" : "2025-01-01T00:18:00+09:00"
}

5.2. 게시글 단건 상세 조회

5.2.1. 기본정보

  • 메서드 : GET

  • URL : /api/v2/articles/{articleId}

  • 권한 : 누구나(인증사용자 맞춤정보가 필요한 경우, 액세스토큰 지참)

  • 인증방식 : 액세스 토큰

게시글을 단건 조회합니다.

5.2.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자(Id)

true

5.2.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

title

String

게시글 제목

true

content

String

게시글 본문

true

board

Board

게시글이 속한 게시판 정보

true

board.boardId

String

게시글이 속한 게시판 식별자(Id)

true

board.name

String

게시글이 속한 게시판 이름

true

board.slug

String

게시글이 속한 게시판 슬러그(게시글 구분 영문자)

true

articleCategory

ArticleCategory

게시글이 속한 카테고리

true

articleCategory.articleCategoryId

String

게시글이 속한 게시글 카테고리 식별자(Id)

true

articleCategory.name

String

게시글이 속한 게시글 카테고리 이름

true

articleCategory.slug

String

게시글이 속한 게시글 카테고리 슬러그(게시글 카테고리 구분 영문자)

true

articleCategory.allowWrite

Boolean

일반 사용자가 게시글 작성을 할 수 있는 지 여부

true

articleCategory.allowSelfEditDelete

Boolean

작성자가 스스로 게시글 삭제 또는 수정을 할 수 있는 지 여부

true

articleCategory.allowComment

Boolean

일반 사용자가 댓글을 작성할 수 있는 지 여부

true

articleCategory.allowLike

Boolean

사용자들이 게시글을 좋아요 할 수 있는 지 여부

true

articleCategory.allowDislike

Boolean

사용자들이 게시글을 싫어요 할 수 있는 지 여부

true

writer

Writer

작성자 정보

true

writer.writerId

String

작성자 식별자(Id)

true

writer.nickname

String

작성시점의 작성자 닉네임

true

viewCount

Number

게시글의 조회수

true

commentCount

Number

게시글의 댓글수

true

liked

Boolean

조회자가 게시글을 좋아요 했는지 여부(미인증 사용자는 false)

true

likeCount

Number

게시글의 좋아요 수

true

disliked

Boolean

조회자가 게시글을 싫어요 했는지 여부(미인증 사용자는 false)

true

dislikeCount

Number

게시글의 싫어요 수

true

createdAt

String

작성 시각

true

modifiedAt

String

마지막 수정 시각

true

5.2.4. 예시

요청 예시
GET /api/v2/articles/1245567 HTTP/1.1
Authorization: Bearer AccessToken
Host: api.board-system.site
응답 예시
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: 716

{
  "articleId" : "1245567",
  "title" : "제목",
  "content" : "본문",
  "board" : {
    "boardId" : "131433451451",
    "name" : "고양이",
    "slug" : "cat"
  },
  "articleCategory" : {
    "articleCategoryId" : "87364535667",
    "name" : "일반",
    "slug" : "general",
    "allowWrite" : true,
    "allowSelfEditDelete" : true,
    "allowComment" : true,
    "allowLike" : true,
    "allowDislike" : true
  },
  "writer" : {
    "writerId" : "155557",
    "nickname" : "땃쥐"
  },
  "viewCount" : 8844,
  "commentCount" : 15,
  "liked" : true,
  "likeCount" : 14,
  "disliked" : false,
  "dislikeCount" : 14,
  "createdAt" : "2025-01-01T00:05:00+09:00",
  "modifiedAt" : "2025-01-01T00:05:00+09:00"
}

5.3. 게시글 목록 조회(페이지)

5.3.1. 기본정보

  • 메서드 : GET

  • URL : /api/v2/boards/{articleId}/articles

  • 권한 : 누구든지

게시글 목록을 페이지 단위로 조회합니다. 게시글의 상세내역(본문, 현재 회원의 좋아요/싫어요 여부 등…​)은 포함하지 않고, 간단한 정보만 목록으로 조회합니다.

5.3.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

boardId

게시판 식별자(Id)

true

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

page

페이지

true

1 이상 100 이하만 허용(그 이후는 무한 스크롤 방식 조회를 사용하세요.)

pageSize

한 페이지 당 게시글 수

true

1 이상 50 이하만 허용

5.3.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

page

Number

현재 페이지

true

pageSize

Number

한 페이지 당 게시글 수

true

pageGroupSize

Number

페이지 그룹(예: 1-10페이지, 11-20페이지,…​) 의 크기 단위

true

pageGroupStart

Number

페이지 그룹의 시작페이지 번호(예: 21)

true

pageGroupEnd

Number

페이지 그룹의 끝페이지 번호(예: 30)

true

hasNextPage

Boolean

다음 페이지의 존재 여부 부울값

true

hasNextPageGroup

Boolean

다음 페이지 그룹의 존재 여부 부울값

true

articles

Article[]

게시글 목록

true

articles[*].articleId

String

게시글 식별자(Id)

true

articles[*].title

String

게시글 제목

true

articles[*].board

Board

게시글이 속한 게시판 정보

true

articles[*].board.boardId

String

게시글이 속한 게시판 식별자(Id)

true

articles[*].board.name

String

게시글이 속한 게시판 이름

true

articles[*].board.slug

String

게시글이 속한 게시판 슬러그(게시글 구분 영문자)

true

articles[*].articleCategory

ArticleCategory

게시글이 속한 카테고리

true

articles[*].articleCategory.articleCategoryId

String

게시글이 속한 게시글 카테고리 식별자(Id)

true

articles[*].articleCategory.name

String

게시글이 속한 게시글 카테고리 이름

true

articles[*].articleCategory.slug

String

게시글이 속한 게시글 카테고리 슬러그(게시글 카테고리 구분 영문자)

true

articles[*].writer

Writer

작성자 정보

true

articles[*].writer.writerId

String

작성자 식별자(Id)

true

articles[*].writer.nickname

String

작성시점의 작성자 닉네임

true

articles[*].viewCount

Number

게시글의 조회수

true

articles[*].commentCount

Number

게시글의 댓글수

true

articles[*].likeCount

Number

게시글의 좋아요 수

true

articles[*].dislikeCount

Number

게시글의 싫어요 수

true

articles[*].createdAt

String

작성 시각

true

5.3.4. 예시

요청 예시
GET /api/v2/boards/12345666/articles?page=2&pageSize=3 HTTP/1.1
Host: api.board-system.site
응답 예시
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: 1770

{
  "page" : 2,
  "pageSize" : 3,
  "pageGroupSize" : 10,
  "pageGroupStart" : 1,
  "pageGroupEnd" : 10,
  "hasNextPage" : true,
  "hasNextPageGroup" : true,
  "articles" : [ {
    "articleId" : "47",
    "title" : "고양이 무서워하는 쥐들 참고해라",
    "board" : {
      "boardId" : "12345666",
      "name" : "동물",
      "slug" : "animal"
    },
    "articleCategory" : {
      "articleCategoryId" : "12345",
      "name" : "일반",
      "slug" : "general"
    },
    "writer" : {
      "writerId" : "335",
      "nickname" : "땃쥐"
    },
    "viewCount" : 475,
    "commentCount" : 15,
    "likeCount" : 35,
    "dislikeCount" : 0,
    "createdAt" : "2025-01-01T00:28:00+09:00"
  }, {
    "articleId" : "46",
    "title" : "윗글 쓴 사람 바보임 ↑↑↑↑↑↑↑↑",
    "board" : {
      "boardId" : "12345666",
      "name" : "동물",
      "slug" : "animal"
    },
    "articleCategory" : {
      "articleCategoryId" : "12345",
      "name" : "일반",
      "slug" : "general"
    },
    "writer" : {
      "writerId" : "337",
      "nickname" : "땃고양이"
    },
    "viewCount" : 335,
    "commentCount" : 3,
    "likeCount" : 0,
    "dislikeCount" : 15,
    "createdAt" : "2025-01-01T00:20:00+09:00"
  }, {
    "articleId" : "45",
    "title" : "오늘 점심 뭐먹냐",
    "board" : {
      "boardId" : "12345666",
      "name" : "동물",
      "slug" : "animal"
    },
    "articleCategory" : {
      "articleCategoryId" : "54321",
      "name" : "질문",
      "slug" : "question"
    },
    "writer" : {
      "writerId" : "3344",
      "nickname" : "캬루"
    },
    "viewCount" : 555,
    "commentCount" : 13,
    "likeCount" : 0,
    "dislikeCount" : 0,
    "createdAt" : "2025-01-01T00:14:00+09:00"
  } ]
}

5.4. 게시글 목록 조회(무한스크롤)

5.4.1. 기본정보

  • 메서드 : GET

  • URL : /api/v2/boards/{boardId}/articles/infinite-scroll

  • 권한 : 누구든지

게시글 목록을 무한스크롤 방식으로 조회합니다. 게시글의 상세내역(본문, 현재 회원의 좋아요/싫어요 여부 등…​)은 포함하지 않고, 간단한 정보만 목록으로 조회합니다. 기준이 되는 lastArticleId 를 파라미터로 전달할 경우 해당 게시글 이전의 게시글부터 조회하고, 전달하지 않을 경우 처음부터 조회합니다.

5.4.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

boardId

게시판 식별자(Id)

true

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

pageSize

한 페이지 당 게시글 수

true

1 이상 50 이하만 허용

lastArticleId

기준이 되는 게시글 식별자. 있을 경우 이 다음부터, 없으면 처음부터 조회

5.4.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

hasNext

Boolean

다음 게시글의 존재 여부 부울값

true

articles

Article[]

게시글 목록

true

articles[*].articleId

String

게시글 식별자(Id)

true

articles[*].title

String

게시글 제목

true

articles[*].board

Board

게시글이 속한 게시판 정보

true

articles[*].board.boardId

String

게시글이 속한 게시판 식별자(Id)

true

articles[*].board.name

String

게시글이 속한 게시판 이름

true

articles[*].board.slug

String

게시글이 속한 게시판 슬러그(게시글 구분 영문자)

true

articles[*].articleCategory

ArticleCategory

게시글이 속한 카테고리

true

articles[*].articleCategory.articleCategoryId

String

게시글이 속한 게시글 카테고리 식별자(Id)

true

articles[*].articleCategory.name

String

게시글이 속한 게시글 카테고리 이름

true

articles[*].articleCategory.slug

String

게시글이 속한 게시글 카테고리 슬러그(게시글 카테고리 구분 영문자)

true

articles[*].writer

Writer

작성자 정보

true

articles[*].writer.writerId

String

작성자 식별자(Id)

true

articles[*].writer.nickname

String

작성시점의 작성자 닉네임

true

articles[*].viewCount

Number

게시글의 조회수

true

articles[*].commentCount

Number

게시글의 댓글수

true

articles[*].likeCount

Number

게시글의 좋아요 수

true

articles[*].dislikeCount

Number

게시글의 싫어요 수

true

articles[*].createdAt

String

작성 시각

true

5.4.4. 예시

요청 예시
GET /api/v2/boards/12345666/articles/infinite-scroll?pageSize=3&lastArticleId=48 HTTP/1.1
Host: api.board-system.site
응답 예시
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: 1634

{
  "articles" : [ {
    "articleId" : "47",
    "title" : "고양이 무서워하는 쥐들 참고해라",
    "board" : {
      "boardId" : "12345666",
      "name" : "동물",
      "slug" : "animal"
    },
    "articleCategory" : {
      "articleCategoryId" : "12345",
      "name" : "일반",
      "slug" : "general"
    },
    "writer" : {
      "writerId" : "335",
      "nickname" : "땃쥐"
    },
    "viewCount" : 475,
    "commentCount" : 15,
    "likeCount" : 35,
    "dislikeCount" : 0,
    "createdAt" : "2025-01-01T00:28:00+09:00"
  }, {
    "articleId" : "46",
    "title" : "윗글 쓴 사람 바보임 ↑↑↑↑↑↑↑↑",
    "board" : {
      "boardId" : "12345666",
      "name" : "동물",
      "slug" : "animal"
    },
    "articleCategory" : {
      "articleCategoryId" : "12345",
      "name" : "일반",
      "slug" : "general"
    },
    "writer" : {
      "writerId" : "337",
      "nickname" : "땃고양이"
    },
    "viewCount" : 335,
    "commentCount" : 3,
    "likeCount" : 0,
    "dislikeCount" : 15,
    "createdAt" : "2025-01-01T00:20:00+09:00"
  }, {
    "articleId" : "45",
    "title" : "오늘 점심 뭐먹냐",
    "board" : {
      "boardId" : "12345666",
      "name" : "동물",
      "slug" : "animal"
    },
    "articleCategory" : {
      "articleCategoryId" : "54321",
      "name" : "질문",
      "slug" : "question"
    },
    "writer" : {
      "writerId" : "3344",
      "nickname" : "캬루"
    },
    "viewCount" : 555,
    "commentCount" : 13,
    "likeCount" : 0,
    "dislikeCount" : 0,
    "createdAt" : "2025-01-01T00:14:00+09:00"
  } ],
  "hasNext" : true
}

5.5. 게시글 수정

5.5.1. 기본정보

  • 메서드 : PUT

  • URL : /api/v1/articles/{articleId}

  • 권한 : 인증된 사용자 누구든지(게시글 작성자)

  • 인증방식 : 액세스 토큰

게시글을 수정합니다. 게시글 작성자만 게시글을 수정할 있고, 게시글의 카테고리 정책상 게시글을 수정할 수 있어야합니다. 게시글의 본문, 내용이 기존과 같을 경우 게시글은 실제 변경되지 않고, 둘 중 하나가 변경되면 실제 변경됩니다. (이때 게시글의 수정일도 현재 시간으로 변경됩니다.)

5.5.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자(Id)

true

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

title

String

게시글 제목

true

최대 50자. 공백만으로 구성되어선 안 됨.

content

String

게시판 본문

true

최대 3000자.

5.5.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

title

String

게시글 제목

true

content

String

게시글 본문

true

boardId

String

게시글이 속한 게시판 식별자(Id)

true

articleCategoryId

String

게시글 카테고리 식별자(Id)

true

writerId

String

작성자 식별자(Id)

true

writerNickname

String

작성시점의 작성자 닉네임

true

createdAt

String

작성 시각

true

modifiedAt

String

마지막 수정 시각

true

5.5.4. 예시

요청 예시
PUT /api/v1/articles/1233151335 HTTP/1.1
Content-Type: application/json
Authorization: Bearer AccessToken
Content-Length: 56
Host: api.board-system.site

{
  "title" : "새 제목",
  "content" : "새 본문"
}
응답 예시
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: 299

{
  "articleId" : "1233151335",
  "title" : "새 제목",
  "content" : "새 본문",
  "boardId" : "131433451451",
  "articleCategoryId" : "1435135151",
  "writerId" : "1557",
  "writerNickname" : "땃쥐",
  "createdAt" : "2025-01-01T00:10:00+09:00",
  "modifiedAt" : "2025-01-01T00:18:00+09:00"
}

6. 게시글 댓글 API 명세

6.1. 게시글 댓글 작성

6.1.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/article-comments

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글 댓글을 작성합니다. 요청 시 부모댓글 Id(parentCommentId) 를 전달할 경우 해당 댓글의 대댓글이 됩니다.

6.1.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 본문(필드)

필드명

타입

설명

필수여부

제약조건

content

String

댓글 내용

true

최대 3000자.

articleId

Number

대상이 되는 댓글 Id

true

삭제되지 않은, 실제 존재하는 게시글의 Id여야 함.

parentCommentId

Number

(대댓글을 작성할 경우) 부모 댓글의 Id

실제 존재하는 댓글의 Id 여야하고, 해당 게시글(articleId) 의 댓글이여야 함.

6.1.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleCommentId

String

게시글 댓글의 식별자(Id)

true

content

String

게시글 댓글 내용

true

articleId

String

게시글의 식별자(Id)

true

rootParentCommentId

String

최상위 부모 댓글의 식별자(Id), 댓글 자신의 식별자와 이 값이 일치하면 루트 댓글

true

writerId

String

댓글 작성자의 식별자(Id)

true

writerNickname

String

댓글 작성시점의 작성자 닉네임

true

parentCommentWriterId

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 식별자(Id)

parentCommentWriterNickname

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 댓글 작성시점 닉네임(Nickname)

deleteStatus

String

댓글이 삭제됐는지, 삭제됐다면 어떤 사유로 삭제됐는지 나타내는 문자열(하단 참고)

true

createdAt

String

댓글 작성 시각

true

modifiedAt

String

댓글의 마지막 수정 시각

true

응답 참고사항 : deleteStatus 필드?

댓글 관련 응답에서는, 댓글의 삭제 상태를 설명하는 deleteStatus 필드가 포함됩니다. 이 deleteStatus 는 다음 유형이 있습니다.

  • NOT_DELETED: 댓글이 삭제되지 않은 댓글일 경우

  • DELETED_BY_WRITER: 댓글이 댓글 작성자 본인에 의해 삭제된 댓글일 경우

  • DELETED_BY_MANAGER: 댓글이 관리자에 의해 삭제된 댓글일 경우

6.1.4. 예시

요청 예시
POST /api/v1/article-comments HTTP/1.1
Content-Type: application/json
Authorization: Bearer AccessToken
Content-Length: 125
Host: api.board-system.site

{
  "content" : "ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ",
  "articleId" : 1223455,
  "parentCommentId" : 54432314
}
응답 예시
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: 446

{
  "articleCommentId" : "1234134315135",
  "content" : "ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ",
  "articleId" : "1223455",
  "rootParentCommentId" : "54432314",
  "writerId" : "1557",
  "writerNickname" : "땃쥐",
  "parentCommentWriterId" : "834134134134",
  "parentCommentWriterNickname" : "땃고양이",
  "deleteStatus" : "NOT_DELETED",
  "createdAt" : "2025-01-01T00:18:00+09:00",
  "modifiedAt" : "2025-01-01T00:18:00+09:00"
}

6.2. 게시글 댓글 단건 조회

6.2.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/article-comments/{commentId}

  • 권한 : 누구든지

게시글 댓글을 단건 조회합니다.

6.2.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

commentId

게시글 댓글의 식별자(Id)

true

6.2.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleCommentId

String

게시글 댓글의 식별자(Id)

true

content

String

게시글 댓글 내용

true

articleId

String

게시글의 식별자(Id)

true

rootParentCommentId

String

최상위 부모 댓글의 식별자(Id), 댓글 자신의 식별자와 이 값이 일치하면 루트 댓글

true

writerId

String

댓글 작성자의 식별자(Id)

true

writerNickname

String

댓글 작성시점의 작성자 닉네임

true

parentCommentWriterId

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 식별자(Id)

parentCommentWriterNickname

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 댓글 작성시점 닉네임(Nickname)

createdAt

String

댓글 작성 시각

true

modifiedAt

String

댓글의 마지막 수정 시각

true

6.2.4. 예시

요청 예시
GET /api/v1/article-comments/12345 HTTP/1.1
Host: api.board-system.site
응답 예시
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: 391

{
  "articleCommentId" : "12345",
  "content" : "이게 뭐얔ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ",
  "articleId" : "12134315",
  "rootParentCommentId" : "1111",
  "writerId" : "1",
  "writerNickname" : "땃쥐",
  "parentCommentWriterId" : "3",
  "parentCommentWriterNickname" : "땃고양이",
  "createdAt" : "2025-01-01T00:12:00+09:00",
  "modifiedAt" : "2025-01-01T00:12:00+09:00"
}

6.3. 게시글 댓글수 조회

6.3.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/articles/{articleId}/comments/count

  • 권한 : 누구든지

게시글의 댓글수를 조회합니다. 게시글이 존재해야합니다.

6.3.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

6.3.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

commentCount

Number

게시글 댓글수

true

6.3.4. 예시

요청 예시
GET /api/v1/articles/134/comments/count HTTP/1.1
Host: api.board-system.site
응답 예시
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: 49

{
  "articleId" : "134",
  "commentCount" : 135
}

6.4. 게시글 댓글 목록 조회(페이지)

6.4.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/article-comments

  • 권한 : 누구든지

게시글의 댓글 목록을 페이지 단위로 조회합니다.

6.4.2. 요청

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

articleId

게시글 식별자(Id)

true

page

페이지

true

1 이상 100 이하만 허용

pageSize

한 페이지 당 댓글 수

true

1 이상 50 이하만 허용

6.4.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

page

Number

현재 페이지

true

pageSize

Number

한 페이지 당 댓글 수

true

pageGroupSize

Number

페이지 그룹(예: 1-10페이지, 11-20페이지,…​) 의 크기 단위

true

pageGroupStart

Number

페이지 그룹의 시작페이지 번호(예: 21)

true

pageGroupEnd

Number

페이지 그룹의 끝페이지 번호(예: 30)

true

hasNextPage

Boolean

다음 페이지의 존재 여부 부울값

true

hasNextPageGroup

Boolean

다음 페이지 그룹의 존재 여부 부울값

true

comments

Comment[]

댓글 목록

true

comments[*].deleteStatus

String

댓글이 삭제됐는지, 삭제됐다면 어떤 사유로 삭제됐는지 나타내는 문자열(하단 참고)

true

comments[*].data

Comment.Data

댓글 데이터(삭제되지 않았을 때만 노출됨)

comments[*].data.articleCommentId

String

게시글 댓글의 식별자(Id)

true

comments[*].data.content

String

게시글 댓글 내용

true

comments[*].data.articleId

String

게시글의 식별자(Id)

true

comments[*].data.rootParentCommentId

String

최상위 부모 댓글의 식별자(Id), 댓글 자신의 식별자와 이 값이 일치하면 루트 댓글

true

comments[*].data.writerId

String

댓글 작성자의 식별자(Id)

true

comments[*].data.writerNickname

String

댓글 작성시점의 작성자 닉네임

true

comments[*].data.parentCommentWriterId

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 식별자(Id)

comments[*].data.parentCommentWriterNickname

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 댓글 작성시점 닉네임(Nickname)

comments[*].data.createdAt

String

댓글 작성 시각

true

comments[*].data.modifiedAt

String

댓글의 마지막 수정 시각

true

응답 참고사항 : deleteStatus 필드?

댓글 관련 응답에서는, 댓글의 삭제 상태를 설명하는 deleteStatus 필드가 포함됩니다. 이 deleteStatus 는 다음 유형이 있습니다.

  • NOT_DELETED: 댓글이 삭제되지 않은 댓글일 경우

  • DELETED_BY_WRITER: 댓글이 댓글 작성자 본인에 의해 삭제된 댓글일 경우

  • DELETED_BY_MANAGER: 댓글이 관리자에 의해 삭제된 댓글일 경우

6.4.4. 예시

요청 예시
GET /api/v1/article-comments?articleId=12345666&page=2&pageSize=5 HTTP/1.1
Host: api.board-system.site
응답 예시
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: 2111

{
  "page" : 2,
  "pageSize" : 5,
  "pageGroupSize" : 10,
  "pageGroupStart" : 1,
  "pageGroupEnd" : 10,
  "hasNextPage" : true,
  "hasNextPageGroup" : true,
  "comments" : [ {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "53",
      "content" : "3번 댓글에 대한 대댓글",
      "articleId" : "12345666",
      "rootParentCommentId" : "3",
      "writerId" : "53",
      "writerNickname" : "53번작성자",
      "parentCommentWriterId" : "3",
      "parentCommentWriterNickname" : "3번작성자",
      "createdAt" : "2025-01-01T00:08:00+09:00",
      "modifiedAt" : "2025-01-01T00:09:00+09:00"
    }
  }, {
    "deleteStatus" : "DELETED_BY_WRITER",
    "data" : null
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "54",
      "content" : "4번 댓글에 대한 대댓글",
      "articleId" : "12345666",
      "rootParentCommentId" : "4",
      "writerId" : "54",
      "writerNickname" : "54번작성자",
      "parentCommentWriterId" : "4",
      "parentCommentWriterNickname" : "4번작성자",
      "createdAt" : "2025-01-01T00:16:00+09:00",
      "modifiedAt" : "2025-01-01T00:16:00+09:00"
    }
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "5",
      "content" : "5번 댓글",
      "articleId" : "12345666",
      "rootParentCommentId" : "5",
      "writerId" : "5",
      "writerNickname" : "5번작성자",
      "parentCommentWriterId" : null,
      "parentCommentWriterNickname" : null,
      "createdAt" : "2025-01-01T00:23:00+09:00",
      "modifiedAt" : "2025-01-01T00:23:00+09:00"
    }
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "55",
      "content" : "5번 댓글에 대한 대댓글",
      "articleId" : "12345666",
      "rootParentCommentId" : "5",
      "writerId" : "55",
      "writerNickname" : "55번작성자",
      "parentCommentWriterId" : "5",
      "parentCommentWriterNickname" : "5번작성자",
      "createdAt" : "2025-01-01T00:29:00+09:00",
      "modifiedAt" : "2025-01-01T00:29:00+09:00"
    }
  } ]
}

6.5. 게시글 댓글 목록 조회(무한스크롤)

6.5.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/article-comments/infinite-scroll

  • 권한 : 누구든지

게시글 댓글 목록을 무한스크롤 방식으로 조회합니다. 기준이 되는 댓글의 식별자(lastCommentId)와 루트 부모댓글 식별자(lastRootParentCommentId)를 파라미터로 전달할 경우 해당 댓글 다음의 댓글부터 조회하고, 전달하지 않을 경우 처음부터 조회합니다.

6.5.2. 요청

요청 쿼리 문자열(Query Parameters)

파라미터명

설명

필수여부

제약조건

articleId

게시글 식별자(Id)

true

pageSize

한 페이지 당 댓글 수

true

1 이상 50 이하만 허용

lastRootParentCommentId

기준이 되는 마지막 댓글의 루트 댓글 식별자. 있을 경우 이 다음부터, 없으면 처음부터 조회

보낼 경우 lastCommentId 와 함께 보내야 제대로 된 결과를 받을 수 있음

lastCommentId

기준이 되는 마지막 댓글의 식별자. 있을 경우 이 다음부터, 없으면 처음부터 조회

보낼 경우 lastRootParentCommentId 와 함께 보내야 제대로 된 결과를 받을 수 있음

6.5.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

hasNext

Boolean

다음 댓글이 존재하는 지 여부

true

comments

Comment[]

댓글 목록

true

comments[*].deleteStatus

String

댓글이 삭제됐는지, 삭제됐다면 어떤 사유로 삭제됐는지 나타내는 문자열(하단 참고)

true

comments[*].data

Comment.Data

댓글 데이터(삭제되지 않았을 때만 노출됨)

comments[*].data.articleCommentId

String

게시글 댓글의 식별자(Id)

true

comments[*].data.content

String

게시글 댓글 내용

true

comments[*].data.articleId

String

게시글의 식별자(Id)

true

comments[*].data.rootParentCommentId

String

최상위 부모 댓글의 식별자(Id), 댓글 자신의 식별자와 이 값이 일치하면 루트 댓글

true

comments[*].data.writerId

String

댓글 작성자의 식별자(Id)

true

comments[*].data.writerNickname

String

댓글 작성시점의 작성자 닉네임

true

comments[*].data.parentCommentWriterId

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 식별자(Id)

comments[*].data.parentCommentWriterNickname

String

(부모댓글이 있을 경우) 부모 댓글 작성자의 댓글 작성시점 닉네임(Nickname)

comments[*].data.createdAt

String

댓글 작성 시각

true

comments[*].data.modifiedAt

String

댓글의 마지막 수정 시각

true

응답 참고사항 : deleteStatus 필드?

댓글 관련 응답에서는, 댓글의 삭제 상태를 설명하는 deleteStatus 필드가 포함됩니다. 이 deleteStatus 는 다음 유형이 있습니다.

  • NOT_DELETED: 댓글이 삭제되지 않은 댓글일 경우

  • DELETED_BY_WRITER: 댓글이 댓글 작성자 본인에 의해 삭제된 댓글일 경우

  • DELETED_BY_MANAGER: 댓글이 관리자에 의해 삭제된 댓글일 경우

6.5.4. 예시

요청 예시
GET /api/v1/article-comments/infinite-scroll?articleId=12345666&pageSize=6&lastRootParentCommentId=2&lastCommentId=54 HTTP/1.1
Host: api.board-system.site
응답 예시
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: 2054

{
  "comments" : [ {
    "deleteStatus" : "DELETED_BY_WRITER",
    "data" : null
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "56",
      "content" : "2번 댓글에 대한 대댓글 (3)",
      "articleId" : "12345666",
      "rootParentCommentId" : "2",
      "writerId" : "56",
      "writerNickname" : "56번작성자",
      "parentCommentWriterId" : "2",
      "parentCommentWriterNickname" : "2번작성자",
      "createdAt" : "2025-01-01T00:08:00+09:00",
      "modifiedAt" : "2025-01-01T00:09:00+09:00"
    }
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "3",
      "content" : "3번 댓글",
      "articleId" : "12345666",
      "rootParentCommentId" : "3",
      "writerId" : "3",
      "writerNickname" : "3번작성자",
      "parentCommentWriterId" : null,
      "parentCommentWriterNickname" : null,
      "createdAt" : "2025-01-01T00:03:00+09:00",
      "modifiedAt" : "2025-01-01T00:03:00+09:00"
    }
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "57",
      "content" : "3번 댓글에 대한 대댓글 (1)",
      "articleId" : "12345666",
      "rootParentCommentId" : "3",
      "writerId" : "57",
      "writerNickname" : "57번작성자",
      "parentCommentWriterId" : "3",
      "parentCommentWriterNickname" : "3번작성자",
      "createdAt" : "2025-01-01T00:10:00+09:00",
      "modifiedAt" : "2025-01-01T00:10:00+09:00"
    }
  }, {
    "deleteStatus" : "DELETED_BY_WRITER",
    "data" : null
  }, {
    "deleteStatus" : "NOT_DELETED",
    "data" : {
      "articleCommentId" : "59",
      "content" : "3번 댓글에 대한 대댓글 (3)",
      "articleId" : "12345666",
      "rootParentCommentId" : "3",
      "writerId" : "59",
      "writerNickname" : "59번작성자",
      "parentCommentWriterId" : "3",
      "parentCommentWriterNickname" : "3번작성자",
      "createdAt" : "2025-01-01T00:12:00+09:00",
      "modifiedAt" : "2025-01-01T00:12:00+09:00"
    }
  } ],
  "hasNext" : true
}

7. 게시글 좋아요/싫어요 API 명세

7.1. 게시글 좋아요

7.1.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/articles/{articleId}/likes

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글에 대해 '좋아요' 합니다. 사용자당, 한 게시글에 한 번만 '좋아요' 할 수 있습니다.

7.1.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

7.1.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleLikeId

String

게시글 좋아요 식별자(Id)

true

articleId

String

게시글 식별자(Id)

true

userId

String

사용자 식별자(Id)

true

createdAt

String

좋아요한 시각

true

7.1.4. 예시

요청 예시
POST /api/v1/articles/134/likes HTTP/1.1
Authorization: Bearer AccessToken
Host: api.board-system.site
Content-Type: application/x-www-form-urlencoded
응답 예시
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: 127

{
  "articleLikeId" : "134564164146",
  "articleId" : "134",
  "userId" : "1557",
  "createdAt" : "2025-01-01T00:18:00+09:00"
}

7.2. 게시글 좋아요 취소

7.2.1. 기본정보

  • 메서드 : DELETE

  • URL : /api/v1/articles/{articleId}/likes

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글에 '좋아요' 했던 것을 취소합니다. 사용자가 '좋아요' 한 글에 대해서만 취소 처리가 정상적으로 처리됩니다.

7.2.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

7.2.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

userId

String

사용자 식별자(Id)

true

canceledAt

String

좋아요 취소한 시각

true

7.2.4. 예시

요청 예시
DELETE /api/v1/articles/134/likes HTTP/1.1
Authorization: Bearer AccessToken
Host: api.board-system.site
응답 예시
HTTP/1.1 204 No Content
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: 92

{
  "articleId" : "134",
  "userId" : "1557",
  "canceledAt" : "2025-01-01T00:18:00+09:00"
}

7.3. 게시글 좋아요 수 조회

7.3.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/articles/{articleId}/likes/count

  • 권한 : 누구든지

게시글의 좋아요 수를 조회합니다.

7.3.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

7.3.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

likeCount

Number

좋아요 수

true

7.3.4. 예시

요청 예시
GET /api/v1/articles/134/likes/count HTTP/1.1
Host: api.board-system.site
응답 예시
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: 47

{
  "articleId" : "134",
  "likeCount" : 2324
}

7.4. 게시글 싫어요

7.4.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/articles/{articleId}/dislikes

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글에 대해 '싫어요' 합니다. 사용자당, 한 게시글에 한 번만 '싫어요' 할 수 있습니다.

7.4.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

7.4.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleDislikeId

String

게시글 싫어요 식별자(Id)

true

articleId

String

게시글 식별자(Id)

true

userId

String

사용자 식별자(Id)

true

createdAt

String

싫어요한 시각

true

7.4.4. 예시

요청 예시
POST /api/v1/articles/134/dislikes HTTP/1.1
Authorization: Bearer AccessToken
Host: api.board-system.site
Content-Type: application/x-www-form-urlencoded
응답 예시
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: 130

{
  "articleDislikeId" : "134564164146",
  "articleId" : "134",
  "userId" : "1557",
  "createdAt" : "2025-01-01T00:18:00+09:00"
}

7.5. 게시글 싫어요 취소

7.5.1. 기본정보

  • 메서드 : DELETE

  • URL : /api/v1/articles/{articleId}/dislikes

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글에 '싫어요' 했던 것을 취소합니다. 사용자가 '싫어요' 한 글에 대해서만 취소 처리가 정상적으로 처리됩니다.

7.5.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

7.5.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

userId

String

사용자 식별자(Id)

true

canceledAt

String

싫어요 취소한 시각

true

7.5.4. 예시

요청 예시
DELETE /api/v1/articles/134/dislikes HTTP/1.1
Authorization: Bearer AccessToken
Host: api.board-system.site
응답 예시
HTTP/1.1 204 No Content
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: 92

{
  "articleId" : "134",
  "userId" : "1557",
  "canceledAt" : "2025-01-01T00:18:00+09:00"
}

7.6. 게시글 싫어요 수 조회

7.6.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/articles/{articleId}/dislikes/count

  • 권한 : 누구든지

게시글의 싫어요 수를 조회합니다.

7.6.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

7.6.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

dislikeCount

Number

싫어요 수

true

7.6.4. 예시

요청 예시
GET /api/v1/articles/134/dislikes/count HTTP/1.1
Host: api.board-system.site
응답 예시
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: 49

{
  "articleId" : "134",
  "dislikeCount" : 255
}

8. 게시글 조회수 API 명세

8.1. 게시글 조회수 증가

8.1.1. 기본정보

  • 메서드 : POST

  • URL : /api/v1/articles/{articleId}/views

  • 권한 : 인증된 사용자 누구든지

  • 인증방식 : 액세스 토큰

게시글의 조회수를 증가시킵니다. 한 사용자가 이 API를 호출하여 조회수를 증가시키고, 10분 이내에 다시 이 API 를 호출하더라도 조회수가 증가하지 않습니다. 즉, 한 사용자는 10분당 1의 조회수를 증카시킬 수 있습니다.

8.1.2. 요청

요청 헤더

헤더명

설명

필수여부

Authorization

인증에 필요한 토큰('Bearer [액세스토큰]' 형태)

true

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

8.1.3. 응답

응답으로 200 상태코드가 전달되고, 본문에 내용이 포함되지 않습니다.

8.1.4. 예시

요청 예시
POST /api/v1/articles/134/views HTTP/1.1
Authorization: Bearer AccessToken
Host: api.board-system.site
Content-Type: application/x-www-form-urlencoded
응답 예시
HTTP/1.1 200 OK
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

8.2. 게시글 조회수 조회

8.2.1. 기본정보

  • 메서드 : GET

  • URL : /api/v1/articles/{articleId}/views/count

  • 권한 : 누구든지

게시글의 조회수를 조회합니다. 게시글이 존재해야합니다.

8.2.2. 요청

요청 경로 변수(Path Parameters)

파라미터명

설명

필수여부

articleId

게시글 식별자

true

8.2.3. 응답

응답 본문(필드)

필드명

타입

설명

필수 여부

articleId

String

게시글 식별자(Id)

true

viewCount

Number

게시글 조회수

true

8.2.4. 예시

요청 예시
GET /api/v1/articles/134/views/count HTTP/1.1
Host: api.board-system.site
응답 예시
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: 46

{
  "articleId" : "134",
  "viewCount" : 135
}