SoftLayer API how to filter MetricDataTypes

懵懂的女人 提交于 2020-01-26 03:51:06

问题


Can I filter metric data types?

I am retrieving datatypes with keynames CPU0, CPU1, etc up to CPU256, plus some other datatypes. I would like a filter to retrieve only the datatypes that do not start with CPU. I tried the filter below but all objects were still retrieved:

https://api.softlayer.com/rest/v3/SoftLayer_Metric_Tracking_Object/<objectId>/getMetricDataTypes?objectFilter=objectFilter=objectFilter={"metricDataTypes":{"keyName":{"operation":"!*= CPU"}}}

回答1:


Unfortunately, it's not possible to filter MetricDataTypes, because this datatype: SoftLayer_Container_Metric_Data_Type doesn't have any relation property like id

I recommend to use a programming language and filter in the code, to see programming languages supported by SoftLayer:

http://sldn.softlayer.com/



来源:https://stackoverflow.com/questions/42146029/softlayer-api-how-to-filter-metricdatatypes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!