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!


Revise a Rule

Revising a Rule is the action of creating a new revision of the rule with the current (head) revision. A revision of a Rule will have its own Id. The original Rule may be discovered via the origin link.

Revising a Rule will also revise each of its related RuleComponents. Each revision of a RuleComponent will also have its own unique Id and will link to the revision of the Rule.

Revising a Rule is achieved by supplying an action with a value of revise in the meta of the request data.

Attributes

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

Definition

PATCH  /rules/:id

Example Request

curl https://mc-api-activation-reactor-integration.adobe.io/rules/:id \
  -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 PATCH \
  -d \
'
{
  "data": {
    "attributes": {
    },
    "meta": {
      "action": "revise"
    },
    "id": "RL5497418087ac450fb82cd94fa4ee920c",
    "type": "rules"
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "RLd88009bbe7024c6eaedc810997acf290",
    "type": "rules",
    "attributes": {
      "created_at": "2018-08-31T16:52:30.571Z",
      "dirty": false,
      "enabled": true,
      "name": "Example Rule",
      "published": false,
      "published_at": null,
      "revision_number": 1,
      "updated_at": "2018-08-31T16:52:30.571Z",
      "review_status": "unsubmitted"
    },
    "relationships": {
      "libraries": {
        "links": {
          "related": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290/revisions"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290/property"
        },
        "data": {
          "id": "PRafe99694d6654bffa4e2a7c27ccb7569",
          "type": "properties"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290/origin"
        },
        "data": {
          "id": "RL5497418087ac450fb82cd94fa4ee920c",
          "type": "rules"
        }
      },
      "rule_components": {
        "links": {
          "related": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290/rule_components"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PRafe99694d6654bffa4e2a7c27ccb7569",
      "origin": "http://localhost:9010/rules/RL5497418087ac450fb82cd94fa4ee920c",
      "self": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290",
      "rule_components": "http://localhost:9010/rules/RLd88009bbe7024c6eaedc810997acf290/rule_components"
    },
    "meta": {
      "latest_revision_number": 1
    }
  }
}