---
title: "List rule sets"
method: GET
path: "/v1/programs/{program_id}/rule-sets"
tags: ["Rule Sets"]
---

# List rule sets

`GET /v1/programs/{program_id}/rule-sets`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/programs/{program_id}/rule-sets`
- Auth: HTTP bearer

List a program's rule sets in deterministic order (order ascending, then ID). Every set containing an applicable ACTIVE rule participates; order only determines execution priority.

## Path parameters

- `program_id` string, uuid, required

## Query parameters

- `created_after` string, date-time
- `created_before` string, date-time

## Response `200`

List of rule sets

- RuleSetListResponse: One page of rule sets, with the pagination details for the next page.
  - `data` RuleSetResponse[]: The rule sets on this page.
    - `created_at` string, date-time: When this rule set was created.
    - `id` string, uuid: The id of the rule set. Use it in `rule_set_id` fields and paths.
    - `key` string: Immutable program-scoped key.
    - `name` string: Operator-facing display name.
    - `order` integer: Execution position among participating sets; lower executes first. This does not control participation, stacking, replacement, or suppression.
    - `program_id` string, uuid: Program that owns this rule set.
    - `rule_configuration_version` integer: Resulting program rule-configuration revision. Present on mutation responses.
    - `updated_at` string, date-time: When this rule set was last modified.
  - `pagination` PaginationResponse: Cursor details for a list. `has_more` says whether another page exists, and `next_cursor` is the value to send to get it.
    - `has_more` boolean, required: Whether more results are available beyond this page
    - `next_cursor` string, nullable, required: Cursor to fetch the next page. Null on the last page

## Other responses

- `400`: Invalid program ID (code: validation_error)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `404`: Program not found (code: program_not_found)
- `429`: Too many requests. Wait the number of seconds in the `Retry-After` header, then retry. See [Limits and durations](https://docs.scrip.dev/limits#rate-limits).
- `500`: Something failed on Scrip's side. Retry the request, and quote `request_id` if it keeps failing. [Errors](https://docs.scrip.dev/errors) lists every code, and the [API introduction](https://docs.scrip.dev/api-reference/introduction) describes the error format.

---

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