Board API

Board API では、掲示板や投稿、コメントの管理が可能です。

User Account 認証または Service Account 認証 (JWT) で取得した Access Token で利用できます。

Scopes: board, board.read

掲示板の管理 {#manage-board}

掲示板は、以下の API で管理します。

HTTP RequestDescription
POST /boards掲示板の登録
GET /boards掲示板リストの取得
GET /boards/{boardId}掲示板の取得
PUT /boards/{boardId}掲示板の更新
DELETE /boards/{boardId}掲示板の削除

掲示板には、カテゴリーや表示順、権限、掲示板タイプ、権限などが設定できますが、Board API では、掲示板名 boardName と掲示板の説明 description のみが管理できます。

{  "boardName": "掲示板の名前",  "description": "掲示板の説明"}

投稿の管理 {#manage-post}

掲示板に対して投稿を登録します。投稿は以下の API で管理します。これらの API を呼び出す場合には、掲示板 ID boadId を指定します。

HTTP RequestDescription
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 RequestDescription
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"}

投稿の添付ファイルの管理 {#manage-post-attachment}

投稿には、複数のファイルを添付できます。

HTTP RequestDescription
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}投稿の添付ファイル削除

添付ファイルの登録・取得方法の詳細は ファイルアップロード / ダウンロード を参照します。

コメントの管理 {#manage-comment}

投稿に対してコメントできます。コメントは以下の API で管理します。これらの API を呼び出す場合には、掲示板 ID boardId と投稿 ID postId を指定します。

HTTP RequestDescription
POST /boards/{boardId}/posts/{postId}/commentsコメントの登録
GET /boards/{boardId}/posts/{postId}/commentsコメントリストの取得
GET /boards/{boardId}/posts/{postId}/comments/{commentId}コメントの取得
PUT /boards/{boardId}/posts/{postId}/comments/{commentId}コメントの更新
DELETE /boards/{boardId}/posts/{postId}/comments/{commentId}コメントの削除

コメントは、内容 content を指定して登録します。

{  "content": "コメントです"}

コメントの添付ファイルの管理 {#manage-comment-attachment}

コメントには、複数のファイルを添付できます。

HTTP RequestDescription
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}コメントの添付ファイル削除

添付ファイルの登録・取得方法の詳細は ファイルアップロード / ダウンロード を参照します。