---
title: "Get rule by ID"
type: reference
method: GET
path: /rest-api/rule/{ruleId}.do
tag: "Targeting Rules"
---

# Get rule by ID

`GET https://YOUR-NETWORK-DOMAIN/rest-api/rule/{ruleId}.do`

Returns the full details of a single targeting rule identified by its numeric ID. The response JSON object includes the rule's name, type (CAMPAIGN or INVENTORY), active status, default-for flags, and a ruleMatches array containing each match's categories, labels, operator, and include/exclude flag. Requires authentication and VIEW permission on the RULES static ACL identity.

## Path params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `ruleId` | integer | yes | `200` | The unique numeric identifier of the rule to retrieve |

## Responses

- `200` — Successfully retrieved rule
- `400` — Bad request — invalid or missing parameters
- `401` — Unauthorized - authentication error
- `403` — Forbidden - insufficient permissions
- `404` — Rule not found

## Example request

```bash
curl --request GET \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/rule/200.do' \
  --header 'X-Api-Key: YOUR_API_KEY'
```

Source: https://epom.com/ad-server/docs/api/targeting-rules/get-rule