Web Services Connector Child EndPoint Array Parsing

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…

How did you configure your response mapping? It’s possible you might have the wrong JSONpath expression for mapping your results.

Actually, I think what you want is partitioning:

https://documentation.sailpoint.com/connectors/webservices/help/integrating_webservices/partitioning.html

Simple parent/child aggregations are meant for getting more details about users when the list user endpoint isn’t enough. For example, the parent might be /api/listusers, which returns a simple array of users that is missing key information like email and title. If there is another endpoint to get full user information, like /api/user/{id}, then you can use the child account aggregation to get those full details.

Since you are starting from a list of groups, you can’t use the parent/child aggregation pattern since the connector doesn’t know that your parent is a group and not a child. That is why your users are getting aggregated with an array of ids.

Check out partitioning and see if that solves your problem. If you figure it out, we would appreciate if you can share your solution back here for future readers. You could also make it a blog post :ambassador:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.