---
title: "List Rules"
method: GET
path: "/rules"
tags: ["Rules"]
---

# List Rules

`GET /rules`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/rules`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `r:rules:*`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/rules/get.ts> (a function with typed inputs; its response is checked against the schema)

Return a list of Rules contained in a specified location.

## Query parameters

- `locationId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required
- `includeAllParents` string
- `max` integer
- `offset` integer

## Response `200`

A paginated list of Rules.

- PagedRules: An array of Rules
  - `items` Rule[]
    - `name` string, required: The name for the Rule. Limit 100 characters.
    - `actions` Action[], required
      - `if` IfAction
        - `and` Condition[]
          - `and` Condition[]
          - `or` Condition[]
          - `not` Condition (recursive)
          - `equals` EqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThan` GreaterThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThanOrEquals` GreaterThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThan` LessThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThanOrEquals` LessThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `between` BetweenCondition
            - `value` Operand, required
              - …
            - `start` Operand, required
              - …
            - `end` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `operand` Operand
              - …
          - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `operand` Operand
              - …
            - `duration` Interval, required
              - …
            - `latching` boolean: Determines whether the condition should return true in subsequent executions after initially satisfied. Default is false.
          - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `duration` Interval, required
              - …
            - `operand` Operand
              - …
        - `or` Condition[]
          - `and` Condition[]
          - `or` Condition[]
          - `not` Condition (recursive)
          - `equals` EqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThan` GreaterThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThanOrEquals` GreaterThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThan` LessThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThanOrEquals` LessThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `between` BetweenCondition
            - `value` Operand, required
              - …
            - `start` Operand, required
              - …
            - `end` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `operand` Operand
              - …
          - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `operand` Operand
              - …
            - `duration` Interval, required
              - …
            - `latching` boolean: Determines whether the condition should return true in subsequent executions after initially satisfied. Default is false.
          - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `duration` Interval, required
              - …
            - `operand` Operand
              - …
        - `not` Condition
          - `and` Condition[]
          - `or` Condition[]
          - `not` Condition (recursive)
          - `equals` EqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThan` GreaterThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThanOrEquals` GreaterThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThan` LessThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThanOrEquals` LessThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `between` BetweenCondition
            - `value` Operand, required
              - …
            - `start` Operand, required
              - …
            - `end` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `operand` Operand
              - …
          - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `operand` Operand
              - …
            - `duration` Interval, required
              - …
            - `latching` boolean: Determines whether the condition should return true in subsequent executions after initially satisfied. Default is false.
          - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
            - `duration` Interval, required
              - …
            - `operand` Operand
              - …
        - `equals` EqualsCondition
          - `left` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `right` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `aggregation` 'Any' | 'All'
          - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
        - `greaterThan` GreaterThanCondition
          - `left` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `right` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `aggregation` 'Any' | 'All'
          - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
        - `greaterThanOrEquals` GreaterThanOrEqualsCondition
          - `left` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `right` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `aggregation` 'Any' | 'All'
          - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
        - `lessThan` LessThanCondition
          - `left` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `right` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `aggregation` 'Any' | 'All'
          - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
        - `lessThanOrEquals` LessThanOrEqualsCondition
          - `left` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `right` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `aggregation` 'Any' | 'All'
          - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
        - `between` BetweenCondition
          - `value` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `start` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `end` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `aggregation` 'Any' | 'All'
          - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
        - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
          - `and` Condition[]
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition (recursive)
            - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
              - …
            - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
              - …
          - `or` Condition[]
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition (recursive)
            - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
              - …
            - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
              - …
          - `not` Condition
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition (recursive)
            - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
              - …
            - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
              - …
          - `equals` EqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThan` GreaterThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThanOrEquals` GreaterThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThan` LessThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThanOrEquals` LessThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `between` BetweenCondition
            - `value` Operand, required
              - …
            - `start` Operand, required
              - …
            - `end` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
          - `operand` Operand
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
        - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
          - `and` Condition[]
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
              - …
            - `remains` RemainsCondition (recursive)
            - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
              - …
          - `or` Condition[]
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
              - …
            - `remains` RemainsCondition (recursive)
            - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
              - …
          - `not` Condition
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
              - …
            - `remains` RemainsCondition (recursive)
            - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
              - …
          - `equals` EqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThan` GreaterThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThanOrEquals` GreaterThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThan` LessThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThanOrEquals` LessThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `between` BetweenCondition
            - `value` Operand, required
              - …
            - `start` Operand, required
              - …
            - `end` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
          - `operand` Operand
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `duration` Interval, required
            - `value` Operand, required
              - …
            - `unit` 'Second' | 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month' | 'Year', required
          - `latching` boolean: Determines whether the condition should return true in subsequent executions after initially satisfied. Default is false.
        - `was` WasCondition: A condition that returns true if its evaluation would return true within the specified duration.
          - `and` Condition[]
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
              - …
            - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
              - …
            - `was` WasCondition (recursive)
          - `or` Condition[]
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
              - …
            - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
              - …
            - `was` WasCondition (recursive)
          - `not` Condition
            - `and` Condition[]
            - `or` Condition[]
            - `not` Condition (recursive)
            - `equals` EqualsCondition
              - …
            - `greaterThan` GreaterThanCondition
              - …
            - `greaterThanOrEquals` GreaterThanOrEqualsCondition
              - …
            - `lessThan` LessThanCondition
              - …
            - `lessThanOrEquals` LessThanOrEqualsCondition
              - …
            - `between` BetweenCondition
              - …
            - `changes` ChangesCondition: A condition that returns true when its evaluation resolves to true and the previous evaluation resolved to false.
              - …
            - `remains` RemainsCondition: A condition that returns true if its evaluation is true after the specified duration.
              - …
            - `was` WasCondition (recursive)
          - `equals` EqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThan` GreaterThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `greaterThanOrEquals` GreaterThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThan` LessThanCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `lessThanOrEquals` LessThanOrEqualsCondition
            - `left` Operand, required
              - …
            - `right` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `between` BetweenCondition
            - `value` Operand, required
              - …
            - `start` Operand, required
              - …
            - `end` Operand, required
              - …
            - `aggregation` 'Any' | 'All'
            - `changesOnly` boolean: Determines whether or not to track the evaluation state of the operation it contains, trigger the condition when the state of the inner operation transitions from false to true. Default is false.
          - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the condition
          - `duration` Interval, required
            - `value` Operand, required
              - …
            - `unit` 'Second' | 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month' | 'Year', required
          - `operand` Operand
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
        - `then` Action[]
        - `else` Action[]
        - `sequence` IfActionSequence
          - `then` 'Serial' | 'Parallel'
          - `else` 'Serial' | 'Parallel'
      - `sleep` SleepAction
        - `duration` Interval, required
          - `value` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `unit` 'Second' | 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month' | 'Year', required
      - `command` CommandAction
        - `devices` string[], required
        - `commands` DeviceCommand[], required
          - `component` string, ^[-_!.~'()*0-9a-zA-Z]{1,36}$: The name of the component on this device, default is 'main'. The component must be valid for the device.
          - `capability` string, required: Capability that this command relates to. This must be a capability of the component.
          - `command` string, required: Name of the command, this must be valid for the capability.
          - `arguments` object[]: Arguments of the command. All the required arguments defined in the capability's command argument definition must be provided. The type of the arguments are dependent on the type of the capability's command argument. Please refer to the capabilities definition at https://developer.smartthings.com/docs/devices/capabilities/capabilities-reference
          - `commandId` string: The id on the command that triggered this event, if applicable. Used for correlation of commands to events.
        - `sequence` CommandSequence
          - `commands` 'Serial' | 'Parallel'
          - `devices` 'Serial' | 'Parallel'
      - `scene` SceneAction: Possible scene actions, mutually exclusive
        - `deviceRequest` SceneDeviceRequest: JSON structure for a device when creating a Scene
          - `deviceId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$: the id of the device
          - `actionId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$: the id of the action to be created. Optional, sent by Reaver only
          - `components` SceneComponent[]
            - `componentId` string: the id of the component
            - `capabilities` SceneCapability[]
              - …
        - `modeRequest` SceneModeRequest: The mode to be activated by the Scene
          - `modeId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: The id of the mode
          - `actionId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$: the id of the action to be created. Optional, sent by Reaver only
          - `modeName` string: The name of the mode
        - `sleepRequest` SceneSleepRequest: Sleep a particular sequence
          - `seconds` integer, required: Number of seconds to sleep the sequence
        - `deviceGroupRequest` SceneDeviceGroupRequest: JSON structure for a device group when creating a Scene
          - `deviceGroupId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: the id of the device group
          - `actionId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$: the id of the action to be created. Optional, sent by Reaver only
          - `capability` SceneCapability: A device component capability
            - `capabilityId` string: The id of the capability
            - `status` 'proposed' | 'live' | 'deprecated' | 'dead': The status of the capability
            - `commands` object: Capability commands
      - `every` EveryAction
        - `interval` Interval
          - `value` Operand, required
            - `boolean` boolean
            - `decimal` number, double
            - `integer` integer
            - `string` string
            - `array` ArrayOperand
              - …
            - `map` MapOperand
            - `device` DeviceOperand
              - …
            - `location` LocationOperand
              - …
            - `date` DateOperand
              - …
            - `time` TimeOperand: TimeOperand is restricted to returning a value between 0 and 86399 seconds. This means that adding an offset that potentially drives the integer value outside the range of [0..86399] will cause an adjustment to bring the value back in that range
              - …
            - `datetime` DateTimeOperand
              - …
          - `unit` 'Second' | 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month' | 'Year', required
        - `specific` DateTimeOperand
          - `timeZoneId` string: A java time zone ID reference
          - `locationId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$: Location ID for location actions
          - `daysOfWeek` DayOfWeek[]
          - `year` integer
          - `month` integer
          - `day` integer
          - `reference` 'Now' | 'Midnight' | 'Sunrise' | 'Noon' | 'Sunset', required
          - `offset` Interval
            - `value` Operand, required
              - …
            - `unit` 'Second' | 'Minute' | 'Hour' | 'Day' | 'Week' | 'Month' | 'Year', required
        - `actions` Action[], required
        - `sequence` ActionSequence
          - `actions` 'Serial' | 'Parallel'
      - `location` LocationAction
        - `locationId` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$: locationId is required for "User level rule". (It's optional for "Location level rule")
        - `mode` string
      - `limit` LimitAction
        - `count` integer, required: Number of times the action can execute within the period
        - `period` 'Hour' | 'Day' | 'Week' | 'Month' | 'Lifetime', required: The period of time
        - `actions` Action[], required
        - `sequence` ActionSequence
          - `actions` 'Serial' | 'Parallel'
      - `toggle` ToggleAction
        - `devices` string[], required
        - `component` string, required
        - `capability` string, required
        - `attribute` string, required
    - `sequence` ActionSequence
      - `actions` 'Serial' | 'Parallel'
    - `timeZoneId` string: The time zone ID for this Rule. This overrides the Location time zone ID, but is overridden by time zone ID provided by each operand individually.
    - `id` string, ^(?:([0-9a-fA-F]{32})|([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))$, required: Unique id for the Rule
    - `status` 'Enabled' | 'Disabled': The status of the Rule
    - `executionLocation` 'Cloud' | 'Local': The location where the rule is executing, either local or cloud
    - `ownerId` string, required: Owner id
    - `ownerType` 'Location' | 'User', required: The owner of the rule is either a location or user
    - `creator` 'SMARTTHINGS' | 'ARB' | 'RECIPE' | 'UNDEFINED': The creator name who create the behavior
    - `dateCreated` string, required: Created date time
    - `dateUpdated` string, required: Last updated date time
    - `dateExecuted` string: Last executed date time
    - `allowed` string[]: List of client-facing action identifiers that are currently permitted for the user. If the value of this property is not null, then any action not included in the list value of the property is currently prohibited for the user. If the value of this property is null (or absent), then no permission-related information is being provided. <ul> <li> w:rules - the user can edit the rule <li> x:rules - the user can execute the rule <li> d:rules - the user can delete the rule </ul>
  - `_links` Links
    - `next` Link
      - `href` string: An absolute URL linking to a resource.
    - `previous` Link
      - `href` string: An absolute URL linking to a resource.

## Other responses

- `400`: Bad request
- `401`: Not authenticated
- `403`: Not authorized or not found
- `default`: Unexpected error

## Changes

- **2023-11-27** `e8dd260a33ec`: 1 info
  - added the new optional `query` request parameter `includeAllParents`

[Operation history](https://skmtc.dev/smartthings/apis/smartthings-api/changes/rules/get.md)

---

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