댓글 작성
POST /boards/{boardId}/posts/{postId}/comments
댓글 작성시 작성자에게 알림이 발송됩니다.
Authorization
oauth2
OAuth 2.0 인증.
자세한 인증 방식은 인가·인증를 참고한다.
Scope
board
Request
HTTP Request
POST
https://www.worksapis.com/v1.0/boards/{boardId}/posts/{postId}/comments
Path Parameters
Parameter | Type | Description |
---|---|---|
boardId | integer | 게시판 ID required example : 100 format : int64 |
postId | integer | 게시글 ID required example : 1 format : int64 |
Header Parameters
Header | type | Description |
---|---|---|
Authorization | string | Bearer {token} required |
Request Body
OK
Property | Type | Description |
---|---|---|
content | string | 내용 required minLength : 1 maxLength : 5000 |
Response
HTTP 201
OK
Property | Type | Description |
---|---|---|
boardId | integer | 게시판 번호 required format : int64 readOnly : true |
postId | integer | 게시글 번호 required format : int64 readOnly : true |
commentId | integer | 댓글 번호 required format : int64 readOnly : true |
content | string | 내용 required |
createdTime | string | 생성 시간
required format : date-time readOnly : true |
modifiedTime | string | 수정 시간
format : date-time readOnly : true |
userId | string | 작성자 ID readOnly : true nullable : true |
userName | string | 작성자 이름 required readOnly : true |
hasReply | boolean | 답글 존재 여부 default : false readOnly : true |
hasAttachment | boolean | 첨부파일 존재 여부 default : false readOnly : true |
isDeleted | boolean | 답글이 존재하면서 삭제된 경우 default : false readOnly : true |
Response Example
example
1{
2 "boardId": 100,
3 "postId": 1,
4 "commentId": 1,
5 "content": "Example content",
6 "createdTime": "2022-10-28T17:26:35+09:00",
7 "modifiedTime": "2022-10-28T17:26:35+09:00",
8 "userId": "userf7da-f82c-4284-13e7-030f3b4c756x",
9 "userName": "Susan Nielsen",
10 "hasReply": false,
11 "hasAttachment": false,
12 "isDeleted": false
13}
HTTP 403
Forbidden