This is an archive version of the document. To get the most up-to-date information, see the current version.

Getting Teams Channels

You can get a resource representation of Microsoft Teams channels.

Request

GET https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/channels[?displayName=<value>]

Request Headers

The request header must contain an authorization token of the current session.

Request Parameters

The following parameters must be specified in the URL of the request:

Parameter

Type

Description

restoreSessionId

string

Specifies the identification number of the restore session. For more information on how to get this parameter, see Getting Restore Sessions.

teamId

string

Specifies the identification number of the team. For more information on how to get this parameter, see Getting Teams.

The following optional parameter can be specified in the URL of the request:

Parameter

Type

Description

displayName

string

Specifies the display name of the channels whose representation you want to get from the server. The server will return a representation of the channels whose display name contains the value that you specified for this parameter.

Request Body

None.

Response

The server returns the following response to the client.

Response Codes

A successfully completed operation returns a response code 200 OK.

Response Headers

The response to this request contains the following headers. The response may also include additional standard HTTPS headers.

Header

Description

Content-length

The length of the response body.

Content-type

The media type and syntax of the response body message: application/json; charset=utf-8

Response Body

In the response body, the server returns a resource representation of the /RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/channels resource.

Examples

Example 1

The following request returns a resource representation of team's channels.

Request:

GET https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

 "offset": 0,

 "limit": 30,

 "results": [

   {

     "id": "19:94e57dbfaa634f999353b374b69b5800@thread.tacv2",

     "displayName": "General",

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "tabs": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2/tabs"

       },

       "files": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/files?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "posts": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       }

     }

   }

 ],

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/1016c007-fe65-4f25-9d71-cc7ea387b3dc/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels?offset=0&limit=30"

   }

 }

}

Example 2

The following request returns a resource representation of team's channels whose names match the specified value.

Request:

GET https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels?displayName=Azure

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

 "offset": 0,

 "limit": 30,

 "results": [

   {

     "id": "19:6b5b3b1c37a1455ca03fab7c7bf410e0@thread.tacv2",

     "displayName": "Azure",

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels/19:6b5b3b1c37a1455ca03fab7c7bf410e0@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf"

       },

       "tabs": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels/19:6b5b3b1c37a1455ca03fab7c7bf410e0@thread.tacv2/tabs"

       },

       "files": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/files?channelId=19:6b5b3b1c37a1455ca03fab7c7bf410e0@thread.tacv2"

       },

       "posts": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/posts?channelId=19:6b5b3b1c37a1455ca03fab7c7bf410e0@thread.tacv2"

       }

     }

   },

   {

     "id": "19:f08056635f3a4576a1350b2d121b2756@thread.tacv2",

     "displayName": "Azure2020_10_01_07_54_00",

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels/19:f08056635f3a4576a1350b2d121b2756@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf"

       },

       "tabs": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels/19:f08056635f3a4576a1350b2d121b2756@thread.tacv2/tabs"

       },

       "files": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/files?channelId=19:f08056635f3a4576a1350b2d121b2756@thread.tacv2"

       },

       "posts": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/posts?channelId=19:f08056635f3a4576a1350b2d121b2756@thread.tacv2"

       }

     }

   }

 ],

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/e9921c25-6845-4c6f-a913-bc03b712483a/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels?displayname=Azure&offset=0&limit=30"

   }

 }

}