投稿の登録
POST /boards/{boardId}/posts
投稿を登録する。
- Script は使用できない。
Authorization
oauth2
Access Token を指定します。
指定の方法や Access Token の取得方法は 共通仕様 を参照してください。
Scope
board
Request
HTTP Request
POST
https://www.worksapis.com/v1.0/boards/{boardId}/posts
Path Parameters
Parameter | Type | Description |
---|---|---|
boardId | integer | 掲示板 ID required example : 100 format : int64 |
Header Parameters
Header | type | Description |
---|---|---|
Authorization | string | Bearer {token} required |
Content-Type | string | application/json required example : application/json |
Request Body
Property | Type | Description |
---|---|---|
title | string | 件名 required minLength : 1 maxLength : 200 |
body | string | 内容 required minLength : 1 maxLength : 716800 |
enableComment | boolean | コメント許可フラグ default : true |
mustReadDays | integer | 必読期間(単位:日)
default : 0 minimum : 0 maximum : 30 format : int32 deprecated : true |
mustReadEndDate | string | 必読終了日(最大30日) format : date |
sendNotifications | boolean | 投稿通知送信フラグ default : true |
Request Example
example
1{
2 "title": "Example title",
3 "body": "<h1>Example</h1> Insert body here.",
4 "enableComment": true,
5 "mustReadEndDate": "2023-03-20",
6 "sendNotifications": true
7}
Response
HTTP 201
OK
Property | Type | Description |
---|---|---|
boardId | integer | 掲示板 ID format : int64 |
postId | integer | 投稿 ID format : int64 |
title | string | 件名 required |
readCount | integer | 既読数 format : int64 |
commentCount | integer | コメント数 format : int64 |
fileCount | integer | ファイル数 format : int64 |
createdTime | string | 登録日時 required format : date-time readOnly : true |
modifiedTime | string | 更新日時 format : date-time readOnly : true |
isMustRead | boolean | 必読フラグ |
body | string | 内容 (タイプ:HTML) required |
enableComment | boolean | コメント許可フラグ |
userId | string | readOnly : true nullable : true |
userName | string | 登録者名 readOnly : true |
Response Example
example
1{
2 "boardId": 100,
3 "postId": 1,
4 "title": "Example title",
5 "readCount": 0,
6 "commentCount": 0,
7 "fileCount": 0,
8 "createdTime": "2022-10-28T17:26:35+09:00",
9 "modifiedTime": "2022-10-28T17:26:35+09:00",
10 "isMustRead": true,
11 "mustReadPeriod": {
12 "startDate": "2023-03-13",
13 "endDate": "2023-03-20"
14 },
15 "body": "<h1>Example</h1> Insert body here.",
16 "enableComment": true,
17 "userId": "userf7da-f82c-4284-13e7-030f3b4c756x",
18 "userName": "Susan Nielsen"
19}
HTTP 403
Forbidden