Skip to main content
POST
Preview a forward rule-configuration rollback
Previews a change that restores the rule configuration of an earlier revision. The restore is a new change with a new version, so history keeps every revision. Send the current version as expected_rule_configuration_version. A stale value returns 409 with code rule_configuration_version_conflict. Rule sets created after that revision stay in the program, empty, and warnings lists them. Rules created after it are archived. Rule sets and rules keep their ids. Review the changes, then send the preview_token and request_hash to the apply endpoint.
See Roll back for restoring and applying an earlier configuration.

Authorizations

Authorization
string
header
default:sk_...
required

Send your API key as Authorization: Bearer <key>.

Path Parameters

program_id
string<uuid>
required

The program's id.

version
integer
required

The earlier version to restore

Body

application/json

The current rule_configuration_version, and optional source details

Asks for a preview that restores an earlier rule configuration revision.

expected_rule_configuration_version
integer
required

Current rule_configuration_version. A stale value rejects the request.

Required range: x >= 1
Example:

8

source
object

Optional caller category and correlation reference for audit history.

Response

The planned changes, and the token and hash to apply them

The changes a proposed rule configuration would make, and the token and hash to apply it.

base_rule_configuration_version
integer

Configuration version the preview was planned from.

change_id
string<uuid>

The id of this change. The apply response and the revision history carry the same id.

diff
object

Resource-level changes between the base and proposed configurations.

expires_at
string<date-time>

When preview_token stops working.

field_definitions
object[]

Fields to save with the rule change.

local_references
object

Mapping from each client_ref to its preview-allocated stable UUID.

preview_token
string

The token to send to apply. Nobody else can use it, and it stops working at expires_at.

Example:

"ahSToYq-OEn3S2Q1-qOP7iebMf_xahN0KciKUSygcKs"

proposed_rule_configuration
object

The configuration that apply will save.

request_hash
string

The hash to send to apply with preview_token.

Example:

"3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b"

source
object

Who is making the change, as recorded with the preview.

state_definitions
object[]

Counters and tags to save with the rule change.

warnings
object[]

Non-blocking advisories found while validating the proposed configuration.