[{"label":"Latest (6.4.0)","version":"latest"}]
vrealize-network-insight-api

Group Search Results

Description

Using groupby search API you can group search results for vRealize Network Insight entities by specifying entity type, filter expression, aggregate clause and groupby clause. Please refer to API Guide on details of how to construct filter expression, aggregate clause and groupby clause. A successful search request will return a list of groups.

Request

Request

URL

URL


post
https://vrni.example.com/api/ni/search/groupby
Copy

Request Body

Request Body

SearchGroupByRequest of type(s) application/json Optional

GroupBy Request

{
    "aggregations": [
        {
            "aggregation_type": "SUM",
            "field": "flow.totalBytes.delta.summation.bytes"
        }
    ],
    "entity_type": "Flow",
    "filter": "destination_ip.ip_address = '1.1.1.1'",
    "group_by": [
        "source_ip",
        "destination_ip"
    ],
    "size": 2,
    "sort_by": [
        {
            "aggregation_type": "SUM",
            "field": "flow.totalBytes.delta.summation.bytes",
            "order": "DESC"
        }
    ],
    "time_range": {
        "end_time": 1534410559,
        "start_time": 1534410000
    }
}
array of Aggregation
aggregations Optional

string
cursor Optional

entity_type Optional

Possible values are: GroupBaseSecurityGroupBaseEventBaseVirtualMachineBaseFirewallRuleBaseFirewallSectionBaseIPSetBaseL2NetworkBaseFirewallBaseServiceBaseServiceGroupBaseVnicVirtualMachineEC2InstanceHostVnicVmknicVxlanLayer2NetworkVlanL2NetworkClusterSecurityTagResourcePoolNSXIPSetNSXTIPSetEC2IPSetNSXSecurityGroupNSGroupNSXPolicyGroupEC2SecurityGroupFlowProblemEventApplicationTierIPEndpointNSXFirewallRuleEC2SGFirewallRuleNSXRedirectRuleVCenterManagerNSXVManagerNSXTManagerNSXPolicyManagerCheckpointManagerCheckpointMDSManagerBaseManagerBaseFirewallManagerBaseNSXManagerNSXServiceEC2ServiceNSServiceVPCCloudNetworkAzureVMAzureNSGAzureASGAzureNSGRuleNSXDistributedFirewallEC2FirewallNSXServiceGroupNSServiceGroupDistributedVirtualSwitchDistributedVirtualPortgroupVCDatacenterDatastoreFolderNSXTFirewallRuleNSXTFirewallPolicyManagerFirewallRulePolicyManagerFirewallBaseGenericFirewallBaseGenericFirewallRuleCheckpointFirewallCheckpointFirewallRuleUserDefinedSubnetKubernetesServiceUserDefinedProblemEventFirewallRuleMaskEventEdgeDeviceRouterDeviceNSXControllerLogicalRouterNSXTManagementNodeNSXTControllerNSXTTransportNodeNSXTTransportZoneNSXTLoadBalancerNSXTVirtualServerNSXTServerPoolNSXTLogicalSwitchNSXTRouterDeviceNSXTEdgeClusterNSXControllerClusterAzureSubscriptionAWSAccountManagerHcxDataSourceVMCSDDCVMCCapacityThresholdBreachEventPolicyManagerSegmentPolicyManagerFirewallSectionDirectConnectInterface


string
filter Optional

query filter


array of string
group_by Optional

integer as int32
size Optional

sort_by Optional

time_range Optional
Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

Response Body

Response Body

200 OK

Returns SearchGroupByResponse of type(s) application/json
{
    "cursor": "MTA=",
    "total_count": 1000
}
string
cursor Optional

Cursor for the next page


array of GroupWithValue
results Optional

integer as int32
size Optional

time_range Optional

total_bucket Optional

integer as int32
total_count Optional

Total count of objects returned

Errors

Errors

400

Bad Request


401

Unauthorized


500

Internal Error

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"aggregations":[{"aggregation_type":"SUM","field":"flow.totalBytes.delta.summation.bytes"}],"entity_type":"Flow","filter":"destination_ip.ip_address = '1.1.1.1'","group_by":["source_ip","destination_ip"],"size":2,"sort_by":[{"aggregation_type":"SUM","field":"flow.totalBytes.delta.summation.bytes","order":"DESC"}],"time_range":{"end_time":1534410559,"start_time":1534410000}}' https://vrni.example.com/api/ni/search/groupby


[{"label":"Latest (6.4.0)","version":"latest"}]
vrealize-network-insight-api
Feedback

Was this page helpful?