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": "RL9e4077d760f447dfa7338bf95255064b",
    "type": "rules",
    "attributes": {
      "created_at": "2018-08-31T16:48:46.674Z",
      "dirty": true,
      "enabled": true,
      "name": "Example Rule",
      "published": false,
      "published_at": null,
      "revision_number": 0,
      "updated_at": "2018-08-31T16:48:46.674Z",
      "review_status": "unsubmitted"
    },
    "relationships": {
      "libraries": {
        "links": {
          "related": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b/revisions"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b/property"
        },
        "data": {
          "id": "PRde140cd94a87464095105c5cf718b23c",
          "type": "properties"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b/origin"
        },
        "data": {
          "id": "RL9e4077d760f447dfa7338bf95255064b",
          "type": "rules"
        }
      },
      "rule_components": {
        "links": {
          "related": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b/rule_components"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PRde140cd94a87464095105c5cf718b23c",
      "origin": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b",
      "self": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b",
      "rule_components": "http://localhost:9010/rules/RL9e4077d760f447dfa7338bf95255064b/rule_components"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}