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!


Update a DataElement

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": {
      "name": "My New Name",
      "settings": "{\"elementSelector\":\".target-element-b\",\"elementProperty\":\"html\"}"
    },
    "type": "data_elements",
    "id": "DE449ab6dd09874f789ce23e7c3a2823b4"
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "DE449ab6dd09874f789ce23e7c3a2823b4",
    "type": "data_elements",
    "attributes": {
      "created_at": "2018-08-31T16:49:35.706Z",
      "dirty": true,
      "enabled": true,
      "name": "My New Name",
      "published": false,
      "published_at": null,
      "revision_number": 0,
      "updated_at": "2018-08-31T16:49:35.923Z",
      "clean_text": false,
      "default_value": "",
      "delegate_descriptor_id": "kessel-test::dataElements::dom-attribute",
      "force_lower_case": false,
      "review_status": "unsubmitted",
      "storage_duration": null,
      "settings": "{\"elementSelector\":\".target-element-b\",\"elementProperty\":\"html\"}"
    },
    "relationships": {
      "libraries": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4/revisions"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4/property"
        },
        "data": {
          "id": "PR26a5c67b311545e98707e0a412d8a57a",
          "type": "properties"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4/origin"
        },
        "data": {
          "id": "DE449ab6dd09874f789ce23e7c3a2823b4",
          "type": "data_elements"
        }
      },
      "extension": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4/extension"
        },
        "data": {
          "id": "EX742a37a71d4c402f8f45c982621aa6d0",
          "type": "extensions"
        }
      },
      "updated_with_extension_package": {
        "links": {
          "related": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4/updated_with_extension_package"
        },
        "data": {
          "id": "EP27e9323eb585411fae6086fc78a3b70b",
          "type": "extension_packages"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PR26a5c67b311545e98707e0a412d8a57a",
      "origin": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4",
      "self": "http://localhost:9010/data_elements/DE449ab6dd09874f789ce23e7c3a2823b4",
      "extension": "http://localhost:9010/extensions/EX742a37a71d4c402f8f45c982621aa6d0"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}