I’m trying to get a Web Services source configured with a single parent and single child operation for account aggregation. The first endpoint would retrieve a list of groups and the child endpoint would retrieve the users in each group. Here is a sample of data for each.
Endpoint 1 - Get Groups:
[
{
"id": 12345,
"name": "Group 1",
},
{
"id": 54321,
"name": "Group 2",
},
]
Endpoint 2 - Get Group Members (using URL groups/$response.id/members)
[
{
"id": 1,
"name": "Gary Guy",
"email": "[email protected]",
},
{
"id": 2,
"name": "Greta Girl",
"email": "[email protected]"
}
]
I’ve tried almost every conceivable way of configuring this and no matter how I try, the accounts turn out like this:
Account ID: [{1,2}]
Account Name: [{Gary Guy, Greta Girl}]
email: [{[email protected], [email protected]}]
I think a main issue is the unnamed array in the response of the child endpoint. When I configure a parent endpoint with no child endpoint, it can parse through and create individual accounts the way I would expect. For that, I just set the root path to $ (though this may not be necessary) and response mapping is $.id / $.name / $.email. These two configurations may not be 100% perfect but the aggregations of individual accounts work, so I know IDN CAN parse the data coming from the above bodies.
I also tried employing an After Operation rule to explore pushing the data back to the connector after some manipulation. Unfortunately, the rawResponseObject looks exactly as one would expect based on the above (a basic string version of that JSON), and even when I turn it into a list and iterate through creating individual schema attribute/data mappings, the end result looks the exact same and when I send it back to the connector using the data object on the updatedMapInfo Map object outlined in the Rule documentation, the account data looks the same as I laid out above. For whatever reason, the connector is not parsing through the JSON array and creating individual accounts.
Can anyone help me? I’m perplexed how to get this working with or without a rule…