Skip to main content
Answer

Hidden API calls | GET Backupset Browse

  • March 3, 2021
  • 2 replies
  • 126 views

Forum|alt.badge.img+3

Hello,

I am currently working on a dedicated workflow to split the content of multiple subclients to have subclients with the same size.

 

 

To do that, I would like to perform a “Browse & Restore” on the backup set using API call to retrieve all the volume size and perform my distribution.

I’ve tried to find something like GET /Subclient/{{id}}/Browse?path=%5C call for backup sets but I found nothing.

I tried to perform a GET /Subclient/{{id}}/Browse?path=%5C but the returned status code is 400.

 

Maybe you will be able to give me a workaround or inform me about hidden API calls?

 

Thank you in advance for your answers.

Best answer by Yash

@JohnADP The call you’re trying to make is at subclient level. For Backupset level, please refer to this API:

 

https://api.commvault.com/#0c619151-3c40-44f6-b73e-d7a5b2f8e5dc

(Look for: Browse - Backupset Level on the right column drop down)

 

Here is an example to browse at backup set level on D drive:

POST {{ServerUrl}}/DoBrowse

{
"opType": 0,
"queries": [
{
"type": 1,
"queryId": "countQuery",
"aggrParam": {
"field": 0,
"aggrType": 4
}
},
{
"type": 0,
"queryId": "dataQuery",
"dataParam": {
"sortParam": {
"ascending": true,
"sortBy": [
38,
0
]
},
"paging": {
"firstNode": 0,
"pageSize": 15,
"skipNode": 0
}
}
}
],
"mode": {
"mode": 2
},
"paths": [
{
"path": "D:\\"
}
],
"options": {
"showDeletedFiles": true,
"restoreIndex": true
},
"entity": {
"applicationId": 33,
"backupsetId": 3,
"instanceId": 1,
"clientId": 2
}
}

 

2 replies

Forum|alt.badge.img+4
  • Vaulter
  • Answer
  • March 3, 2021

@JohnADP The call you’re trying to make is at subclient level. For Backupset level, please refer to this API:

 

https://api.commvault.com/#0c619151-3c40-44f6-b73e-d7a5b2f8e5dc

(Look for: Browse - Backupset Level on the right column drop down)

 

Here is an example to browse at backup set level on D drive:

POST {{ServerUrl}}/DoBrowse

{
"opType": 0,
"queries": [
{
"type": 1,
"queryId": "countQuery",
"aggrParam": {
"field": 0,
"aggrType": 4
}
},
{
"type": 0,
"queryId": "dataQuery",
"dataParam": {
"sortParam": {
"ascending": true,
"sortBy": [
38,
0
]
},
"paging": {
"firstNode": 0,
"pageSize": 15,
"skipNode": 0
}
}
}
],
"mode": {
"mode": 2
},
"paths": [
{
"path": "D:\\"
}
],
"options": {
"showDeletedFiles": true,
"restoreIndex": true
},
"entity": {
"applicationId": 33,
"backupsetId": 3,
"instanceId": 1,
"clientId": 2
}
}

 


Forum|alt.badge.img+3
  • Author
  • Byte
  • March 5, 2021

Hello Yash,

Thank you for your answer, it worked just as you said!