List all Vms to get all informations to restore it by API

Last post 05-04-2018, 3:52 AM by ozonne94. 1 replies.
Sort Posts: Previous Next
  • List all Vms to get all informations to restore it by API
    Posted: 04-24-2018, 10:04 AM

    Hi,

    I am trying to browse all Vms by API to obtain all informations, after that i want to run the POST restore API to restore a VM.

     

    My vcenter inventory tree is : 

    Datacenter       GlobalDC

     folder                    Templates

    folder     Prod

    folder     Dev

    i am trying to list all VMs in folder Prod

    when I lauch this in postman,

    {{ServerUrl}}/VMBrowse?PseudoClientId=5

    the result is :

    {
    "inventoryInfo": [
    {
    "name": "Hosts",
    "templateVM": false,
    "type": 0,
    "strGUID": "",
    "poweredOff": true
    },
    {
    "name": "VMs",
    "templateVM": false,
    "type": 0,
    "strGUID": "",
    "poweredOff": true
    },
    {
    "name": "Datastores",
    "templateVM": false,
    "type": 0,
    "strGUID": "",
    "poweredOff": true
    }

     I have tested some query based on the commvault documentation and no chance :)

    for examples :

    {{ServerUrl}}/VMBrowse?PseudoClientId=5&inventoryPath=%5Cnone%3AVMs

    result is :

     

    {
    "inventoryInfo": [
    {
    "name": "GlobalDC",
    "templateVM": false,
    "type": 4,
    "strGUID": "datacenter-2",
    "poweredOff": true
    }
    ]
    }

    the strange thing is that GlobalDC is the name of the Datacenter :)

     

    Thanks for your help

     

     

  • Re: List all Vms to get all informations to restore it by API
    Posted: 05-04-2018, 3:52 AM

    Hello,

    now I can browse my root inventory and obtain all VMs and folders in postman.

    I have removed the encoding.

    it doesn't help me to achieve the goal > from VRA portal I need to obtain all backup and subclient for a particular VM.

    I need that the customer restore his VM when he wants.

     

     

    From the Commvault GUI, I can right click on a VM under the vCenter, apply a filter, select a Job associated to this VM, right click on the job, restore the VM in place or overwrite.

     

    I have opened a case because I have not found any API call to do that.

     

    any help would be appreciated 

     

    method POST :

    {{ServerUrl}}/VMBrowse?PseudoClientId=5&inventoryPath=\none:VMs\DATACENTER:GlobalDC

     

    {
    "inventoryInfo": [
    {
    "name": "Discovered virtual machine",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v9",
    "poweredOff": true
    },
    {
    "name": "Global",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v44",
    "poweredOff": true
    },
    {
    "name": "KUBERNETES",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v1290",
    "poweredOff": true
    },
    {
    "name": "NSX Env",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v184",
    "poweredOff": true
    },
    {
    "name": "Templates",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v35",
    "poweredOff": true
    },
    {
    "name": "VMs",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v2261",
    "poweredOff": true
    },
    {
    "name": "VMwareViewComposerReplicaFolder",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v210",
    "poweredOff": true
    },
    {
    "name": "VRA%2fVRO",
    "templateVM": false,
    "type": 5,
    "strGUID": "group-v2060",
    "poweredOff": true
    },
    {
    "name": "testvmlbp",
    "templateVM": false,
    "type": 9,
    "strGUID": "503585af-2a09-65cd-f2f7-d79bea9d0ac7",
    "poweredOff": true
    },
    {
    "name": "ubuntu01",
    "templateVM": false,
    "type": 9,
    "strGUID": "5035f1fa-5731-f595-e962-988b0a55bae6",
    "poweredOff": false
    }
    ]
    }
The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2018 Commvault | All Rights Reserved. | Legal | Privacy Policy