I'm trying to add data to IAM 2020.2 via an external program*. I try to do this via Indicium. What I can do with the Windows / Web GUI, I can't do with Indicium. I've managed to find out that the following error happens:
dbug: Indicium.Controllers.TableController[0] Cannot commit the resource for entity 'gui_appl'. The layout procedure has made the property 'mobile_proxy_address' mandatory, but no value was supplied.
This happens when I do a post call (with PostMan i.e.) to https://localhost:5001/iam/iam/gui_appl
with the following content:
{ "project_id": "my_project", "project_vrs_id": "1.00", "active": "true", "db_name": "my_database", "order_no": 10, "server_id": 2, "max_concurrent_sessions_per_account": 1, "claim_timeout": 1, "gui_appl_alias": "my_database"}
It only happens when the application platform "Mobile" is enabled. According to the log message the field mobile_proxy_address
is missing. So I've tried to add it, with "", null and '127.0.0.1' as value to the json post data, but then it returns:
dbug: Indicium.Controllers.TableControllere0] Cannot change the value of the property 'mobile_proxy_address' of 'gui_appl'.The application model prohibits editing this property.
Then I remembered something about resource staging (https://community.thinkwisesoftware.com/blogs-21/resource-staging-1070). I've applied this method and then it works as expected. But it needs for each individual property a http call. That is a bit overwhelming I guess, so I want to reduce it to a single POST call.
The post about also says something about a single request:
Simplifying the APIs
In version 2020.1.1 of Indicium we have re-enabled the single request APIs and built their implementations on top of resource staging. Clients can send all column/parameter values in a single request and Indicium will go through the process of resource staging and stage the values in the order that they’re supplied in. This does mean that the client should only include the values that are entered by the user and that the order of the properties in the request body is important.
I've tried to emulate the sequence as I would enter the gui_appl in the web or windows gui, but that didn't help. Any clues about how to add this record, with this invisible thus mandatory field without having to do it the n-patch-requests resource staging way?
(*If you're interested why we're accessing IAM on this way: As ISV we try to simplify our 'new customer' process: Creating an Azure database, GUI Application, add a user, send some mails, add an internal administration record within 1 application / click. This all works, until we've recently enabled the 'mobile' platform flag.)