Adobe Launch Logo Adobe Experience Platform Launch

    • Light
    • Dark

Create a RuleComponent

Attributes

Field
Type
Required / Optional
Description
delegate_descriptor_id
string
required
Identifier for Delegate Descriptor
name
string
required
Name of the rule component
extension_id
string
optional
negate
boolean
optional
order
number
optional
Order to load the component by type
rule_order
number
optional
Priority for the associated rule to fire
settings
string
optional
Settings json object represented as a string

Definition

POST  /rules/:rule_id/rule_components

Example Request

curl https://reactor.adobe.io/rules/:rule_id/rule_components \
  -H "Accept: application/vnd.api+json;revision=1" \
  -H "Content-Type: application/vnd.api+json" \
  -H "Authorization: Bearer [TOKEN]" \
  -H "X-Api-Key: [KEY]" \
  -X POST \
  -d \
'
{
  "data": {
    "attributes": {
      "delegate_descriptor_id": "kessel-test::events::click",
      "name": "My Example Click Event",
      "settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
    },
    "relationships": {
      "extension": {
        "data": {
          "id": "EX9d00daf64549414caf28ed48e62da98c",
          "type": "extensions"
        }
      }
    },
    "type": "rule_components"
  }
}'

Example Response

201 Created
{
  "data": {
    "id": "RC20c9d4329a234e4b98027d3f04ea5462",
    "type": "rule_components",
    "attributes": {
      "created_at": "2018-08-31T16:52:06.375Z",
      "delegate_descriptor_id": "kessel-test::events::click",
      "dirty": true,
      "name": "My Example Click Event",
      "negate": false,
      "order": null,
      "rule_order": 50.0,
      "published": false,
      "published_at": null,
      "revision_number": 0,
      "updated_at": "2018-08-31T16:52:06.375Z",
      "settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
    },
    "relationships": {
      "updated_with_extension_package": {
        "links": {
          "related": "https://reactor.adobe.io/rule_components/RC20c9d4329a234e4b98027d3f04ea5462/updated_with_extension_package"
        },
        "data": {
          "id": "EP27e9323eb585411fae6086fc78a3b70b",
          "type": "extension_packages"
        }
      },
      "extension": {
        "links": {
          "related": "https://reactor.adobe.io/rule_components/RC20c9d4329a234e4b98027d3f04ea5462/extension"
        },
        "data": {
          "id": "EX9d00daf64549414caf28ed48e62da98c",
          "type": "extensions"
        }
      },
      "origin": {
        "links": {
          "related": "https://reactor.adobe.io/rule_components/RC20c9d4329a234e4b98027d3f04ea5462/origin"
        },
        "data": {
          "id": "RC20c9d4329a234e4b98027d3f04ea5462",
          "type": "rule_components"
        }
      },
      "rule": {
        "links": {
          "related": "https://reactor.adobe.io/rule_components/RC20c9d4329a234e4b98027d3f04ea5462/rule"
        },
        "data": {
          "id": "RL76c41cada90344989e25d091fa677f29",
          "type": "rules"
        }
      }
    },
    "links": {
      "extension": "https://reactor.adobe.io/extensions/EX9d00daf64549414caf28ed48e62da98c",
      "origin": "https://reactor.adobe.io/rule_components/RC20c9d4329a234e4b98027d3f04ea5462",
      "rule": "https://reactor.adobe.io/rules/RL76c41cada90344989e25d091fa677f29",
      "self": "https://reactor.adobe.io/rule_components/RC20c9d4329a234e4b98027d3f04ea5462"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}