'How to Create a new folder in vcenter using rest api

Can anyone help me to provide right API to create a New folder in vcenter

Thanks, Benji

I can see only get API to list folders in vmware api document, unable to find any create folder API



Solution 1:[1]

Unfortunately that functionality doesn't yet exist in the vSphere Automation (REST) API. It can be done through the vSphere Management (SOAP) API though. There's a CreateFolder method that can be found when interacting with the Folder managed object: Link to Docs

Solution 2:[2]

You can use powerCLI to create a VM/Template folder

https://vdc-repo.vmware.com/vmwb-repository/dcr-public/6bd6daa3-08a8-4660-9159-23265b9d6c00/4d533cf0-f009-4fa0-8679-8d505fbe846b/doc/New-Folder.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kyle Ruddy
Solution 2 JMHerrer