Searching for Files
You can search for backed-up Microsoft Teams files.
Request
POST https://<hostname>:4443/v6/RestoreSessions/{restoreSessionId}/organization/teams/{teamId}/files/search |
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. |
Request Body
The request body must contain the following property:
Property | Type | Description |
---|---|---|
query | string | Specifies query parameters used to search for Microsoft Teams files. 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 files.
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 file. Query example: author: admin. |
created | string | Specifies the time when the file was created. Query example: created: this year. |
modified | string | Specifies the time of the latest modification of the post. Query example: modified: this year. |
ext | string | Specifies the file extension. Query example: ext: html. |
filename | string | Specifies the file name or part of the file name. Query example: filename: report. |
size | string | Specifies the file size. Query example: size: 5MB. |
Request Example
Request: POST https://abc.tech.local:4443/v6/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/files/search
Request Header: Authorization: Bearer <Access-Token>
Request Body: { } |
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
The response body contains the following properties:
Property | Type | Description |
---|---|---|
offset | integer | Specifies the offset value. |
limit | integer | Specifies the limit of records to be displayed on the page. |
results | Contains the Results object. |
Property | Type | Description |
---|---|---|
id | string | ID of the file. |
name | string | File name. |
sizeBytes | integer | Size of the file. |
version | string | Version of the file in the backup. |
modified | UTC | Date and time of the last modification of the file. |
modifiedBy | string | Name of the user who performed the latest modification of the file. |
type | string | Type of the Microsoft Teams item. |
_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": "9d939133-0c2c-4f8f-b317-6a3270229d32", "name": "word.docx", "sizeBytes": 16838, "version": 3, "modified": "2020-08-20T15:20:42Z", "modifiedBy": "admin", "type": "File", "_links": { "self": { "href": "/v6/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/files/9d939133-0c2c-4f8f-b317-6a3270229d32?channelId=19:94e57dbfaa634f999353b374b69b5800@thread.tacv2" }, "channel": { "href": "/v6/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/channels/19:94e57dbfaa634f999353b374b69b5800@thread.tacv2" }, "team": { "href": "/v6/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f" } } } ], "_links": { "self": { "href": "/v6/RestoreSessions/1a4df11a-2220-42a9-b3a0-d25cdb8e5fcb/organization/teams/448c5b66-8dcd-4c75-b636-d3b500bce36f/files/search?offset=0&limit=30" } } } |