---
title: "createRestore"
method: POST
path: "/v2/distributors/accounts/{accountId}/recovery/restore"
tags: ["Restore & Download"]
---

# createRestore

`POST /v2/distributors/accounts/{accountId}/recovery/restore`

## Request

- Base URL: `https://api.cloudally.com`
- URL: `https://api.cloudally.com/v2/distributors/accounts/{accountId}/recovery/restore`
- Auth: none declared
- TypeScript: <https://skmtc.dev/cloudally/apis/cloudally-rest-api/docs/v2/distributors/accounts/:accountId/recovery/restore/post.ts> (a function with typed inputs; its response is checked against the schema)

Restore from a backup.

## Path parameters

- `accountId` string, required

## Request body

- RestoreDTO: Restore settings
  - `taskId` string, required: Backup task ID
  - `account` string, required: Account to restore
  - `source` 'GMAIL' | 'GDOC' | 'GDRIVETEAM' | 'SFC' | 'GOOGLEAPPS' | 'GCALENDAR' | 'GTASK' | 'GCONTACTS' | 'YMAIL' | 'GACCOUNTS' | 'GSITES' | 'SDB' | 'O365MAIL' | 'O365CONTACTS' | 'DDB' | 'MS365' | 'O365CALENDAR' | 'O365TASKS' | 'SHAREPOINT' | 'SHAREPOINT_MULTI' | 'ONEDRIVE' | 'IMAP' | 'BOX' | 'PUBLICWORDPRESS' | 'DROPBOX' | 'MS365GROUPS' | 'MS365GROUP_CONVERSATIONS' | 'MS365GROUP_CALENDAR' | 'MS365GROUP_SITE' | 'MS365GROUP_META' | 'O365NOTES' | 'MS365TEAM_CHANNELS' | 'MS365TEAM_APPS' | 'MSTEAMS' | 'MSGROUPS' | 'INTERNAL' | 'DYNAMICS365' | 'ENTRAID', required: Service to restore
  - `date` integer, required: Backup date
  - `includeDeleted` boolean: Include deleted items
  - `includeLegalHold` boolean: Include files with the legal hold
  - `extid` string: External id of entity (for multiple entities tasks)
  - `entities` TaskEntityDTO[]: for item level recovery
    - `entityId` string: Backup entity ID
    - `filename` string: File name
    - `backupDate` integer: Backup date
    - `folderid` string: Folder ID
    - `parentId` string: Parent ID
    - `isDeleted` string: is deleted
    - `entityType` 'FOLDER' | 'DOCUMENT' | 'QUERY' | 'MD_FOLDER' | 'MD_FILE' | 'SEMI_FOLDER': Entity type
    - `itemId` integer: Item ID
  - `accCred` string: Target account password
  - `targetDomain` string: Target domain name (SimpleDB or DynamoDB)
  - `targetRegion` 'US_EST' | 'US_EST_OHIO' | 'US_WEST_OREGON' | 'US_WEST_CAL' | 'EU' | 'EU_FRANKFURT' | 'ASIA_HONG_KONG' | 'ASIA_MUMBAI' | 'ASIA_SEOUL' | 'ASIA_SINGAPORE' | 'ASIA_SIDNEY' | 'ASIA_TOKYO' | 'SOUTH_AMERICA' | 'AFRICA_CAPE_TOWN' | 'ASIA_CHINA' | 'CANADA' | 'LONDON' | 'EU_PARIS' | 'EU_STOCKHOLM' | 'EU_ZURICH': Target domain region (SimpleDB or DynamoDB)
  - `targetAccount` string: Target account name
  - `endpointURI` string: For sharepoint/onedrive resotore
  - `inPlace` boolean: For sharepoint/onedrive restore (the new site will not be created)
  - `sandbox` boolean: For salesforce restore (define restore to sandbox or production system)
  - `includeMetadata` integer: For salesforce restore (define restore with md or not)
  - `startInactiveUsers` boolean: For salesforce restore. If this flag is true, we have to activate all inactive users and deactivate them in the last stage
  - `disableTriggers` boolean: For salesforce restore (define disable triggers or not)
  - `restoreOption` string: Restore option (define how to resolve conflict with existing data)
  - `destinationExtId` string: Destination External Id

## Response `200`

Successful retrieval of the information.

- RestoreOrDownloadResultDTO
  - `needRedirect` boolean: Redirect flag for OAuth authorization type
  - `redirectUrl` string: Redirect URL for OAuth authorization type
  - `showNotification` boolean: Notification flag
  - `notificationMessage` string: Message of notification

## Other responses

- `401`: The user is not logged in.
- `403`: The user does not have an access to view the account activity.

---

[API](https://skmtc.dev/cloudally/apis/cloudally-rest-api.md) - [All operations](https://skmtc.dev/cloudally/apis/cloudally-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudally/apis/cloudally-rest-api/revisions/97e3a3740b5b?raw)
