Solved

Get efficiency state for VMs using API

  • 18 April 2024
  • 2 replies
  • 50 views

Is there a way to fetch the efficiency state for VMs (Bully, Over Provisioned, Constrained, Inactive VM, Good) using API requests?"

icon

Best answer by Ahmed_Elyacoubi 25 April 2024, 10:45

View original

This topic has been closed for comments

2 replies

Userlevel 1
Badge +3

Hi

Didn’t find anything, the closest information we could retrieve is using this API call https://www.nutanix.dev/api_reference/apis/prism_v3.html#tag/vms/paths/~1vms~1list/post

this works:

get https://pc_ip:9440/api/nutanix/v3/groups

body: 

{

    "entity_type": "mh_vm",

    "query_name": "eb:data:Efficiency-1713467304436",

    "grouping_attribute": " ",

    "group_count": 3,

    "group_offset": 0,

    "group_member_count": 120,

    "group_member_sort_attribute": "vm_name",

    "group_member_sort_order": "ASCENDING",

    "group_member_attributes": [

        {

            "attribute": "vm_name"

        },

        {

            "attribute": "capacity.vm_efficiency_status"

        }

    ],

 

    "filter_criteria": "(platform_type!=aws,platform_type==[no_val]);is_cvm==0;feature_name==VM_INEFFICIENCY_DETECTION"

}