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
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://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": "kessel-test::events::click",
      "name": "My Example Click Event",
      "settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
    },
    "relationships": {
      "extension": {
        "data": {
          "id": "EX61f02611f8a0437892b25dd12f7d124a",
          "type": "extensions"
        }
      }
    },
    "type": "rule_components"
  }
}'

Example Response

201 Created
{
  "data": {
    "id": "RCe0b9a9aaeef148b7abee623e035969f6",
    "type": "rule_components",
    "attributes": {
      "created_at": "2018-07-26T15:05:54.482Z",
      "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-07-26T15:05:54.482Z",
      "settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
    },
    "relationships": {
      "updated_with_extension_package": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rule_components/RCe0b9a9aaeef148b7abee623e035969f6/updated_with_extension_package"
        },
        "data": {
          "type": "extension_packages",
          "id": "EP400d51959fa44efd8596fc81a7de1be6"
        }
      },
      "extension": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rule_components/RCe0b9a9aaeef148b7abee623e035969f6/extension"
        },
        "data": {
          "type": "extensions",
          "id": "EX61f02611f8a0437892b25dd12f7d124a"
        }
      },
      "origin": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rule_components/RCe0b9a9aaeef148b7abee623e035969f6/origin"
        },
        "data": {
          "type": "rule_components",
          "id": "RCe0b9a9aaeef148b7abee623e035969f6"
        }
      },
      "rule": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rule_components/RCe0b9a9aaeef148b7abee623e035969f6/rule"
        },
        "data": {
          "type": "rules",
          "id": "RL575839804d104484b79f238cf5847fca"
        }
      }
    },
    "links": {
      "extension": "https://mc-api-activation-reactor-qe.adobe.io/extensions/EX61f02611f8a0437892b25dd12f7d124a",
      "origin": "https://mc-api-activation-reactor-qe.adobe.io/rule_components/RCe0b9a9aaeef148b7abee623e035969f6",
      "rule": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL575839804d104484b79f238cf5847fca",
      "self": "https://mc-api-activation-reactor-qe.adobe.io/rule_components/RCe0b9a9aaeef148b7abee623e035969f6"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}