---
title: "Get rules"
method: GET
path: "/sites/{site_id}/rules"
tags: ["Rules"]
---

# Get rules

`GET /sites/{site_id}/rules`

## Request

- Base URL: `https://api.sitehive.co` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sitehive.co/sites/{site_id}/rules`
- Auth: HTTP bearer

Returns a list of all rules for a given site available to the authenticated user.

## Path parameters

- `site_id` string, required

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

Default Response

- object
  - `data` Def7[], required
    - `id` string, required: Unique identifier for the rule.
    - `name` string, required: The name or title of the rule.
    - `aspect` string, required: The aspect of the rule, e.g., 'Noise'.
    - `startDate` string, date-time, required: ISO 8601 UTC timestamp indicating when the rule became active.
    - `endDate` string, date-time, required: ISO 8601 UTC timestamp indicating when the rule ended or was deactivated. Null if still active.
  - `pagination` Def5, required: Basic pagination information for a list response.
    - `offset` integer, required: The starting index of the returned items in the full dataset.
    - `limit` integer, required: Maximum number of items returned in this response.
    - `hasNext` boolean, required: True if another page is available, false on the last page.

## Other responses

- `401`: Returned when a request attempts to access a protected resource without providing authentication credentials.
- `403`: Returned when an authenticated request is denied due to insufficient permissions or access rights.

---

[API](https://skmtc.dev/sitehive/apis/sitehive-public-api.md) - [All operations](https://skmtc.dev/sitehive/apis/sitehive-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sitehive/apis/sitehive-public-api/revisions/a547c1378f9b?raw)
