From 9405f1190d4a50591cc3fff78b2fb4e6476ebac3 Mon Sep 17 00:00:00 2001 From: Won Lee Date: Fri, 19 Apr 2024 10:52:45 +0100 Subject: [PATCH 1/3] Adding document about $filter --- .../beta/api/channel-getallretainedmessages.md | 10 ++++++++++ api-reference/beta/api/chat-getallretainedmessages.md | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/api-reference/beta/api/channel-getallretainedmessages.md b/api-reference/beta/api/channel-getallretainedmessages.md index e84c31be9c6..883d08bbed4 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.| +This method supports also supports `$filter`. The following table lists examples. + +|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..252d0320cf4 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 ``` + +This method supports also supports `$filter`. The following table lists examples. + +|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| From 9f9ed1e45df67a9ac9cbfa2d0053da8552b64c47 Mon Sep 17 00:00:00 2001 From: Laura Graham Date: Fri, 19 Apr 2024 19:25:58 -0700 Subject: [PATCH 2/3] Update channel-getallretainedmessages.md --- api-reference/beta/api/channel-getallretainedmessages.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-reference/beta/api/channel-getallretainedmessages.md b/api-reference/beta/api/channel-getallretainedmessages.md index 883d08bbed4..fb69f29696d 100644 --- a/api-reference/beta/api/channel-getallretainedmessages.md +++ b/api-reference/beta/api/channel-getallretainedmessages.md @@ -54,14 +54,14 @@ 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.| -This method supports also supports `$filter`. The following table lists examples. +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' || +|Get control (system event) messages |$filter=messageType eq 'systemEventMessage' || |Exclude control (system event) messages |$filter=messageType ne 'systemEventMessage' || ## Request headers From 1dba48e24e218c22a3fcae51bcc535344fd738ff Mon Sep 17 00:00:00 2001 From: Laura Graham Date: Fri, 19 Apr 2024 19:26:35 -0700 Subject: [PATCH 3/3] Update chat-getallretainedmessages.md --- api-reference/beta/api/chat-getallretainedmessages.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api-reference/beta/api/chat-getallretainedmessages.md b/api-reference/beta/api/chat-getallretainedmessages.md index 252d0320cf4..808a7b90969 100644 --- a/api-reference/beta/api/chat-getallretainedmessages.md +++ b/api-reference/beta/api/chat-getallretainedmessages.md @@ -58,14 +58,14 @@ The following example shows a request that uses the `$top` and `$filter` query p 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 ``` -This method supports also supports `$filter`. The following table lists examples. +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' || +|Get control (system event) messages |$filter=messageType eq 'systemEventMessage' || |Exclude control (system event) messages |$filter=messageType ne 'systemEventMessage' || ## Request headers