request - 使用邮递员请求按文件夹恢复 Vsphere VM?
问题描述
我尝试使用邮递员的请求按文件夹恢复每个 VM。
通过这个请求,我可以列出我的 vsphere 中的每个文件夹:
GET https://SERVER/rest/vcenter/folder
使用第二个命令,我可以在我的 vpshere 中列出每个 VM:
GET https://SERVER/rest/vcenter/vm
我想知道是否有办法获取文件夹和其中的每个 VMS?
就像是 :
GET https://SERVER/rest/vcenter/folder/my_folder
输出如下:
"value": [
{
"folder": "XXX",
"VMs" : {
VM1
VM2
...
或者类似的东西?
非常感谢 !
解决方案
&filter.parent_folders.1=obj-103
它支持查询参数 parent_folders ,所以 url 就像
GET https://SERVER/rest/vcenter/folder?filters.filter.parent_folders.1=obj-103
甚至 VM 也支持名为文件夹的过滤器:
推荐阅读
- image - Python - 从网站子目录下载图像(?)
- amazon-web-services - 在构建“--use container”时更改 aws sam 中使用的 maven
- mysql - 如何使用 REFERENCED_TABLE_NAME 使此 SQL 在 H2 中工作
- java - 格式化前几年的 ZonedDateTime
- java - SprinBoot JpaRepository findByEmail 不工作
- javascript - 如何将包含嵌入对象的字符串转换为对象类型?
- c++ - std::bind 与成员函数和 c++ 中的 this
- javascript - JQUERY 自动完成不显示从 php 脚本返回的结果
- python - AWS MSK,在配置中 auto.create.topics.enable=true 但不起作用
- vb.net - 接口新手尝试使用VB.NET接口和类创建Plugin系统