Rules
Rules are revisable resources, and that matters operationally. In many real workflows, a newly created or updated rule must be revised before it can be added to a library, which makes rules one of the first places developers feel Adobe Launch's revision model.
Rules
| Attribute | Data type | Description |
|---|---|---|
| list_for_property(property_id) | Array<Rule> | Lists all rules for the property. |
| find(rule_id) | Rule | Fetches a single rule. |
| property(rule_id) | Property | Traverses from a rule to its owning property. |
| libraries(rule_id) | Array<Library> | Lists libraries that contain the rule. |
| upstream_chain(rule_or_id, library_id:, property_id:) | UpstreamChain | Resolves the rule across the upstream library chain for a specific library context. |
| find_comprehensive(rule_id, library_id:, property_id:) | ComprehensiveRule | Returns the rule from a library-context review snapshot together with its rule components and normalized review payload. |
| comprehensive_upstream_chain(rule_or_id, library_id:, property_id:) | ComprehensiveUpstreamChain | Resolves the rule upstream and attaches snapshot-aware associated records and normalized JSON to each entry. |
| origin(rule_id) | Rule | Fetches the origin revision head for the rule. |
| create(property_id:, name:, enabled: true) | Rule | Creates a rule. |
| update(rule_id, attributes) | Rule | Updates an existing rule. |
| revise(rule_id) | Rule | Performs the explicit revise action required by Adobe for library workflows. |
| list_notes(rule_id) | Array<Note> | Lists notes attached directly to the rule. |
Create and revise
Create and revise a rule
# PR123 = property ID.
# Create a new rule inside the property.
rule = client.rules.create(
# Parent property for the rule.
property_id: "PR123",
# Human-readable rule name.
name: "Order Confirmation",
# Enable the rule immediately.
enabled: true
)
# Create a new revision so the rule is ready for library workflows.
rule = client.rules.revise(rule.id)
Comprehensive review
Rule review object
# RL123 = rule ID.
# LB_DEV = library ID.
# PR123 = property ID.
review_rule = client.rules.find_comprehensive(
"RL123",
library_id: "LB_DEV",
property_id: "PR123"
)
# Original Launch rule resource.
puts review_rule.resource.name
# Rule components loaded from the same library snapshot.
puts review_rule.rule_components.map(&:name).inspect
# Pretty JSON intended for code review or diff tooling.
puts review_rule.normalized_json
Upstream chain
Rule upstream chain
# RL123 = rule ID.
# LB_DEV = development library ID used as the comparison root.
# PR123 = property ID that owns the library chain.
# You can pass either a rule ID or a Rule resource object.
chain = client.rules.upstream_chain(
"RL123",
library_id: "LB_DEV",
property_id: "PR123"
)
# The target revision ID is the version currently present in the target library.
puts chain.target_revision_id
# nearest_match returns the first upstream library where the rule exists.
nearest = chain.nearest_match
# Print the upstream library ID and stage where the nearest match was found.
puts nearest&.library&.id
puts nearest&.stage
# Print the upstream revision ID for that matching rule.
puts nearest&.revision_id
# Print the point-in-time rule snapshot from the matching upstream revision.
puts nearest&.entity_snapshot
If you need the rule plus its components on both sides of the comparison, use client.rules.comprehensive_upstream_chain(...) instead of the lean helper.
Raw API mapping
Sample: list rules for a property
GET /properties/:property_id/rules
# PR... = property ID.
# Request all rules that belong to the property.
curl -s "https://reactor.adobe.io/properties/PR1234567890abcdef1234567890abcd/rules" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "x-api-key: YOUR_ADOBE_CLIENT_ID" \
-H "x-gw-ims-org-id: YOUR_IMS_ORG_ID" \
-H "Accept: application/vnd.api+json;revision=1"
Sample response
{
// Collection response for rule resources.
"data": [
{
// RL... = rule ID.
"id": "RL1234567890abcdef1234567890abcd",
"type": "rules",
"attributes": {
// Human-readable rule name.
"name": "Order Confirmation",
// Whether the rule is enabled.
"enabled": true,
// Adobe creation timestamp.
"created_at": "2026-03-26T10:05:41.000Z",
// Adobe last-update timestamp.
"updated_at": "2026-03-26T10:05:41.000Z",
// Publish timestamp, or null if unpublished.
"published_at": null,
// Revision timestamp, or null if no explicit revision exists yet.
"revised_at": null
}
}
]
}
The next page is usually Rule components, because rules rarely do useful work without their components.