I am trying to read the value from the response object from the parent API call and pass the value to child API, but the child API is somehow not able to read the value passed from the parent API. I am not getting any error but instead in IdentityNow its saying that operation is successful. How can I achieve this functionality? I am putting sample response which I am getting from first API call.
Above response is the output of get user details. I need to read the value for id of role and pass that value to another API to remove a role . I am not storing the value of role id as this value varies for different user. For eg user1 Role1 can have value as 2026 but for user2 value for Role1 id can be 3032. I need to call remove role API(second API) which fetches the value of role id to remove the role. I have tried using the Json expression as mentioned below, to read the value of role id and store it in response mapping object to a temp variable ROLEIDVAL then then pass this ROLEIDVAL to call the next API but seems the value is not getting stored in ROLEIDVAL.
$.Roles[?(@.Role==“$plan.Role$”)].Id
$.Roles[?(@.Role==“$plan.Role$”)].Id[0]
$.Roles[?(@.Role==‘$plan.Role$’)][0].Id
$.Roles[?(@.Role==‘$plan.Role$’)].Id
How can I make sure that the value of the id of role is read and passed to next API being called?
I am not sure i understand what you are trying to do here. So are trying to aggregate an account from source and remove a role/entitlement on the source during aggregation? anyway, this role object is multi-valued right. after your first call you must be mapping the response in the first call. you will create a second call with first call as parent and user response. in the second call. for example, if you have mapped it to roles in the first call, then you second call will access it using $response.roles$.
the second call relative url will be something like /api/remove/$response.roles$
but since this is a multivalued, take a look at the 2nd API how to pass them.
again, this is the basic process to do it but more details might help to see how to handle this.
Yes @ChelseaChelsea, so the json which I posted is the response object of get single user API, now I need to call second API to remove one of the roles. But as I mentioned that to remove the role, we need the id of the role too (which need to be read from the first API response) and then pass that id also to remove role API. So, I need to know what would be the appropriate way(json expression path as mentioned in my previous post) to retrieve the id of the role to be removed? Or if there is any alternate method to read the id of the role.
Please note the id of role is not being aggregated in ISC as the id is not consistent with the role, but it differs for diferent user as explained earlier.
I understand. it is basically assignment id not the entitlement id/value.
You cannot do it directly. I am sure the application will have an endpoint to get this done. An example is Salesforce. if its not an home grown service, let me know the app name. Lets see if we can figure it.
I tried to hard code the value of role like $.Roles[?(@.Role==‘Role1’)].Id in one of the element in response mapping object and store that into account schema, I was able to see that the value is getting displayed for that role as 2026, so ideally while setting the dynamic value it should work too.