Loading...

REST API - Sample Scenario: Download Using the Recall API

Using Commvault REST APIs, you can initiate a download of file system data obtained through a backup.

Prerequisites

  • Review the GET Recall API.
  • Request an authentication token using the POST Login API.
  • Complete the steps in the Browse Using a Session ID scenario. You need values from the following APIs:
    • POST Client List API:

      subclientId attribute in the <subClient> element

    • POST Browse API:

      path attribute in the <dataResultSet> element

      archhiveFileId attribute in the <advancedData> element

      offset attribute in the <advancedData> element

      commcellNumber attribute in the <browseAdvancedConfigResp> element

Building and Encoding the Request Parameters

Values are combined and encoded to form the request parameters for the GET Recall API, for example: Recall?at=33&si=Mjo3MjEwOTA6MDoxOjY1NDUyMzY3&op=XEM6XFNhbXBsZSBCYWNrdXBcRWRnZSBEYXRhIFByb3RlY3Rpb24ubXA0&appId=2&ec=1

The following are the required request parameters:

  • at - The application type parameter. For file system downloads, this value is 33, for example, at=33.
  • si - The stub information parameter. This parameter is built and encoded as follows:
    1. Build the si parameter from the following information, in the order shown:
      • stubVersion: For file system downloads, this value is 2.
      • commcellNumber: Use the POST Browse API to retrieve this value.
      • groupNumber: For file system downloads, this value is 0.
      • archiveFileId: Use the POST Browse API to retrieve this value.
      • offset: Use the POST Browse API to retrieve this value.
    2. Separate the values with colons, for example: 2:721090:0:1:65452367.
    3. Encode the entire string using Base64 encoding, for example, si=Mjo3MjEwOTA6MDoxOjY1NDUyMzY3.
  • op - The original path parameter. Use the POST Browse API to retrieve this value from the path attribute and then encode the entire string using Base64 encoding, for example, op=XEM6XFNhbXBsZSBCYWNrdXBcRWRnZSBEYXRhIFByb3RlY3Rpb24ubXA0.
  • appId - The subclient ID parameter. Use the POST Client List API to retrieve this value from the subclientId attribute, for example, appId=2.
  • ec - The type of encoding to use. This value is always 1, for example, ec=1.

Downloading the File

To return the contents of the file, send a GET Recall request with the required request parameters. For information about the request parameters, see Building and Encoding the Request Parameters.

For example:

GET SearchSvc/CVWebService.svc/Recall?at=33&si=Mjo3MjEwOTA6MDoxOjY1NDUyMzY3&op=XEM6XFNhbXBsZSBCYWNrdXBcRWRnZSBEYXRhIFByb3RlY3Rpb24ubXA0&appId=2&ec=1 HTTP/1.1
Host: client.mydomain.com
Authtoken: QSDK 38568012f4d1e8ee1841d283a47aa3ba78e124ea58354b5fc6
0f4dab8a63347d05cf5552484dafda3bfa4c5db84e580b1cb37bcf8e65b39f7f
8549a443e6f78a2c7be3f31b3d845e24776c835e498e8e883bb40c46bd15af4f
40ca94e823acedcdd4e9659e74b34a07a85c4586cd2ed914b6dce015874783ef7
68fda78183a4208930954a377f66eb56c8b92cexampl4s437a19317ca6ce7f323
3d5a01aca35dbad93468b833f2cf71010809006a937670adce711ca8be46638e8

 

Last modified: 1/9/2018 9:15:49 PM