この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

Feed Elements, Post and Search

フィード要素の投稿や、組織のすべてのフィード要素の検索を行います。
リソース
1/chatter/feed-elements
1/connect/communities/communityId/chatter/feed-elements
使用可能なバージョン
31.0
Chatter が必要かどうか
はい
HTTP メソッド
GET、POST
GET の要求パラメータ
パラメータ名 説明 必須項目/省略可能 使用可能なバージョン
page String 情報ページの表示に使用されるページトークンを指定します。ページトークンは、currentPageToken または nextPageToken のように、応答クラスの一部として返されます。null を渡すと、最初のページが返されます。 省略可能 31.0
pageSize Integer ページあたりのフィード要素数を指定します。有効な値は 1 ~ 100 です。null を渡すと、デフォルトサイズの 25 に設定されます。 省略可能 31.0
q String コンテキストユーザに表示されるフィード要素に含まれる 1 つ以上の検索キーワード。検索文字列にはワイルドカード文字を含めることができ、ワイルドカード文字を除く 2 文字以上が含まれている必要があります。「ワイルドカード」を参照してください。 必須項目 31.0
recentCommentCount Integer フィード要素ごとに返されるコメントの最大数。デフォルト値は 3 です。 省略可能 31.0
sort String フィード内のフィード項目の順序。
  • CreatedDateAsc作成日の古い順に並び替えられる。この並び替え順は DirectMessageModerationModeration、および PendingReview ���ィードでのみ使用できます。
  • CreatedDateDesc — 作成日の新しい順に並び替えます。
  • LastModifiedDateDesc — 活動の新しい順に並び替えられます。
  • MostViewed — 最も参照回数の多いコンテンツで並び替えます。この並び替え順は、ConnectApi.FeedFilterUnansweredQuestions の場合に Home フィードでのみ使用できます。
  • Relevance — 最も関連性の高いコンテンツで並び替えます。この並び替え順は CompanyHome、および Topics フィードで使用できます。
省略可能 31.0
GET のレスポンスボディ
Feed Element Page
POST のリクエストボディ
フィード項目とコメントの本文には、最大 10,000 文字まで含めることができます。この制限は変更可能なため、クライアントが FeedItem または FeedComment オブジェクトで describeSObjects() コールを実行することをお勧めします。最大許容文字数を判断するには、Body または CommentBody 項目の長さを見ます。
Feed Item Input
POST の要求パラメータ
パラメータ名 説明 必須項目/省略可能 使用可能なバージョン
feedElementType String フィード要素は、フィードに含まれる最上位の項目です。フィードは、フィード要素コンテナです。

使用可能な値は FeedItem のみです。

必須項目 31.0
originalFeed​ElementId String このフィード要素が共有されている場合、元のフィード要素の 18 文字の ID。

バージョン 39.0 以降では、Feed Item Input とともにネストされた Feed Entity Share Capability Input を使用します。

重要

省略可能 31.0 ~ 38.0
subjectId String このフィード要素が投稿された親の ID。この値は、ユーザ、グループ、レコードの ID、またはコンテキストユーザを示す文字列 me になります。 必須項目 31.0
text String フィード要素のテキスト。 必須項目 31.0
visibility String フィード要素を表示できるユーザの種別を指定します。
  • AllUsers — 表示は内部ユーザに限定されません。
  • InternalUsers — 表示は内部ユーザに限定されます。
省略可能 31.0
POST のレスポンスボディ
Feed Item
リクエストボディを使用してフィード項目を投稿する例
1{ 
2   "body" : {
3      "messageSegments" : [
4         {
5            "type" : "Text",
6            "text" : "When should we meet for release planning? "
7         }]
8       },
9   "feedElementType" : "FeedItem",
10   "subjectId" : "005D00000016Qxp"
11}
リクエストボディを使用してメンションを含むフィード項目を投稿する例
1{ 
2   "body" : {
3      "messageSegments" : [
4         {
5            "type" : "Text",
6            "text" : "When should we meet for release planning? "
7         },
8         {   
9            "type" : "Mention",
10            "id" : "005T0000000mzCy"
11         }
12      ]
13   },
14   "feedElementType" : "FeedItem",
15   "subjectId" : "005D00000016Qxp"
16}
リクエストボディを使用して複数のメンションを含むフィード項目を投稿する例
1{ 
2   "body" : {
3      "messageSegments" : [
4         {
5            "type" : "Text",
6            "text" : "When should we meet for release planning? "
7         },
8         {   
9            "type" : "Mention",
10            "id" : "005T0000000mzCy"
11         },
12         {
13            "type" : "Text",
14            "text" : " "
15         },
16         {   
17            "type" : "Mention",
18            "id" : "005B0000000Ek1S"
19         } 
20      ]
21   },
22   "feedElementType" : "FeedItem",
23   "subjectId" : "005D00000016Qxp"
24}
リクエストボディを使用してファイルが添付されたフィード項目を投稿する例
1{
2   "body":{
3      "messageSegments":[
4         {
5            "type":"Text",
6            "text":"Please take a look at these files."
7         }
8      ]
9   },
10   "capabilities":{
11      "files":{
12         "items": [
13            {"id": "069D00000001IOh"},
14            {"id": "069D00000002IOg"}
15         ]
16      }
17   },
18   "subjectId":"me",
19   "feedElementType":"FeedItem"
20}
リクエストボディを使用してリッチテキストのフィード項目を投稿する例
1{
2   "body":{
3      "messageSegments":[
4         {
5            "markupType" : "Paragraph",
6            "type" : "MarkupBegin"
7         },
8         {
9            "markupType" : "Bold",
10            "type" : "MarkupBegin"
11         },
12         {
13             "text" : "First line of text.",
14             "type" : "Text"
15         },
16         {
17            "markupType" : "Bold",
18            "type" : "MarkupEnd"
19         },
20         {
21            "markupType" : "Paragraph",
22            "type" : "MarkupEnd"
23         },
24         {
25            "markupType" : "Paragraph",
26            "type" : "MarkupBegin"
27         },
28         {
29            "text" : " ",
30            "type" : "Text"
31         },
32         {
33            "markupType" : "Paragraph",
34            "type" : "MarkupEnd"
35         },
36         {
37            "markupType" : "Paragraph",
38            "type" : "MarkupBegin"
39         },
40         {
41            "text" : "Second line of text.",
42            "type" : "Text"
43         },
44         {
45            "markupType" : "Paragraph",
46            "type" : "MarkupEnd"
47         }
48      ]
49   },
50   "subjectId":"me",
51   "feedElementType":"FeedItem"
52}
リクエストボディを使用してコードブロックを含むフィード項目を投稿する例
1{
2   "body":{
3      "messageSegments":[
4         {
5            "markupType" : "Code",
6            "type" : "MarkupBegin"
7         },
8         {
9             "text" : "<script>var i, t = 0;\nfor (i = 0; i < 5; i++) {\n   t +=
10                       i;\n}\n</script>",
11             "type" : "Text"
12         },
13         {
14            "markupType" : "Code",
15            "type" : "MarkupEnd"
16         }
17      ]
18   },
19   "subjectId":"me",
20   "feedElementType":"FeedItem"
21}
リクエストボディを使用してインライン画像を含むフィード項目を投稿する例
1{
2   "body":{
3      "messageSegments":[
4         {
5            "type":"Text",
6            "text":"Please take a look at this file."
7         },
8         {
9            "type":"InlineImage",
10            "fileId":"069xx00000000QO",
11            "altText":"API Spec"
12         },
13         {
14            "type":"Text",
15            "text":"And this one."
16         },
17         {
18            "type":"InlineImage",
19            "fileId":"069xx00000000QT",
20            "altText":"REST API Spec"
21         }
22      ]
23   },
24   "subjectId":"me",
25   "feedElementType":"FeedItem"
26}
リクエストボディを使用してフィード項目を共有する例
1{ 
2   "body" : {
3      "messageSegments" : [
4         {
5            "type" : "Text",
6            "text" : "When should we meet for release planning? "
7         },
8         {   
9            "type" : "Mention",
10            "id" : "005D00000016Qxp"
11         }]
12       },
13   "capabilities" : {
14      "feedEntityShare" : {
15         "feedEntityId" : "0D5B000000Py41t"
16         }
17      },
18   "feedElementType" : "FeedItem",
19   "subjectId" : "0F9B000000000W2"
20}