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": "DEbd176b815d044e949b0bdaf0cdbd90c7"
  }
}'

Example Response

200 OK
{
  "data": {
    "id": "DEbd176b815d044e949b0bdaf0cdbd90c7",
    "type": "data_elements",
    "attributes": {
      "created_at": "2018-06-15T19:09:31.713Z",
      "dirty": true,
      "enabled": true,
      "name": "My New Name",
      "published": false,
      "published_at": null,
      "revision_number": 0,
      "updated_at": "2018-06-15T19:09:31.920Z",
      "clean_text": false,
      "default_value": "",
      "delegate_descriptor_id": "EPc9ce7e7145a3406f9d9d73a16c925ca2::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/DEbd176b815d044e949b0bdaf0cdbd90c7/libraries"
        }
      },
      "revisions": {
        "links": {
          "related": "http://localhost:9010/data_elements/DEbd176b815d044e949b0bdaf0cdbd90c7/revisions"
        }
      },
      "property": {
        "links": {
          "related": "http://localhost:9010/data_elements/DEbd176b815d044e949b0bdaf0cdbd90c7/property"
        },
        "data": {
          "type": "properties",
          "id": "PR534037f47c684f31a5d12dcbf02a1e93"
        }
      },
      "origin": {
        "links": {
          "related": "http://localhost:9010/data_elements/DEbd176b815d044e949b0bdaf0cdbd90c7/origin"
        },
        "data": {
          "type": "data_elements",
          "id": "DEbd176b815d044e949b0bdaf0cdbd90c7"
        }
      },
      "extension": {
        "links": {
          "related": "http://localhost:9010/data_elements/DEbd176b815d044e949b0bdaf0cdbd90c7/extension"
        },
        "data": {
          "type": "extensions",
          "id": "EX4df2d301475b4da1bf69f115f628e765"
        }
      }
    },
    "links": {
      "property": "http://localhost:9010/properties/PR534037f47c684f31a5d12dcbf02a1e93",
      "origin": "http://localhost:9010/data_elements/DEbd176b815d044e949b0bdaf0cdbd90c7",
      "self": "http://localhost:9010/data_elements/DEbd176b815d044e949b0bdaf0cdbd90c7",
      "extension": "http://localhost:9010/extensions/EX4df2d301475b4da1bf69f115f628e765"
    },
    "meta": {
      "latest_revision_number": 0
    }
  }
}