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": "RL032090dde7ef41519f4fd7dd4426be66",
    "type": "rules"
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "RL18a4fa5dff4a4676bcfd3943f24ef5ed",
    "type": "rules",
    "attributes": {
      "created_at": "2018-07-26T15:06:34.389Z",
      "dirty": false,
      "enabled": true,
      "name": "Example Rule",
      "published": false,
      "published_at": null,
      "revision_number": 1,
      "updated_at": "2018-07-26T15:06:34.389Z",
      "review_status": "unsubmitted"
    },
    "relationships": {
      "libraries": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed/revisions"
        }
      },
      "property": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed/property"
        },
        "data": {
          "type": "properties",
          "id": "PR2f34a5773f84409899fdde7caf25f54a"
        }
      },
      "origin": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed/origin"
        },
        "data": {
          "type": "rules",
          "id": "RL032090dde7ef41519f4fd7dd4426be66"
        }
      },
      "rule_components": {
        "links": {
          "related": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed/rule_components"
        }
      }
    },
    "links": {
      "property": "https://mc-api-activation-reactor-qe.adobe.io/properties/PR2f34a5773f84409899fdde7caf25f54a",
      "origin": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL032090dde7ef41519f4fd7dd4426be66",
      "self": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed",
      "rule_components": "https://mc-api-activation-reactor-qe.adobe.io/rules/RL18a4fa5dff4a4676bcfd3943f24ef5ed/rule_components"
    },
    "meta": {
      "latest_revision_number": 1
    }
  }
}