---
title: "Rule definitions (read)"
method: GET
path: "/api/rule-definitions"
tags: ["Rules"]
---

# Rule definitions (read)

`GET /api/rule-definitions`

## Request

- Base URL: `https://api.kiloiot.io`
- URL: `https://api.kiloiot.io/api/rule-definitions`
- Auth: API key in header `X-API-Key` and API key in header `X-Organization-Id`

List, get, and query rule definitions. Endpoints: GET /api/rule-definitions (list), GET /api/rule-definitions/{id} (get by ID), GET /api/rule-definitions/deleted (list trashed), GET /api/rule-definitions/{id}/versions (list versions), GET /api/rule-definitions/{id}/builds (list builds).

**Required scope:** `rules:read`

## Query parameters

- `organizationId` string, required
- `page` integer
- `limit` integer

## Response `200`

OK

- object
  - `items` object[]
    - `id` string
    - `name` string
    - `description` string
    - `organizationId` string
    - `authorId` string
    - `version` integer
    - `status` string
    - `lockedByUserId` string
    - `createdAt` string
    - `updatedAt` string
  - `total` integer
  - `page` integer
  - `limit` integer

## Other responses

- `401`: Missing or invalid API key
- `403`: Insufficient permissions (missing required scope)

---

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