Searching for Posts
This section explains how to search for backed-up Microsoft Teams posts.
Request
POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/posts/action |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
The request URL must contain the following parameters:
Parameter | Type | Description |
---|---|---|
restoreSessionId | string | Specifies the identification number of the restore session. Can be obtained as described in Getting Restore Sessions. |
teamId | string | Specifies the identification number of the team. Can be obtained as described in Getting Teams. |
Request Body
The request body must contain the search action property:
Property | Type | Description |
---|---|---|
query | string | Specifies query parameters used to search for Microsoft Teams posts. For more information, see Query Parameters. |
The following table lists examples of parameters that you can use in the query string to search for Microsoft Teams posts.
For the complete list of supported query parameters, see Appendix A. Item Search Parameters.
Parameter | Type | Description |
---|---|---|
author | string | Specifies the name of the user who created the post. Query example: author: admin. |
created | string | Specifies the time when the post was created. Query example: created: this year. |
modified | string | Specifies the time of the latest modification of the post. Query example: modified: this year. |
hasattachments | string | Defines whether the post has attachments. Query example: hasattachments: true. |
body | string | Specifies the part of the post message body. Query example: body: important. |
subject | string | Specifies the post subject or part of the post subject. Query example: subject: announcement. |
Request Example
Request: POST https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/action
Request Header: Authorization: Bearer <Access-Token>
Request Body: { "search":{ } } |
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
Property | Type | Description |
---|---|---|
offset | integer | Shows the offset value. |
limit | integer | Shows the limit of records to be displayed on the page. |
results | Contains the Results object. |
Property | Type | Description |
---|---|---|
id | string | ID of the post. |
isImportant | boolean | Defines whether the post is marked as important. |
author | string | User name of the author of the post. |
subject | string | Subject of the post. |
createdTime | datetime | Date and time when the post was created. |
lastModificationTime | datetime | Date and time of the latest modification of the post. |
attachments | object[] | Attachments of the post. |
_links | Dictionary of string [key] and Object [value] | Links to related resources (navigation property). |
Response Example
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/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1603973537508?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2" }, "channel": { "href": "https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2" }, "team": { "href": "https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f" } } }, { "id": 1600943113431, "isImportant": false, "author": "admin", "subject": "", "createdTime": "2020-09-24T10:25:13.431Z", "lastModifiedTime": "2020-09-24T10:45:16.471Z", "attachments": [], "_links": { "self": { "href": "https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/1600943113431?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2" }, "channel": { "href": "https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2" }, "team": { "href": "https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f" } } } ], "_links": { "self": { "href": "https://abc.tech.local:4443/v5/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/posts/action?offset=0&limit=30" } } } |