---
title: "Get preset IP ranges by group"
type: reference
method: GET
path: /rest-api/preset-ip-ranges/ip-range/all-by-group.do
tag: "Targeting Rules"
---

# Get preset IP ranges by group

`GET https://YOUR-NETWORK-DOMAIN/rest-api/preset-ip-ranges/ip-range/all-by-group.do`

Returns all IP range entries belonging to the specified preset IP ranges group. The response is a JSON array of IP range objects each containing an id, from IP, and to IP. The group must exist or a 404 error is returned. Requires PRESET_DOMAIN_GROUP_MANAGEMENT permission.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `groupId` | integer | yes | `100` | Unique numeric ID of the preset IP ranges group to retrieve IP ranges for |

## Responses

- `200` — Success
- `400` — Missing required parameter
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Preset group not found
- `500` — Internal server error

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/preset-ip-ranges/ip-range/all-by-group.do?groupId=100' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/get-preset-ip-ranges-ip-range-all-by-group