cancel
Showing results for 
Search instead for 
Did you mean: 

Delete attributes via rest API

0 Kudos

Hi Experts,

I'm using the v72alpha rest API provided with IDM 7.2 sp7.  We've got the processes working for setting values but we are unable to delete attributes.  For some attributes we can pass %00 to save a null and the attribute is removed but for others this fails.  The documentation says that a delete can be performed by setting <attributename> = [{"CHANGETYPE":"DELETE"}] but I can't make any variation of this string work.  Can anyone provide an example of how to format the body to delete an attribute?


The specific attribute I'm trying to delete is MX_PHONE_PRIMARY with a task that accepts MSKEYVALUE and MX_MOBILE_PRIMARY....my body string which fails is


MSKEYVALUE=AAF1316&MX_MOBILE_PRIMARY={"CHANGETYPE":"DELETE"}


Here's the response I get...


{"MX_REST_MSG":" The value for attribute Primary Mobile Number is not valid ","MX_REST_SUCCESS":false}


Thanks!!

Accepted Solutions (1)

Accepted Solutions (1)

former_member2987
Active Contributor
0 Kudos

Hi Pete,

What if you just set it to a null value?

Matt

0 Kudos

Hey Matt,

Thanks for the response.  We've been using the null option as a workaround but this was failing on that specific attribute, equally we've had to use %00 to equal null for multi value attributes. 

In this specific case the phone number attribute had a regex in there to specific numeric only. The regex however didn't have an OR in it for empty string, hence once you'd set a value you couldn't delete it with a blank string.

So the problems not quite resolved as we still don't know the delete syntax but we do have a work around!

Thanks,
Pete.

Answers (0)