Skip to content

Commit d0051c0

Browse files
authored
Merge pull request #28576 from microsoftgraph/jsinghmokha/add-channel-layouttype-v1.0
Add channel layoutType property for v1.0 (GA release)
2 parents b594fb2 + 30b946e commit d0051c0

16 files changed

Lines changed: 220 additions & 55 deletions

api-reference/beta/api/channel-list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Content-type: application/json
147147
```
148148

149149
> [!NOTE]
150-
> This API has a [known issue](https://microsoftgraph.visualstudio.com/Known%20Issues/_workitems/edit/40502/) related to listing channels. The **layoutType** property returns `null` when listing channels. To get the layout type of a specific channel, use the [Get channel](../api/channel-get.md) API. Full support for **layoutType** in list operations is planned for a future release.
150+
> This API has a [known issue](/graph/known-issues#layouttype-property-returns-null-when-listing-all-channels) related to listing channels. The **layoutType** property returns `null` when listing channels. To get the layout type of a specific channel, use the [Get channel](../api/channel-get.md) API.
151151
152152
### Example 2: List all private channels
153153

api-reference/beta/api/channel-patch.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ HTTP/1.1 204 No Content
165165
}
166166
-->
167167

168-
### Example 4: Update a channel's layout type
168+
### Example 4: Update the layout type of a channel
169169

170-
This example shows how to update an existing channel's layout type from post to chat.
170+
The following example shows how to update the existing layout type of a channel from post to chat.
171171

172172
#### Request
173173

174-
The following example shows a request to change a channel's layout from the traditional post-reply format to a chat-like threading experience.
174+
The following example shows a request to change the layout of a channel from the traditional post-reply format to a chat-like threading experience.
175175

176176
# [HTTP](#tab/http)
177177
<!-- {
@@ -232,10 +232,10 @@ HTTP/1.1 204 No Content
232232

233233
### Example 5: Switch a channel back to post layout type
234234

235-
This example shows how to convert a chat-layout channel back to the traditional post-reply format.
235+
The following example shows how to convert a chat-layout channel back to the traditional post-reply format.
236236

237237
#### Request
238-
238+
The following example shows a request.
239239
# [HTTP](#tab/http)
240240
<!-- {
241241
"blockType": "request",

api-reference/beta/api/channel-post.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,11 @@ Content-type: application/json
241241

242242
### Example 3: Create a channel with chat layout type
243243

244-
This example shows how to create a channel with the chat layout type, which provides a chat-like threading experience similar to group chats.
244+
The following example shows how to create a channel with the chat layout type that provides a chat-like threading experience similar to group chats.
245245

246246
#### Request
247247

248-
The following example shows a request to create a channel with `layoutType` set to `chat`.
248+
The following example shows a request to create a channel with **layoutType** set to `chat`.
249249

250250
# [HTTP](#tab/http)
251251
<!-- {

api-reference/beta/resources/channel.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ where files are shared, and where tabs are added.
7878
|email|String| The email address for sending messages to the channel. Read-only.|
7979
|webUrl|String|A hyperlink to the channel in Microsoft Teams. This URL is supplied when you right-click a channel in Microsoft Teams and select Get link to channel. This URL should be treated as an opaque blob, and not parsed. Read-only.|
8080
|membershipType|[channelMembershipType](../resources/channel.md#channelmembershiptype-values)|The type of the channel. Can be set during creation and can't be changed. The possible values are: `standard`, `private`, `unknownFutureValue`, `shared`. The default value is `standard`. Use the `Prefer: include-unknown-enum-members` request header to get the following members in this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `shared`.|
81-
|layoutType|[channelLayoutType](channellayouttype.md)|The layout type of the channel. Can be set during creation and can be updated. The possible values are: `post`, `chat`, `unknownFutureValue`. The default value is `post`. Channels with `post` layout use traditional post-reply conversation format, while channels with `chat` layout provide a chat-like threading experience similar to group chats.|
81+
|layoutType|[channelLayoutType](../resources/channel.md#channellayouttype-values)|The layout type of the channel. It can be set during creation and updated later. The possible values are: `post`, `chat`, `unknownFutureValue`. The default value is `post`. Channels with the `post` layout use a traditional postreply conversation format, and channels with the chat layout provide a chatlike threading experience similar to group chats.|
8282
|createdDateTime|dateTimeOffset|Read only. Timestamp at which the channel was created.|
8383
|moderationSettings|[channelModerationSettings](../resources/channelmoderationsettings.md)|Settings to configure channel moderation to control who can start new posts and reply to posts in that channel.|
8484
|originalCreatedDateTime|dateTimeOffset|Timestamp of the original creation time for the channel. The value is `null` if the channel never entered migration mode.|
@@ -95,6 +95,14 @@ where files are shared, and where tabs are added.
9595
| unknownFutureValue | Evolvable enumeration sentinel value. Don't use. |
9696
| shared | Members can be directly added to the channel without adding them to the team. |
9797

98+
### channelLayoutType values
99+
100+
| Member | Description |
101+
|:-------------------|:---------------------------------------------------------------------------------------------------------------------|
102+
| post | Traditional post-reply conversation format. Posts are displayed in a structured format with replies nested under the original post. Represents the default layout type. |
103+
| chat | Chat-like threading experience similar to group chats. Messages are displayed in a continuous flow with support for threaded conversations on specific topics.|
104+
| unknownFutureValue | Evolvable enumeration sentinel value. Don't use. |
105+
98106
### migrationMode values
99107

100108
| Member | Description |

api-reference/beta/resources/channellayouttype.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

api-reference/v1.0/api/channel-get.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Content-type: application/json
133133
"displayName": "General",
134134
"description": "AutoTestTeam_20210311_150740.2550_fim3udfdjen9",
135135
"membershipType": "standard",
136+
"layoutType": "post",
136137
"isArchived": false
137138
}
138139
```

api-reference/v1.0/api/channel-list.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,17 +135,23 @@ Content-type: application/json
135135
"displayName": "General",
136136
"description": "AutoTestTeam_20210311_150740.2550_fim3udfdjen9",
137137
"membershipType": "standard",
138+
"layoutType": null,
138139
"isArchived": false
139140
}
140141
]
141142
}
142143
```
143144

145+
> [!NOTE]
146+
> This API has a [known issue](/graph/known-issues#layouttype-property-returns-null-when-listing-all-channels) related to listing channels. The **layoutType** property returns `null` when listing channels. To get the layout type of a specific channel, use the [Get channel](../api/channel-get.md) API.
147+
144148
### Example 2: List all private channels
145149

150+
The following example shows how to list all private channels.
151+
146152
#### Request
147153

148-
The following example shows a request to list all private channels.
154+
The following example shows a request.
149155

150156

151157

@@ -214,6 +220,7 @@ Content-type: application/json
214220
"displayName": "General",
215221
"description": "test private team",
216222
"membershipType": "private",
223+
"layoutType": null,
217224
"isArchived": false
218225
}
219226
]
@@ -297,6 +304,7 @@ Content-length: 262
297304
"email": "",
298305
"webUrl": "https://teams.microsoft.com/l/channel/19%3ALpxShHZZh9utjNcEmUS5aOEP9ASw85OUn05NcWYAhX81%40thread.tacv2/shared%20channel-01?groupId=6a720ba5-7373-463b-bc9f-4cd04b5c6742&tenantId=df81db53-c7e2-418a-8803-0e68d4b88607",
299306
"membershipType": "shared",
307+
"layoutType": null,
300308
"moderationSettings": null,
301309
"isArchived": false
302310
}

api-reference/v1.0/api/channel-patch.md

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ In the request body, supply a JSON representation of [channel](../resources/chan
5252

5353
If successful, this method returns a `204 No Content` response code.
5454

55-
## Example
55+
## Examples
5656

57-
### Request
57+
### Example 1: Update a channel
58+
The following example shows how to update a channel.
59+
#### Request
5860

5961
The following example shows a request.
6062

@@ -95,7 +97,7 @@ PATCH https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e2026
9597

9698
---
9799

98-
### Response
100+
#### Response
99101

100102
The following example shows the response.
101103
<!-- {
@@ -106,6 +108,72 @@ The following example shows the response.
106108
HTTP/1.1 204 No Content
107109
```
108110

111+
### Example 2: Update the layout type of a channel
112+
113+
The following example shows how to update the existing layout type of a channel from post to chat.
114+
115+
#### Request
116+
117+
The following example shows a request to change the layout of a channel from the traditional post-reply format to a chat-like threading experience.
118+
119+
<!-- {
120+
"blockType": "request",
121+
"name": "update_channel_layouttype",
122+
"sampleKeys": ["893075dd-2487-4122-925f-022c42e20265", "19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2"]
123+
}-->
124+
125+
```http
126+
PATCH https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e20265/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2
127+
Content-type: application/json
128+
129+
{
130+
"layoutType": "chat"
131+
}
132+
```
133+
134+
#### Response
135+
136+
The following example shows the response.
137+
138+
<!-- {
139+
"blockType": "response"
140+
} -->
141+
```http
142+
HTTP/1.1 204 No Content
143+
```
144+
145+
### Example 3: Switch a channel back to post layout type
146+
147+
The following example shows how to convert a chat-layout channel back to the traditional post-reply format.
148+
149+
#### Request
150+
The following example shows a request.
151+
<!-- {
152+
"blockType": "request",
153+
"name": "update_channel_layouttype_to_post",
154+
"sampleKeys": ["893075dd-2487-4122-925f-022c42e20265", "19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2"]
155+
}-->
156+
157+
```http
158+
PATCH https://graph.microsoft.com/v1.0/teams/893075dd-2487-4122-925f-022c42e20265/channels/19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2
159+
Content-type: application/json
160+
161+
{
162+
"layoutType": "post"
163+
}
164+
```
165+
166+
#### Response
167+
168+
The following example shows the response.
169+
170+
<!-- {
171+
"blockType": "response"
172+
} -->
173+
```http
174+
HTTP/1.1 204 No Content
175+
```
176+
109177
<!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79
110178
2015-10-25 14:57:30 UTC -->
111179
<!--

api-reference/v1.0/api/channel-post.md

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,70 @@ Content-type: application/json
227227
}
228228
```
229229

230-
### Example 3: Create a channel in migration mode
230+
### Example 3: Create a channel with chat layout type
231+
232+
The following example shows how to create a channel with the chat layout type that provides a chat-like threading experience similar to group chats.
231233

232234
#### Request
233235

234-
The following example shows how to create a channel that will be used for importing messages.
236+
The following example shows a request to create a channel with **layoutType** set to `chat`.
237+
238+
<!-- {
239+
"blockType": "request",
240+
"name": "create_channel_with_chat_layout",
241+
"sampleKeys": ["57fb72d0-d811-46f4-8947-305e6072eaa5"]
242+
}-->
243+
244+
```http
245+
POST https://graph.microsoft.com/v1.0/teams/57fb72d0-d811-46f4-8947-305e6072eaa5/channels
246+
Content-type: application/json
247+
248+
{
249+
"displayName": "Project Collaboration",
250+
"description": "Discussion space for project team collaboration",
251+
"membershipType": "standard",
252+
"layoutType": "chat"
253+
}
254+
```
255+
256+
#### Response
257+
258+
The following example shows the response.
259+
260+
> **Note:** The response object shown here might be shortened for readability.
261+
262+
<!-- {
263+
"blockType": "response",
264+
"truncated": true,
265+
"@odata.type": "microsoft.graph.channel"
266+
} -->
267+
268+
```http
269+
HTTP/1.1 201 Created
270+
Content-type: application/json
271+
272+
{
273+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('57fb72d0-d811-46f4-8947-305e6072eaa5')/channels/$entity",
274+
"id": "19:4b6bed8d24574f6a9e436813cb2617d8@thread.tacv2",
275+
"createdDateTime": "2024-12-08T12:30:45.123Z",
276+
"displayName": "Project Collaboration",
277+
"description": "Discussion space for project team collaboration",
278+
"membershipType": "standard",
279+
"layoutType": "chat",
280+
"isFavoriteByDefault": false,
281+
"email": "",
282+
"webUrl": "https://teams.microsoft.com/l/channel/19%3A4b6bed8d24574f6a9e436813cb2617d8%40thread.tacv2/Project%20Collaboration?groupId=57fb72d0-d811-46f4-8947-305e6072eaa5&tenantId=0afeb5d5-a667-4716-8fc7-733024389e91",
283+
"tenantId": "0afeb5d5-a667-4716-8fc7-733024389e91"
284+
}
285+
```
286+
287+
### Example 4: Create a channel in migration mode
288+
289+
The following example shows how to create a channel that is used for importing messages.
290+
291+
#### Request
292+
293+
The following example shows a request.
235294

236295

237296

@@ -312,11 +371,13 @@ Location: /teams('57fb72d0-d811-46f4-8947-305e6072eaa5')/channels('19:4b6bed8d24
312371
}
313372
```
314373

315-
### Example 4: Create private channel on behalf of user using user principal name
374+
### Example 5: Create a private channel on behalf of a user using the user principal name
375+
376+
The following example shows how to create a private channel and add a user as a team owner.
316377

317378
#### Request
318379

319-
The following example shows a request to create a private channel and add a user as a team owner.
380+
The following example shows a request.
320381

321382

322383
# [HTTP](#tab/http)
@@ -404,11 +465,13 @@ Content-type: application/json
404465
}
405466
```
406467

407-
### Example 5: Create a shared channel on behalf of a user
468+
### Example 6: Create a shared channel on behalf of a user
469+
470+
The following example shows how to create a shared channel.
408471

409472
#### Request
410473

411-
The following example shows how to create a shared channel.
474+
The following example shows a request.
412475

413476

414477

api-reference/v1.0/api/team-get-primarychannel.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,13 @@ Content-type: application/json
111111
"displayName": "General",
112112
"description": "Microsoft Teams Platform team discussions",
113113
"email": "0686dc7a.microsoft.com@amer.teams.ms",
114-
"webUrl": "https://teams.microsoft.com/l/channel/19%3askypespaces_dd1e128ffa85453ab1f3015468e979d5%40thread.skype/General?groupId=32e3b156-66b2-4135-9aeb-73295a35a55b&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47"
114+
"webUrl": "https://teams.microsoft.com/l/channel/19%3askypespaces_dd1e128ffa85453ab1f3015468e979d5%40thread.skype/General?groupId=32e3b156-66b2-4135-9aeb-73295a35a55b&tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47",
115+
"membershipType": "standard",
116+
"layoutType": null
115117
}
116118
```
119+
> [!NOTE]
120+
> This API has a [known issue](/graph/known-issues#layouttype-property-returns-null-when-listing-all-channels) related to listing channels. The **layoutType** property returns `null` when listing channels. To get the layout type of a specific channel, use the [Get channel](../api/channel-get.md) API. Full support for **layoutType** in list operations is planned for a future release.
117121
<!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79
118122
2015-10-25 14:57:30 UTC -->
119123
<!-- {

0 commit comments

Comments
 (0)