How can we hard delete all the values from an attribute?

Question

 How can we hard delete all the values from an attribute

Answer

Example 1:

This endpoint starts a Bulk Operations task that allows you to update attributes for a bunch of entities at the same time.

POST {TenantURL}/entities/_update

Response Body:

{
  "objects": {
    "list": [
      "entities/1Kxxxx"
    ]
  },
  "actions": [
    {
      "operationParameters": {
        "attributeURI": "configuration/entityTypes/HCP/attributes/FirstName",
        "sourceTypes": [
          "Reltio",
          "AHA",
          "AMS"
        ]
      },
      "operation": "DeleteAttribute"
    }
  ]
}

All values from SourceTypes will be removed.

Example 2:

This endpoint starts a bulk attribute update task that allows updating attributes for

a bunch of entities at the same time.

POST {{api_uri}}/{{tenant}}/entities/{{entity_id}}/_update?alwaysCreateDCR=true

[

  {
    "type": "UPDATE_ATTRIBUTE",
    "URI": "entities/{{entityID}}/attributes/FirstName/{{FirstNameID}}",
    "newValue": {
      "value": "Updated"
    },

    "crosswalk": {
      "type": "configuration/sources/Reltio",
      "value": "{{entityID}}"
    }

  },

  {

    "type": "DELETE_ATTRIBUTE",
    "URI": "entities/{{entityID}}/attributes/LastName/{{LastNameID}}",
    "crosswalk": {
      "type": "configuration/sources/Reltio",
      "value": "{{entityID}}"

    }

  },

  {
    "type": "IGNORE_ATTRIBUTE",
    "URI": "entities/{{entityID}}/attributes/MiddleName/{{MiddleNameID}}",
    "newValue": {
      "value": true
    }

  },

  {
    "type": "INSERT_ATTRIBUTE",
    "URI": "entities/{{entityID}}/attributes/Int",
    "newValue": [
      {
        "value": "55"
      }
    ]

  }

]

 

References

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.