解决了

sort_attribute使用

  • 2019年6月1日
  • 2回复
  • 2396观

我正在探索API,并注意到用于列出操作(特别是/虚拟机/列表操作)支持提供排序参数。我无法在请求中找到有关sort_attribute键的适当值的任何信息。有没有人用过这个,可以为我揭示一些光线?

谢谢
图标

最好的答案nogodan1234.2019年9月4日,09:46

\n\"https:\/\/\"Prism_Element_VIP\":9440\/PrismGateway\/services\/rest\/v1\/vms\/?sortCriteria=vmName
\n
\nAlso you can find other detail from below API guide
\nhttps:\/\/portal.nutanix.com\/#\/page\/docs\/details?targetId=API-Ref-AOS-v510:man-rest-api-v1-u.html<\/a>
\n
\nCtrl+F \"sortCriteria\"
\n
\nHope this clear your question","className":"post__content__best_answer"}">
查看原版

2回复

徽章 +1
我发现的唯一引用表明它是“执行排序的属性”。我使用sort_atribute“vm_name”测试了这一点,我通过VM名称获得了一个排序的列表。但是,当我尝试sort_attributes“num_sockets”时,或“memory_size_mib”或“memory_size_bytes”未排序列表。我与Nutanix'新的API总监谈过.NEXT,他很快就承诺了更好的文件。我肯定希望如此。
您可以指定如下所示的排序属性
“https://”prism_element_vip“:9440 / prismgateway / services / rest / v1 / vms /?sortcriteria = vmname

此外,您还可以从下面的API指南中找到其他详细信息
https://portal.nutanix.com/#/page/docs/details?targetid=api-ref-aos-v510:man-rest-api-v1-u.html.

Ctrl + F“SortCriteria”

希望这清楚你的问题

回复


Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu