Creating Restore Session for Organization by Organization ID

In this article

    You can start a restore session for the specified organization.

    Request

    POST https://<hostname>:4443/v5/Organizations/{organizationId}/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

    organizationId

    string

    Specifies the identification number of the Office 365 organization. For more information on how to get this parameter, see Getting Organizations.

    Request Body

    To start a restore session, the request body must contain the explore action properties:

    Property

    Type

    Description

    datetime

    UTC

    Specifies the date and time. You can specify the date and the time in one of the following formats:

    • <yyyy-MM-dd HH:mm:ss.SSS>
    • <yyyy.MM.dd hh:mm:ss>

    type

    sessionType

    Specifies the type of the restore session to start:

    • vex
    • vesp
    • veod
    • vet

    showDeleted

    boolean

    Specifies the restore session will show the deleted items.

    showAllVersions

    boolean

    Specifies the restore session will show all versions of backed-up items.

    The request command will start a restore session only for backups that were created at the time you specified. The firstBackuptime and lastBackuptime properties of the /Organization/{organizationId} resource inform you when the organization's data was backed up for the first and last times.

    Mind the following:

    • If you specify the point in time which precedes the organization's first backup time, the restore session will be created with no backup data for explore or restore.
    • If you specify the point in time which exceeds the organization's last backup time, the restore session will be created with backup data as of the latest restore point.

    Response

    The server returns the following response to the client.

    Response Codes

    A successfully completed operation returns a response code 201 Created.

    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 /Organization/{organizationId}/action resource.

    Examples

    Example 1

    Request:

    POST https://abc.tech.local:4443/v5/Organizations/3c424478-0811-4920-8aab-01f0bf2a2822/action

     

    Request Header:

    Authorization: Bearer <Access-Token>

     

    Request Body:

    {

     "explore": {

      "datetime": "2020-10-30T10:54:40.2794046Z",

      "type": "vet",

      "showAllVersions": false,

      "showDeleted": false

     }

    }

     

    Response:

    201 Created

     

    Response Body:

    {

     "id": "8caccbcb-3e6c-4e55-83b2-d7d196e11cbe",

     "name": "Teams restore (Entire organization - 10/30/2020 10:29:05 AM)",

     "organization": "abc.onmicrosoft.com",

     "type": "Vet",

     "creationTime": "2020-10-30T14:51:36.0833712Z",

     "endTime": "2020-10-30T14:51:36.0833712Z",

     "state": "Working",

     "result": "Success",

     "initiatedBy": "EPSILON\\Administrator",

     "_links": {

       "self": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/8caccbcb-3e6c-4e55-83b2-d7d196e11cbe"

       },

       "organization": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/8caccbcb-3e6c-4e55-83b2-d7d196e11cbe/organization"

       },

       "restoreSessionEvents": {

         "href": "https://abc.tech.local:4443/v5/RestoreSessions/8caccbcb-3e6c-4e55-83b2-d7d196e11cbe/events"

       }

     }

    }