Device Group Filter

Overview

You can filter a device group using the BIG-IQ API and standard Open Data Protocol (OData) format.

REST Endpoint: /mgmt/shared/resolver/device-groups

POST to filter device group

The following example defines a filtered device group which is a subset of the cm-bigip-allBigIpDevices group. The filter is specified by using an OData query and by sending a POST request to the device-groups endpoint.

POST https://192.0.2.0/mgmt/shared/resolver/device-groups

The field deviceFilter contains the OData query. In this example, the ‘bigip*’ is a placeholder representing what a user would enter in the UI, and the remainder of the string is what would be filled in by the UI automatically. If the user needs to create a more complex filter, the entire OData query can be replaced.

The JSON in the body of the POST request can look similar to the following.

{
    "isViewGroup": true,
    "deviceFilter": "(((machineId eq '') and (machineId ne 'e4a99a89-673d-472c-9571-9e823f685324')) and (product ne 'BIG-IQ')) and (allContent eq 'bigip*')",
    "displayName": "myDeviceGroup",
    "parentGroupReference": {
            "link": "https://localhost/mgmt/shared/resolver/device-groups/cm-bigip-allBigIpDevices"
    },
    "properties": {
            "cm:gui:module": [
                    "adc",
                    "device",
                    "networksecurity",
                    "asmsecurity",
                    "websafesecurity"
            ]
    },
    "groupName": "asfasdf"
}

Response

HTTP/1.1 200 OK

The JSON in the response to the POST can look similar to the body of the POST.