# 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://`[{serverurl}](https://www.manageengine.com/mobile-device-management/help/api/cloud/oauth-authentication-endpoint-domain.html)`/api/v1/mdm/compliance/{compliance_id}/groups` ## Scope `MDMOnDemand.MDMInventory.READ` ## Header `Authorization: Zoho-oauthtoken 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/mobile-device-management/help/api/cloud/geofencing-add-fence-policy.html) or [Get Fence Policies](https://www.manageengine.com/mobile-device-management/help/api/cloud/geofencing-get-fence-policy-details.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 - **group_category** (`string`, Optional): Filter groups by category. Allowed values: `1=Device Group`, `2=User Group`, `3=Custom Group` - **select_all** (`boolean`, Optional): When true, applies the operation to every record matching the current filter rather than to specific IDs. Default: `false` ## Sample Request ```bash curl --request GET \ --url https://appdomain/api/v1/mdm/compliance/{compliance_id}/groups \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 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": [] } ``` ## Rate Limit ![](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.