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 DataElement

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

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

Attributes

clean_text
boolean - optional
Remove leading and trailing whitespace
default_value
string - optional
Value to return if data element evaluates to undefined
delegate_descriptor_id
string - optional
enabled
boolean - optional
force_lower_case
boolean - optional
Convert value to lowercase
name
string - optional
User provided name for data element
settings
string - optional
Settings json object represented as a string
storage_duration
string - optional

Definition

PATCH  /data_elements/:id

Example Request

curl https://mc-api-activation-reactor-integration.adobe.io/data_elements/: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": "DE77ecefeb1451453ea004d61c3a8aa9a4",
    "type": "data_elements"
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "DE8de791aff9af454886586010bb66a68b",
    "type": "data_elements",
    "attributes": {
      "created_at": "2018-06-15T19:09:35.666Z",
      "dirty": false,
      "enabled": true,
      "name": "My Data Element",
      "published": false,
      "published_at": null,
      "revision_number": 1,
      "updated_at": "2018-06-15T19:09:35.666Z",
      "clean_text": false,
      "default_value": "",
      "delegate_descriptor_id": "EPc9ce7e7145a3406f9d9d73a16c925ca2::dataElements::dom-attribute",
      "force_lower_case": false,
      "review_status": "unsubmitted",
      "storage_duration": null,
      "settings": "{\"elementProperty\":\"html\",\"elementSelector\":\".target-element\"}"
    },
    "relationships": {
      "libraries": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE8de791aff9af454886586010bb66a68b/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE8de791aff9af454886586010bb66a68b/revisions"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE8de791aff9af454886586010bb66a68b/property"
        },
        "data": {
          "type": "properties",
          "id": "PRde7c1183aaf74bf4adb11db741900f41"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE8de791aff9af454886586010bb66a68b/origin"
        },
        "data": {
          "type": "data_elements",
          "id": "DE77ecefeb1451453ea004d61c3a8aa9a4"
        }
      },
      "extension": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE8de791aff9af454886586010bb66a68b/extension"
        },
        "data": {
          "type": "extensions",
          "id": "EX9430a50c43b144ecb1c6643a9e941dba"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PRde7c1183aaf74bf4adb11db741900f41",
      "origin": "http://localhost:9010/data_elements/DE77ecefeb1451453ea004d61c3a8aa9a4",
      "self": "http://localhost:9010/data_elements/DE8de791aff9af454886586010bb66a68b",
      "extension": "http://localhost:9010/extensions/EX9430a50c43b144ecb1c6643a9e941dba"
    },
    "meta": {
      "latest_revision_number": 1
    }
  }
}