In the works of creating a whole flow to process users and its user groups in the application to communicate to IAM, I am configuring the Web connections. In setting up all endpoints, I’ve added several GET actions to obtain values from lookups which I later use in the actual POST (ex. Create user).
The question now, is there also a way to directly use a Lookup value in the POST instead of needing to find its “id” in intermediate steps?
For example I wish to obtain the “write_back_usr_pref_type_id” by just supplying the name of the configuration.
Solved
Can I use the Lookup value in a POST directly?
Best answer by Dick van den Brink
Hi Mark,
I hope I understood your question correctly, but it is possible by using for instance the following request:
You can find more about this feature here: OData API | Thinkwise Documentation
Look for choose_by_display
and choose_by_element
Let me know if it works out for you!
{
"usr_id": "dvdb_tmp",
"first_name": "Dummy",
"gender": {
"choose_by_element": {
"element_transl": "Male"
}
},
"email": "dvdb-dummy@thinkwisesoftware.com",
"authentication_type": {
"choose_by_element": {
"element_transl": "IAM"
}
},
"two_factor_authentication_type": "0",
"write_back_usr_pref_type_id": {
"choose_by_display": {
"display_value": "Move"
}
},
"appl_lang_id": {
"choose_by_display": {
"display_value": "Nederlands"
}
},
"time_zone_id": {
"choose_by_display": {
"display_value": "Etc/GMT-8"
}
}
}
Edit: Small note, instead of the choose_by_element
for “authentication_type” you could have used authentication_type : "3"
instead, but I just wanted to show it could also be done like this
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.