Action Link Group Definitions
アクションリンクグループ定義を作成します。アクションリンクをフィード要素に関連付けるには、まずアクションリンクグループ定義を作成します。次に、関連付けられたアクション機能を含むフィード要素を投稿します。
すべ���のアクションリンクはグループに属している必要があります。1 つのグループ内のアクションリンクは、相互排他的で、同じプロパティを共有します。各自のアクショングループでスタンドアロンアクションを定義します。
この画像は、[ダウンロード] と [注文] という 2 つのアクションリンクを含む 1 つのアクションリンクグループがあるフィード要素を示しています。

- リソース
-
1/connect/action-link-group-definitions1/connect/communities/communityId/action-link-group-definitions - 適用開始バージョン
- 33.0
- Chatter が必要かどうか
- いいえ
- HTTP メソッド
- POST
Action Link Group Definitions リソースは、POST のクエリパラメータをサポートしていません。Action Link Group Definition Input リクエストボディを使用する必要があります。
- POST のリクエストボディ
- Action Link Group Definition Input
- POST のレスポンスボディ
- Action Link Group Definition
- POST の例
- アクションリンクグループをフィード項目に関連付けるには、まずアクションリンクグループ定義を作成します。
-
1POST /connect/action-link-group-definitions 2 3{ 4 "actionLinks": [ 5 { 6 "actionType" : "Api", 7 "actionUrl" : "https://www.example.com/api/v1/confirm", 8 "groupDefault" : "true", 9 "headers" : [ 10 { 11 "name" : "Authorization", 12 "value" : "OAuth 00DRR0000000N0g!ARoAQMZyQtsP1Gs27EZ8hl7vdpYXH5O5rv1 13 VNprqTeD12xYnvygD3JgPnNR._nmE6thZakAbBVJUsjUInMUaKMlkNKaWXdHO" 14 }, 15 { 16 "name" : "Content-Type", 17 "value" : "application/json" 18 }, 19 { 20 "name" : "Accept", 21 "value" : "application/json" 22 }, 23 { 24 "name" : "X-PrettyPrint", 25 "value" : "1" 26 } 27 ], 28 "labelKey" : "Confirm", 29 "method" : "HttpPost", 30 "requiresConfirmation" : "true" 31 }, 32 { 33 "actionType" : "Api", 34 "actionUrl" : "https://www.example.com/api/v1/deny", 35 "groupDefault" : "false", 36 "headers" : [ 37 { 38 "name" : "Authorization", 39 "value" : "OAuth 00DRR0000000N0g!ARoAQMZyQtsP1Gs27EZ8hl7vdpYXH5O5rv1 40 VNprqTeD12xYnvygD3JgPnNR._nmE6thZakAbBVJUsjUInMUaKMlkNKaWXdHO" 41 }, 42 { 43 "name" : "Content-Type", 44 "value" : "application/json" 45 }, 46 { 47 "name" : "Accept", 48 "value" : "application/json" 49 }, 50 { 51 "name" : "X-PrettyPrint", 52 "value" : "1" 53 } 54 ], 55 "labelKey": "Deny", 56 "method" : "HttpPost", 57 "requiresConfirmation" : "true" 58 }, 59 { 60 "actionType": "Ui", 61 "actionUrl" : "https://www.example.com/reviewPage.html", 62 "groupDefault" : "false", 63 "labelKey" : "Review", 64 "method" : "HttpGet", 65 "requiresConfirmation" : "false" 66 }, 67 "executionsAllowed" : "OncePerUser", 68 "category" : "Primary", 69 "expirationDate" : "2014-05-09T18:45:39.000Z" 70} - 次に、アクションリンクグループをフィード項目に関連付けて、フィード項目を post 送信します。/connect/action-link-group-definitions 応答からアクションリンクグループ ID を取得し、POST 要求で /chatter/feed-elements に渡します。
1POST /chatter/feed-elements 2 3{ 4 "body": { 5 "messageSegments": [ 6 { 7 "type": "Text", 8 "text": "Please confirm or deny this item. You can also click Review to provide more feedback." 9 } 10 ] 11 }, 12 "subjectId": "me", 13 "feedElementType": "FeedItem", 14 "capabilities": { 15 "associatedActions": { 16 "actionLinkGroupIds": ["0AgRR0000004CTr0AM"] 17 } 18 } 19} - さまざまな種別のアクションリンクのさまざまなワークフローで status プロパティが設定されます。値は UI に表示されます。詳細は、/connect/action-links/actionLinkIdを���照してください。