コメントを取得、追加、または削除する

目次

コメントを取得する

掲示板のコメントを取得する API です。
この API は、取得したいコメントの掲示板 ID をリクエストのパラメーターとして受け取り、コメントの内容をレスポンスとして返ります。

API名

BulletinGetFollows

使用可能なGaroonのバージョン

  • クラウド版 Garoon
  • パッケージ版 Garoon 3.1 以降

リクエスト

パラメーター名 パラメーター数 説明
@tocic_id base:IDType 1 掲示板のID
@offset xsd:unsignedLong 1 取得するコメントの開始位置。コメントの数を指定します。
@limit xsd:unsignedLong 1 取得するコメント数の上限
1
2
<parameters topic_id="2" offset="0" limit="10">
</parameters>

レスポンス

パラメーター名 パラメーター数 説明
follow bulletin:FollowType 0 ~ 無制限 取得したコメント情報
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<returns xmlns=""> 
  <follow topic_id="2" id="15" number="4" text="follow 4" 
   xmlns:flw="http://schemas.cybozu.co.jp/bulletin/2008"> 
   <flw:creator user_id="3" name="huy" date="2010-11-04T21:12:42Z" /> 
  </follow> 
  <follow topic_id="2" id="14" number="3" text="follow 3"  
   xmlns:flw="http://schemas.cybozu.co.jp/bulletin/2008"> 
   <flw:creator user_id="3" name="huy" date="2010-11-04T21:12:31Z" /> 
  </follow> 
  <follow topic_id="2" id="13" number="2" text="follow 2" 
   xmlns:flw="http://schemas.cybozu.co.jp/bulletin/2008"> 
   <flw:creator user_id="3" name="huy" date="2010-11-04T21:12:21Z" /> 
  </follow> 
  <follow topic_id="2" id="12" number="1" text="follow 1" 
   xmlns:flw="http://schemas.cybozu.co.jp/bulletin/2008"> 
   <flw:creator user_id="1" name="Administrator" date="2010-11-04T20:52:27Z" /> 
  </follow> 
</returns>

コメントを追加する

掲示板のコメントを追加する API です。
この API は、追加するコメントの情報をリクエストのパラメーターとして受け取り、コメントを追加し、コメントを追加した掲示板の情報をレスポンスとして返ります。
書式編集を利用したコメントは追加できません。

API名

BulletinAddFollows

使用可能なGaroonのバージョン

  • クラウド版 Garoon
  • パッケージ版 Garoon 3.1 以降

リクエスト

パラメーター名 パラメーター数 説明
add_follows bulletin:BulletinAddFollowType 1 ~ 無制限 追加するコメント情報
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<parameters> 
  <add_follow xmlns="" topic_id="3"> 
    <follow xmlns="" id="dummy" number="dummy" text="follow content"> 
      <file id="1" name="test.txt" mime_type="text/plain"></file> 
    </follow> 
    <file xmlns="" id="1"> 
      <content xmlns="">77u/DQoNCiogVGhpbmsNCiAgLSBUcnkgYXBwbHkgcHJvYmxlbSBzb2x2aW5nIG1ldGhvZCBsZWFybmVkIGZyoLg0K 
      </content> 
    </file> 
  </add_follow> 
</parameters>

レスポンス

パラメーター名 パラメーター数 説明
topic bulletin:TopicType 0 ~ 無制限 コメントを追加した掲示板情報
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<returns xmlns=""> 
  <topic xmlns:th="http://schemas.cybozu.co.jp/bulletin/2008" 
   id="3" version="1288759128" 
   category_id="3" 
   can_follow="true" subject="modify attact file" is_draft="false" 
   published="true" unread="false" expired="false">  
    <th:content body="body" > 
      <th:file id="9" name="test3.txt" size="100" mime_type="text/plain"/> 
      <th:file id="24" name="action6.txt" size="333" mime_type="text/plain"/> 
    </th:content> 
    <th:follow id="1" number="16" /> 
    <th:creator user_id="1" name="Administrator" date="2010-11-03T12:31:30Z" /> 
    <th:modifier user_id="1" name="Administrator" date="2010-11-03T13:38:48Z" /> 
  </topic> 
</returns>

エラー

エラー番号 説明
GRN_UTIL_API_65009 アップロードするファイルのサイズが、BASE64エンコード後で300MBより大きい場合

コメントを削除する

コメントを削除する API です。 この API は、削除するコメント ID をリクエストのパラメーターとして受け取り、削除します。レスポンスはありません。

API名

BulletinRemoveFollows

使用可能なGaroonのバージョン

  • クラウド版 Garoon
  • パッケージ版 Garoon 3.1 以降

リクエスト

パラメーター名 パラメーター数 説明
follow_id/text() base:IDType 1 ~ 無制限 削除するコメントのID
1
2
3
<parameters> 
  <follow_id xmlns="">11</follow_id> 
</parameters>

レスポンス

なし

エラー

エラー番号 説明
GRN_BLLT_16004 指定したコメントが存在しない場合
GRN_BLLT_16018 掲示期間が過ぎた掲示板のコメントを削除しようとした場合
GRN_BLLT_16051 他のユーザーによって登録されたコメントを削除しようとした場合