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

Getting Posts

You can get a resource representation of backed-up Microsoft Teams posts.

Request

GET https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/posts[?channelId=<channelId>&parentId=<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 parameters can be specified in the URL of the request:

Parameter

Type

Description

channelId

string

Specifies the ID of the channel whose posts the server will return in the resource representation. If you do not specify this parameter, the server will return a representation of posts pertaining to all channels of the backed-up team.

parentId

string

Specifies what information the server will return in the resource representation. Possible values:

  • <parentID> — ID of a parent post. In the response, the server will return a representation of child posts of the specified parent post.
  • -1 — specifies that the server will return a representation of parent posts only.

If you do not specify this parameter, the server will return a representation of all parent and child posts.

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}/posts resource.

Examples

Example 1

The following request returns a resource representation of backed-up Microsoft Teams posts for a team with the ID 448c5b66-8dcd-4c75-b636-d3b500bce36f.

Request:

GET https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

 "offset": 0,

 "limit": 30,

 "results": [

   {

     "id": 1603973537508,

     "isImportant": false,

     "author": "admin",

     "subject": "announcement",

     "createdTime": "2020-10-29T12:12:17.508Z",

     "lastModifiedTime": "2020-10-29T12:19:59.976Z",

     "attachments": [],

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1603973537508?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "children": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2&parentId=1603973537508"

       }

     }

   },

   {

     "id": 1600943092762,

     "isImportant": false,

     "author": "admin",

     "subject": "",

     "createdTime": "2020-10-30T10:24:52.762Z",

     "lastModifiedTime": "2020-10-30T10:45:05.951Z",

     "attachments": [],

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943092762?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "parent": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1603973537508?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       }

     }

   }

 ],

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?offset=0&limit=30"

   }

 }

}

Example 2

The following request returns a resource representation of backed-up Microsoft Teams posts from a channel with the ID 19:94e57dbfaa634f999353b374b69b5800@thread.tacv2.

Request:

GET https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?channelId=19%3A94e57dbfaa634f999353b374b69b5800%40thread.tacv2

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

 "offset": 0,

 "limit": 30,

 "results": [

   {

     "id": 1603973537508,

     "isImportant": false,

     "author": "admin",

     "subject": "announcement",

     "createdTime": "2020-10-29T12:12:17.508Z",

     "lastModifiedTime": "2020-10-29T12:19:59.976Z",

     "attachments": [],

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1603973537508?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "children": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2&parentId=1603973537508"

       }

     }

   },

   {

     "id": 1600943092762,

     "isImportant": false,

     "author": "admin",

     "subject": "",

     "createdTime": "2020-10-30T10:24:52.762Z",

     "lastModifiedTime": "2020-10-30T10:45:05.951Z",

     "attachments": [],

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943092762?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "parent": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1603973537508?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       }

     }

   }

 ],

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?offset=0&limit=30"

   }

 }

}

Example 3

The following request returns a resource representation of child posts of a parent post with the ID 1600943113431.

Request:

GET https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?parentId=1600943113431

 

Request Header:

Authorization: Bearer <Access-Token>

 

Response:

200 OK

 

Response Body:

{

 "offset": 0,

 "limit": 30,

 "results": [

   {

     "id": 1600943120880,

     "isImportant": false,

     "author": "admin",

     "subject": "",

     "createdTime": "2020-09-24T10:25:20.88Z",

     "lastModifiedTime": "2020-09-24T10:25:20.88Z",

     "attachments": [],

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943120880?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "parent": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943113431?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       }

     }

   },

   {

     "id": 1600943119475,

     "isImportant": false,

     "author": "admin",

     "subject": "",

     "createdTime": "2020-09-24T10:25:19.475Z",

     "lastModifiedTime": "2020-09-24T10:25:19.475Z",

     "attachments": [],

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943119475?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f"

       },

       "parent": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943113431?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2"

       }

     }

   }

 ],

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/b37d61fa-118c-4b9a-a027-a22de0b689e8/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts?parentid=1600943113431&offset=0&limit=30"

   }

 }

}