ivaladez
(Ivan Valadez)
September 11, 2023, 7:11pm
1
Is there a specific way we should be specifying / inserting variables into nested json objects for the Request Body? Is the limitation one variable?
{
"lastName": "{{$.getIdentity.attributes.lastname}}",
}
The JSON above works as expected.
The following snippet example breaks and is sent as all strings:
{
"lastName": "{{$.getIdentity.attributes.lastname}}",
"variables": {
"employeeID": "{{$.getIdentity.attributes.employeeid}}"
}
}
This also turns into strings:
{
"lastName": "{{$.getIdentity.attributes.lastname}}",
"employeeID": "{{$.getIdentity.attributes.employeeid}}"
}
I reviewed the Sailpoint documentation but could not find any information related to nesting json objects with variable insertion, or variable limitations.
Welcome to the Developer Community Ivan.
There shouldn’t be any problem with variable insertion in nested objects. I tried the following input and was able to get successful output.
Input
Output
{
"lastName": "Doe",
"variables": {
"employeeID": "E009"
}
}
What do you mean by this? What output are you seeing where it is all strings? Does it look like this?
{
"lastName": "{{$.trigger.attributes.lastname}}",
"variables": {
"employeeID": "{{$.trigger.attributes.employeeid}}"
}
}
If that is what you see then that will occur if any single variable you reference either doesn’t exist or has a null value. All variables must exist and have values in order for the variable insertion to resolve.
1 Like
ivaladez
(Ivan Valadez)
September 12, 2023, 8:06pm
3
@colin_mckibben Thanks for the reply, I got it working after I deleted the HTTP Request Action item and re-added it.
1 Like
system
(system)
Closed
November 11, 2023, 8:07pm
4
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.