# uip rules versions

> Syntax and options for `uip rules versions`, which lists the versions of a business rule deployed to an Orchestrator folder.

:::note
`uip rules versions` is labeled Preview in the command help. Refer to [Versioning](./versioning.md#per-command-stability) for what the Preview label means.
:::

`uip rules versions` lists the versions of a business rule deployed to an Orchestrator folder. The active version, marked with `IsActive: true`, is the one consumers evaluate.

## Synopsis

```
uip rules versions <rule-name> (--folder-path <path> | --folder-key <key>) [-l <number>] [--offset <number>]
```

## Arguments

| Name | Required | Purpose |
|---|---|---|
| `<rule-name>` | yes | Business rule name. |

## Options

Pass exactly one of `--folder-path` or `--folder-key`.

| Short | Long | Value | Default | Description |
|---|---|---|---|---|
| | `--folder-path` | string | — | Folder path, for example `Shared`. |
| | `--folder-key` | GUID | — | Folder key. |
| `-l` | `--limit` | integer (1–10000) | `50` | Number of versions to return. |
| | `--offset` | integer | `0` | Number of versions to skip. |

## Example

```bash
uip rules versions LoanEligibility --folder-path "Shared"
```

## Data shape (--output json)

```json
{
  "Code": "RulesVersionList",
  "Data": [
    { "Version": "1.0.2", "IsActive": true, "CreationTime": "2026-09-20T08:30:00.000Z" },
    { "Version": "1.0.1", "IsActive": false, "CreationTime": "2026-09-10T14:05:00.000Z" }
  ]
}
```

The envelope also carries a `Pagination` object with `Returned`, `Limit`, `Offset`, and `HasMore`.

## Exit codes

Refer to [Exit codes](./exit-codes.md) for the shared contract. The command exits `1` in these cases:

| Condition | `ErrorCode` |
|---|---|
| The folder holds no rule with this name. | `not_found` |
| Neither or both of `--folder-path` and `--folder-key` are passed. | `invalid_argument` |

## Related commands

- [`uip rules get`](./uip-rules-get.md) gets the rule and its current version.
- [`uip rules describe`](./uip-rules-describe.md) returns the active version's entry points.

## See also

- [`uip rules`](./uip-rules.md) for the tool overview.
