问题
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