> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/functional/chatter-feeds/chatter-api-methods.md).

# Chatter API methods

## getFeedsByTopics

* **Signature**: `getFeedsByTopics(Set<String> names, Boolean useAnd)`
* **Description:** Returns feed items for topics
* **Parameters:**
  * `names` - Set of names to filter the feeds by
  * `useAnd` - defines whether to use AND or OR operator when operating on the ‘names’ parameter
* **Return type:** `List<ConnectApi.FeedElement>`

**Example of usage:**

{% code overflow="wrap" %}

```apex
List<ConnectApi.FeedElement> feedsForFlowinstanceId = new WR_BPM.API().call('ChatterService', 'getFeedsByTopics', new Map<String, Object>{'names' => new Set<String>{'FI#000002',  ‘Step123’}, 'useAnd' => true});
```

{% endcode %}

This call will return a list of feed items with topics = `[‘FI#000002’, ‘Step123’]`, with the first being Flow Instance name, and second Step Name.

## getCommentsByFeedIds

* **Signature:** `getCommentsByFeedIds(List<Id> Ids)`
* **Desciption**: Returns feed comments for feed items
* **Parameters:**
  * `Ids` - list of feed items ids
* **Return type:** `List<FeedComment>`
