Skip to Content
0
May 16, 2022 at 01:10 PM

IDM RESTv2 API - Unable to modify a reference attribute

300 Views

Hi,

we are planing to use the RESTv2 API to implement our "own IDM-WebService API",
that can be used by other applications to trigger IDM processes in our system.
(Like "Create a new application Role for application X" or "Reset password of user X".)

The first tests were very promising.
Reading the content of entries, modifying single- and multivalue text attributes, assigning privileges, .... everything works, BUT I am not able to modify the value of a “singleValue reference attribute.

The scenario is like this:

  • In the schema we have an entryType “PERSON” and an attribute “REF_CHEF”, that is an optional attribute of “PERSON”.
  • REF_CHEF is singleValue and a reference attribute, that contains a reference to another entry with entryType PERSON.
  • We have a UI Form which allows the modification of REF_CHEF in an entry of ET PERSON.

So according to the documentation I call the URI:

https://localhost:19443/idmrestapi/v2/service/ET_PERSON(ID=127099,TASK_GUID=guid'7E8D9DF6-C2E0-4E84-8AE8-BDA94D958B3A')

with a JSON formated body like this:

{
"ER_REF_CHEF": [
{
"REFERENCED_ID": 113368,
"OPERATION": "REPLACE"
}
]
}

(Beside “REPLACE” I also tried “MOD”. I also tried providing "LINK_ID" without doing anything good.)


In Postman this looks like this.:image.png


The message I receive is this:

<?xml version="1.0" ?>
<error xmlns=http://schemas.microsoft.com/ado/2007/08/dataservices/metadata>
<code>Bad Request</code>
<message xml:lang="en">Unerwarteter Wert für Parameter ER_REF_CHEF</message>
</error>

Roughly translated it says “Unexpected Value for parameter ER_REF_CHEF
I´d like to point out that there seems to be an additional whitespace between “Wert” and “für”.
Maybe the value of REFERENCED_ID was not passed or parsed correctly.

I would be very grateful for any hint.

Best Regards,

Markus

Attachments

image.png (45.6 kB)