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 Rule

Attributes

name
string - required
Name of the extension configuration.
enabled
boolean - optional

Definition

POST  /properties/:property_id/rules

Example Request

curl https://mc-api-activation-reactor-integration.adobe.io/properties/:property_id/rules \
  -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": {
      "name": "Example Rule"
    },
    "type": "rules"
  }
}'

Example Response

201 Created
{
  "data": {
    "id": "RLd7dc9ccdd2c8437195d76cd74c60529d",
    "type": "rules",
    "attributes": {
      "created_at": "2018-06-15T19:09:12.103Z",
      "dirty": true,
      "enabled": true,
      "name": "Example Rule",
      "published": false,
      "published_at": null,
      "revision_number": 0,
      "updated_at": "2018-06-15T19:09:12.103Z",
      "review_status": "unsubmitted"
    },
    "relationships": {
      "libraries": {
        "links": {
          "related": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d/revisions"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d/property"
        },
        "data": {
          "type": "properties",
          "id": "PR0b6e2bce4f0b44c7858de4c631d46e4a"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d/origin"
        },
        "data": {
          "type": "rules",
          "id": "RLd7dc9ccdd2c8437195d76cd74c60529d"
        }
      },
      "rule_components": {
        "links": {
          "related": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d/rule_components"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PR0b6e2bce4f0b44c7858de4c631d46e4a",
      "origin": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d",
      "self": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d",
      "rule_components": "http://localhost:9010/rules/RLd7dc9ccdd2c8437195d76cd74c60529d/rule_components"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}