WARNING

WARNING: These APIs are currently in an 'alpha' state and are likely to change over time. We recommend you not use them in a production setting at this time!


Create a RuleComponent

Attributes

delegate_descriptor_id
string - required
Identifier for Delegate Descriptor
extension_id
string - required
name
string - required
Name of the rule component
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://mc-api-activation-reactor-integration.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": "EPc9ce7e7145a3406f9d9d73a16c925ca2::events::click",
      "extension_id": "EX6e405edd1d1a444eb19ce8b0c67e9e1b",
      "name": "My Example Click Event",
      "settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
    },
    "type": "rule_components"
  }
}'

Example Response

201 Created
{
  "data": {
    "id": "RCa6e2ca172fa741398fb6a9444e65a594",
    "type": "rule_components",
    "attributes": {
      "created_at": "2018-06-15T19:10:23.021Z",
      "delegate_descriptor_id": "EPc9ce7e7145a3406f9d9d73a16c925ca2::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-06-15T19:10:23.021Z",
      "settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
    },
    "relationships": {
      "rule": {
        "links": {
          "related": "http://localhost:9010/rule_components/RCa6e2ca172fa741398fb6a9444e65a594/rule"
        },
        "data": {
          "type": "rules",
          "id": "RL938f89c5f7dc465b91918db59629c09f"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/rule_components/RCa6e2ca172fa741398fb6a9444e65a594/origin"
        },
        "data": {
          "type": "rule_components",
          "id": "RCa6e2ca172fa741398fb6a9444e65a594"
        }
      },
      "extension": {
        "links": {
          "related": "http://localhost:9010/rule_components/RCa6e2ca172fa741398fb6a9444e65a594/extension"
        },
        "data": {
          "type": "extensions",
          "id": "EX6e405edd1d1a444eb19ce8b0c67e9e1b"
        }
      }
    },
    "links": {
      "extension": "http://localhost:9010/extensions/EX6e405edd1d1a444eb19ce8b0c67e9e1b",
      "origin": "http://localhost:9010/rule_components/RCa6e2ca172fa741398fb6a9444e65a594",
      "rule": "http://localhost:9010/rules/RL938f89c5f7dc465b91918db59629c09f",
      "self": "http://localhost:9010/rule_components/RCa6e2ca172fa741398fb6a9444e65a594"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}