Hi @Keith K v3 APIs filter follows FIQL syntax. example to filter out a VM with name and cluster UUID in /vms/list API can be done using:
"filter": "vm_name==MYSQL.*;cluster=in=<cluster uuid>",
Here is a post where there is an example on how to use Filter syntax for /vms/list API .
https://next.nutanix.com/api-31/filter-alerts-via-api-from-prism-central-37704
For alerts too, it works the same as above. We don’t have any documentation as such. Below is an example of how to use this :
{
"entity_type": "alert",
"query_name": "eb:data-1591856320500",
"grouping_attribute": "",
"group_count": 3,
"group_offset": 0,
"group_attributes": [],
"group_member_count": 40,
"group_member_offset": 0,
"group_member_sort_attribute": "_created_timestamp_usecs_",
"group_member_sort_order": "DESCENDING",
"group_member_attributes": [{
"attribute": "title"
}, {
"attribute": "source_entity_name"
}, {
"attribute": "primary_impact_type"
}, {
"attribute": "severity"
}, {
"attribute": "status"
}, {
"attribute": "_created_timestamp_usecs_"
}, {
"attribute": "last_occurred_timestamp_usecs"
}, {
"attribute": "cluster"
}, {
"attribute": "default_message"
}, {
"attribute": "param_name_list"
}, {
"attribute": "param_value_list"
}, {
"attribute": "auto_resolved"
}, {
"attribute": "acknowledged"
}, {
"attribute": "acknowledging_user"
}, {
"attribute": "acknowledged_timestamp_usecs"
}, {
"attribute": "resolved"
}, {
"attribute": "resolving_user"
}, {
"attribute": "resolved_timestamp_usecs"
}, {
"attribute": "source_entity_uuid"
}, {
"attribute": "source_entity_type"
}, {
"attribute": "impact_type"
}],
"filter_criteria": "(severity==critical,severity==warning);primary_impact_type==Availability;resolved==false"
}
Request URL:https://<PC_IP>:9440/api/nutanix/v3/groups
Request Method: POST
Filters have known issue with v3 APIs, they say it is not supported but few things work.