查询以获取服务器列表
Query to get list of servers
我正在尝试获取特定数据中心和特定域中的服务器列表。
我也试过这个 objectFilter 查询:
{"hardware":{"datacenter":{"name":{"operation":"fra02"}}},"domain":
{"operation":"imzcloud.ibmammsap.local"}}
https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getHardware?objectFilter={%22hardware%22:{%22datacenter%22:{%22name%22:{%22operation%22:%22fra02%22}}},%22domain%22:{%22operation%22:%22=imzcloud.ibmammsap.local%22}}
查询应该 return 仅 fra02
中的裸机服务器和域,但它 return 站点上的所有服务器。域过滤器似乎不起作用
尝试使用以下示例:
https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getHardware?objectMask=mask[datacenter]&objectFilter={"hardware": {"datacenter":{"name": {"operation": "fra02"}},"domain": {"operation": "imzcloud.ibmammsap.local" }}}
您可以更改域和数据中心名称以从其他数据中心获取硬件
我正在尝试获取特定数据中心和特定域中的服务器列表。
我也试过这个 objectFilter 查询:
{"hardware":{"datacenter":{"name":{"operation":"fra02"}}},"domain":
{"operation":"imzcloud.ibmammsap.local"}}
https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getHardware?objectFilter={%22hardware%22:{%22datacenter%22:{%22name%22:{%22operation%22:%22fra02%22}}},%22domain%22:{%22operation%22:%22=imzcloud.ibmammsap.local%22}}
查询应该 return 仅 fra02
中的裸机服务器和域,但它 return 站点上的所有服务器。域过滤器似乎不起作用
尝试使用以下示例:
https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getHardware?objectMask=mask[datacenter]&objectFilter={"hardware": {"datacenter":{"name": {"operation": "fra02"}},"domain": {"operation": "imzcloud.ibmammsap.local" }}}
您可以更改域和数据中心名称以从其他数据中心获取硬件