# Retrieve the list of groups associated with a fence policy returns list of groups associated ## Endpoints GET `/api/v1/mdm/compliance/{compliance_id}/groups` ## Request URL `https://{server-hostname}:8383/api/v1/mdm/compliance/{compliance_id}/groups` ## Scope `MDMInventory.READ` ## Header `Authorization: d92d4xxxxxxxxxxxxx15f52` ## Request Parameters ### Request Headers - **Accept** (string, Mandatory): `application/json` ### Path Parameters - **compliance_id** (string, Mandatory): Unique identifier of the compliance policy. Obtain from the [Add Fence Policy](https://www.manageengine.com/products/desktop-central/help/api/onpremise/geofencing_addfencepolicy.html) or [Get Fence Policies](https://www.manageengine.com/products/desktop-central/help/api/onpremise/geofencing_getfencepolicydetails.html) response. ### Query Parameters - **group_type** (string, Optional): Filter groups by type. Allowed values: 1=Static, 2=Dynamic, 3=Static Unique - **search** (string, Optional): Free-text search string applied to the default searchable fields of the resource - **select_all** (boolean, Optional): When true, applies the operation to every record matching the current filter rather than to specific IDs. Default: false - **group_category** (string, Optional): Filter groups by category. Allowed values: 1=Device Group, 2=User Group, 3=Custom Group ## Sample Request ```curl curl --request GET \ --url 'https://appdomain/api/v1/mdm/compliance/{compliance_id}/groups?group_type=SOME_STRING_VALUE&search=SOME_STRING_VALUE&select_all=SOME_BOOLEAN_VALUE&group_category=SOME_STRING_VALUE' \ --header 'Accept: application/json' \ --header 'Authorization: d92d4xxxxxxxxxxxxx15f52' ``` ## Response Parameters ### HTTP Code 200 #### Response Body — application/json - JSON Object - **group_list** (JSON Array): Array of group information objects associated with the compliance policy ### Possible Response Codes - **200** — HTTP code ## Sample Response: HTTP 200 Fence policy associated with multiple groups showing group details and member counts ```json { "group_list": [ { "group_id": 9007199254741084, "group_name": "ComplianceGroup", "group_type": 6, "member_count": 1 }, { "group_id": 9007199254741086, "group_name": "Engineering Devices", "group_type": 6, "member_count": 12 } ] } ``` No groups associated with the specified fence policy ```json { "group_list": [] } ``` ![](https://www.zohowebstatic.com/sites/zweb/images/people/ico-help.png) **Duration:** 1 minute | **Threshold:** 120 | **Lock period:** 5 minutes Duration - Time window for the threshold. Threshold - Number of API calls allowed within the specified duration. Lock Period - Wait time before consecutive API requests.