Board API では、掲示板や投稿、コメントの管理が可能です。
User Account 認証または Service Account 認証 (JWT) で取得した Access Token で利用できます。
Scopes: board, board.read
掲示板は、以下の API で管理します。
| HTTP Request | Description |
|---|---|
| POST /boards | 掲示板の登録 |
| GET /boards | 掲示板リストの取得 |
| GET /boards/{boardId} | 掲示板の取得 |
| PUT /boards/{boardId} | 掲示板の更新 |
| DELETE /boards/{boardId} | 掲示板の削除 |
掲示板には、カテゴリーや表示順、権限、掲示板タイプ、権限などが設定できますが、Board API では、掲示板名 boardName と掲示板の説明 description のみが管理できます。
{ "boardName": "掲示板の名前", "description": "掲示板の説明"}掲示板に対して投稿を登録します。投稿は以下の API で管理します。これらの API を呼び出す場合には、掲示板 ID boadId を指定します。
| HTTP Request | Description |
|---|---|
| POST /boards/{boardId}/posts | 投稿の登録 |
| GET /boards/{boardId}/posts | 投稿リストの取得 |
| GET /boards/{boardId}/posts/{postId} | 投稿の取得 |
| PUT /boards/{boardId}/posts/{postId} | 投稿の更新 |
| DELETE /boards/{boardId}/posts/{postId} | 投稿の削除 |
| GET /boards/{boardId}/posts/{postId}/readers | 投稿の既読メンバーリスト取得 |
すべての掲示板から、特定条件の投稿を取得することも可能です。
| HTTP Request | Description |
|---|---|
| GET /boards/recent/posts | 最新投稿リストの取得 |
| GET /boards/my/posts | マイ投稿リストの取得 |
| GET /boards/must/posts | 必読投稿リストの取得 |
投稿は、件名 title と内容 body を指定して登録します。内容 body には HTML タグを記載できます。 コメント許可フラグ enableComment、投稿通知送信フラグ sendNotifications、必読終了日 mustReadEndDate を指定することもできます。
{ "title": "投稿のタイトル", "body": "<h1>投稿</h1>本文", "enableComment": true, "sendNotifications": true, "mustReadEndDate": "2023-07-20"}投稿には、複数のファイルを添付できます。
| HTTP Request | Description |
|---|---|
| POST /boards/{boardId}/posts/{postId}/attachments | 投稿の添付ファイル登録 |
| GET /boards/{boardId}/posts/{postId}/attachments | 投稿の添付ファイルリスト取得 |
| GET /boards/{boardId}/posts/{postId}/attachments/{attachmentId} | 投稿の添付ファイル取得 |
| DELETE /boards/{boardId}/posts/{postId}/attachments/{attachmentId} | 投稿の添付ファイル削除 |
添付ファイルの登録・取得方法の詳細は ファイルアップロード / ダウンロード を参照します。
投稿に対してコメントできます。コメントは以下の API で管理します。これらの API を呼び出す場合には、掲示板 ID boardId と投稿 ID postId を指定します。
コメントは、内容 content を指定して登録します。
{ "content": "コメントです"}コメントには、複数のファイルを添付できます。
| HTTP Request | Description |
|---|---|
| GET /boards/{boardId}/posts/{postId}/comments/{commentId}/attachments | コメントの添付ファイルリスト取得 |
| POST /boards/{boardId}/posts/{postId}/comments/{commentId}/attachments | コメントの添付ファイル登録 |
| GET /boards/{boardId}/posts/{postId}/comments/{commentId}/attachments/{attachmentId} | コメントの添付ファイル取得 |
| DELETE /boards/{boardId}/posts/{postId}/comments/{commentId}/attachments/{attachmentId} | コメントの添付ファイル削除 |
添付ファイルの登録・取得方法の詳細は ファイルアップロード / ダウンロード を参照します。