diff --git a/api-reference/beta/api/channel-getallretainedmessages.md b/api-reference/beta/api/channel-getallretainedmessages.md index e84c31be9c6..fb69f29696d 100644 --- a/api-reference/beta/api/channel-getallretainedmessages.md +++ b/api-reference/beta/api/channel-getallretainedmessages.md @@ -54,6 +54,16 @@ This method supports the following OData query parameters to help customize the | $filter | The [$filter](/graph/query-parameters#filter-parameter) query parameter supports date and time range queries on the **lastModifiedDateTime** property.| | $top | Use the [$top](/graph/query-parameters#top-parameter) query parameter to control the number of items per response.| +The following table lists examples that show how to use the `$filter` parameter. + +|Scenario | `$filter` parameter |Possible values | +|:-----------------------------------------|:---------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------| +|Get messages sent by user identity type |$filter=from/user/userIdentityType eq '{teamworkUserIdentityType}' |aadUser, onPremiseAadUser, anonymousGuest, federatedUser, personalMicrosoftAccountUser, skypeUser, phoneUser| +|Get messages sent by application type |$filter=from/application/applicationIdentityType eq '{teamworkApplicationIdentity}' |aadApplication, bot, tenantBot, office365Connector, outgoingWebhook | +|Get messages sent by user ID |$filter=from/user/id eq '{oid}' || +|Get control (system event) messages |$filter=messageType eq 'systemEventMessage' || +|Exclude control (system event) messages |$filter=messageType ne 'systemEventMessage' || + ## Request headers |Name|Description| diff --git a/api-reference/beta/api/chat-getallretainedmessages.md b/api-reference/beta/api/chat-getallretainedmessages.md index d1a61cb4bfe..808a7b90969 100644 --- a/api-reference/beta/api/chat-getallretainedmessages.md +++ b/api-reference/beta/api/chat-getallretainedmessages.md @@ -57,6 +57,17 @@ The following example shows a request that uses the `$top` and `$filter` query p ```http GET /users/{id}/chats/getAllRetainedMessages?$top=50&$filter=lastModifiedDateTime gt 2020-06-04T18:03:11.591Z and lastModifiedDateTime lt 2020-06-05T21:00:09.413Z ``` + +The following table lists examples that show how to use the `$filter` parameter. + +|Scenario | `$filter` parameter |Possible values | +|:-----------------------------------------|:---------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------| +|Get messages sent by user identity type |$filter=from/user/userIdentityType eq '{teamworkUserIdentityType}' |aadUser, onPremiseAadUser, anonymousGuest, federatedUser, personalMicrosoftAccountUser, skypeUser, phoneUser| +|Get messages sent by application type |$filter=from/application/applicationIdentityType eq '{teamworkApplicationIdentity}' |aadApplication, bot, tenantBot, office365Connector, outgoingWebhook | +|Get messages sent by user ID |$filter=from/user/id eq '{oid}' || +|Get control (system event) messages |$filter=messageType eq 'systemEventMessage' || +|Exclude control (system event) messages |$filter=messageType ne 'systemEventMessage' || + ## Request headers |Name|Description|