---
title: "Get a rule-configuration revision"
method: GET
path: "/v1/programs/{program_id}/rule-configuration/revisions/{version}"
tags: ["Rules"]
---

# Get a rule-configuration revision

`GET /v1/programs/{program_id}/rule-configuration/revisions/{version}`

## Request

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

Get one saved revision with its complete configuration of rule sets and rules, what it changed, and who changed it.

## Path parameters

- `program_id` string, uuid, required
- `version` integer, required

## Response `200`

The revision and its complete configuration

- GetRuleConfigurationRevisionResponse: One saved revision of a program's rule configuration.
  - `caveats` RuleConfigurationHistoryCaveat[]: Explicit limitations on historical coverage.
    - `code` 'history_not_yet_tracked' | 'pre_history_legacy_data': Which limit applies: `history_not_yet_tracked` means the program has no saved revision yet. `pre_history_legacy_data` means versions older than the first saved revision have no history.
    - `message` string: Human-readable explanation of the limitation.
  - `revision` RuleConfigurationRevisionResponse: One saved revision of a program's rule configuration, with who changed it and what changed.
    - `actor` ActorResponse: Who caused an audited change: a dashboard user, an API key, a rule, Scrip itself, or a subject that a trusted integration asserted.
      - `actor_source` 'DIRECT_USER' | 'DIRECT_API_KEY' | 'RULE' | 'SYSTEM' | 'ASSERTED': How the change was made.
      - `api_key_id` string, uuid: API key that made the change; present for DIRECT_API_KEY.
      - `external_subject` string: Subject identifier the integration asserted; present for ASSERTED.
      - `external_subject_type` 'OAUTH_SUBJECT' | 'EMAIL': What kind of identifier `external_subject` is; present for ASSERTED.
      - `rule_id` string, uuid: Rule whose action made the change; present for RULE.
      - `user_id` string, uuid: Dashboard user who made the change; present for DIRECT_USER.
      - `via_api_key_id` string, uuid: API key the asserting integration used; present for ASSERTED.
    - `affected_rule_ids` string[]: Rule IDs changed by this revision.
    - `affected_rule_set_ids` string[]: Rule-set IDs changed by this revision.
    - `changed_at` string, date-time: Commit time of this revision.
    - `configuration` RuleConfigurationRevisionSnapshot: The rule configuration as it was at one saved revision.
      - `program_id` string: Program whose historical configuration is represented.
      - `rule_configuration_version` integer: Historical program rule-configuration revision.
      - `rule_sets` RuleSetConfigurationRevisionSnapshot[]: Complete effective rule sets and rules at this revision.
        - `id` string: The id of the rule set at this revision.
        - `key` string: The key of the rule set, unique in the program.
        - `name` string: The name people see for the rule set.
        - `order` integer: The position of the rule set in the program. Lower numbers run first.
        - `rules` RuleConfigurationSnapshot[]: The rules in the rule set, in order.
          - `actions` RuleAction[]: The actions Scrip takes when the rule matches.
            - union: A single action to execute when a rule matches. Actions are flat objects: every field sits at the top level alongside `type`, and `type` selects which fields are allowed. Fields that do not appear in the selected branch are rejected.
              - …
          - `active_from` string, date-time: The earliest event time the rule applies to, as an RFC 3339 timestamp.
          - `active_to` string, date-time: The event time the rule stops applying, as an RFC 3339 timestamp.
          - `budgets` BudgetSpec[]: The spending limits on the rule.
            - union: Limit on how much of one asset this rule can credit. Use PROGRAM for a shared limit or PARTICIPANT for a limit per recipient. One budget is allowed per asset and scope. Omit schedule_type for a lifetime limit, or choose CRON or INTERVAL to reset it on a schedule.
              - …
          - `client_ref` string: The `client_ref` the rule had in the change that created it, when there was one.
          - `condition` string: The CEL condition that decides whether the rule matches an event.
          - `description` string: What the rule is for.
          - `id` string: The id of the rule at this revision.
          - `name` string: The name people see for the rule.
          - `order` integer: The position in the list. Lower numbers run first.
          - `rule_set_id` string: The rule set that holds the rule.
          - `status` 'ACTIVE' | 'SUSPENDED' | 'ARCHIVED': Whether the rule is ACTIVE or SUSPENDED.
          - `stop_after_match` boolean: Whether a match stops the rest of the rule set from running.
    - `configuration_change_id` string, uuid: Atomic preview/apply change ID, when this revision came from a change set.
    - `diff` RuleConfigurationDiffResponse: The rule sets and rules that a rule configuration change creates, updates, moves or removes.
      - `rule_sets` RuleConfigurationResourceDiffResponse[]: Created, updated, moved, or otherwise changed rule sets.
        - `after` unknown
        - `before` unknown
        - `change_type` 'CREATE' | 'UPDATE' | 'MOVE' | 'STATUS' | 'ARCHIVE' | 'REMOVE': How the resource changed.
        - `client_ref` string: Request-local identity when the resource is created by this change set.
        - `fields` string[]: Fields whose values changed.
        - `id` string, uuid: The id of the rule set or rule that changed.
      - `rules` RuleConfigurationResourceDiffResponse[]: Created, updated, moved, archived, or otherwise changed rules.
        - `after` unknown
        - `before` unknown
        - `change_type` 'CREATE' | 'UPDATE' | 'MOVE' | 'STATUS' | 'ARCHIVE' | 'REMOVE': How the resource changed.
        - `client_ref` string: Request-local identity when the resource is created by this change set.
        - `fields` string[]: Fields whose values changed.
        - `id` string, uuid: The id of the rule set or rule that changed.
    - `id` string, uuid: Stable revision record ID.
    - `program_id` string, uuid: Program whose configuration changed.
    - `rule_configuration_version` integer: Program rule-configuration version; increases by one on every change.
    - `rule_history_ids` string[]: Per-rule history rows written by this revision.
    - `rule_set_history_ids` string[]: Per-rule-set history rows written by this revision.
    - `source` RuleConfigurationSourceResponse: Who or what made a rule configuration change, so you can match it to your own records.
      - `reference` string: Correlation reference the caller supplied with the change, if any.
      - `source_revision` integer: Historical revision restored when the change was a forward rollback.
      - `type` 'API' | 'DASHBOARD' | 'MCP' | 'SDK' | 'CONFIG_AS_CODE' | 'SCENARIO_PROMOTION': Which kind of caller made the change.
    - `source_revision` integer: Historical revision restored by a forward rollback, when applicable.

## Other responses

- `400`: program_id is not a UUID, or version is not a positive integer (code: validation_error)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `404`: Program not found, or no revision has that version (code: program_not_found | rule_configuration_revision_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)
