on 05-16-2022 2:10 PM
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:
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.:
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
Okay nevermind, I did not look into the payload good enough, yours is only valid for multivalve entry-references.
That's the correct one:
{
"ER_REF_CHEF": {
"REFERENCED_ID": 113368,
"OPERATION": "REPLACE"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Markus,
cause it is a Single-Value, did you simply try to write it, like a Single-Value:
{
"ER_REF_CHEF" : 113368
}
Greetings,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Marcus,
can you make screenshots of the attribute? In particular what presentation type is set up? Also please provide the headers of the request.
I always restart the IdM JMX App as soon as I do changes on forms/attributes. Can you restart the app and send the request again?
The request payload itself looks okay.
Kind regards,
Aydin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.