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

Searching for Teams Items in Organization Backups

You can search for Microsoft Teams items of a backed-up Microsoft Office 365 organization.

Request

POST https://<hostname>:4443/v5/RestoreSessions/{restoreSessionId}/organization/action

Request Headers

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

Request Parameters

The following parameter 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.

Request Body

The request body must contain the search action properties:

Property

Type

Description

type

string

Type of Microsoft Teams items that you want to find. Possible values:

  • files
  • posts
  • tabs

query

string

Specifies query parameters used to search for Microsoft Teams items. For more information, see Query Parameters.

Query Parameters

The following table lists examples of parameters that you can use in the query string to search for Microsoft Teams items.

For the complete list of supported query parameters, see Appendix A. Item Search Parameters.

Search Parameters for Files

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.

Search Parameters for Posts

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.

Search Parameters for Tabs

Parameter

Type

Description

name

string

Specifies the name of the tab.

Query example: name: website.

Request Example 1

Request:

POST https://abc.tech.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

  "search":{
     "type": "files",

     "query": "filename: report"

  }

}

Request Example 2

Request:

POST https://abc.tech.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

  "search":{
     "type": "posts",

     "query": "subject: announcement"

  }

}

Request Example 3

Request:

POST https://abc.tech.local:4443/v5/RestoreSessions/6a50c1ce-07e1-4ee9-9158-9150acb5c2eb/organization/action

 

Request Header:

Authorization: Bearer <Access-Token>

 

Request Body:

{

  "search":{
     "type": "tabs",

     "query": "name: website"

  }

}

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 contains the following information:

Property

Type

Description

offset

integer

Shows the offset value.

limit

integer

Shows the limit of records to be displayed on the page.

results

Results Object

Contains the Results object.

Results Object

Results Object for Files

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

datetime

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).

Results Object for Posts

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).

Results Object for Tabs

Property

Type

Description

id

string

ID of the backed-up tab.

displayName

string

Display name of the backed-up tab.

contentUrl

string

URL address of the object published on the backed-up tab.

type

string

Type of the backed-up tab.

_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": "f6bb1e94-f371-4f5e-922f-f861b364b213",

     "name": "report.html",

     "sizeBytes": 19819,

     "version": 6,

     "modified": "2020-11-06T10:25:29Z",

     "modifiedBy": "admin",

     "type": "File",

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/files/f6bb1e94-f371-4f5e-922f-f861b364b213?channelId=19:3efc9c04503f486595823f43731f1a9a@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels/19:3efc9c04503f486595823f43731f1a9a@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf"

       }

     }

   },

   {

     "id": "43f8b4a4-89ec-4f20-b285-d7ec97b498a8",

     "name": "report_2020.html",

     "sizeBytes": 458616,

     "version": 6,

     "modified": "2020-11-06T10:34:51Z",

     "modifiedBy": "admin",

     "type": "File",

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/files/43f8b4a4-89ec-4f20-b285-d7ec97b498a8?channelId=19:3efc9c04503f486595823f43731f1a9a@thread.tacv2"

       },

       "channel": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/channels/19:3efc9c04503f486595823f43731f1a9a@thread.tacv2"

       },

       "team": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf"

       },

       "parent": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/teams/a21a2761-c664-4e9c-9c3b-592ffb5ee3bf/files/d5ef6028-247a-4696-8b85-c2eca153658a?channelId=19:3efc9c04503f486595823f43731f1a9a@thread.tacv2"

       }

     }

   }

],

 "_links": {

   "self": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/action?offset=0&limit=30"

   },

   "next": {

     "href": "https://abc.tech.local:4443/v5/RestoreSessions/0dccfd9f-8056-4d90-a7a3-2af1f9a249a1/organization/action?offset=30&limit=30"

   }

 }

}