Web Services Config Help - JSON response attribute value as context URL

Hello,
I am working on a webservice connector configuration - Need suggestion on how to use the JSON response attribute value of Aggregation 1 as “Context URL” for Aggregation 2.

Ex: “nextRecordsUrl” attribute will be returned in JSON response after aggregation 1. Need to substitute the attribute value of “nextRecordsUrl” as contextURL for aggregation 2.
I have tried defining the value "$response.nextRecordsUrl$ directly in context URL field of aggregation 2, but that doesn’t work.

Please advise.

Thanks

Doc page for reference: Aggregation

The response from the Aggregation. URL is always same or different?

The response from the initial aggregation - Aggregation 1 (I think you are referring to “nextRecordsUrl” attribute with Context URL) is different every time. However, You can hardcode the value received for “nextRecordsURL” in aggregation Operation 2. But, While running the aggregation, It won’t pick any new users that have been created after you have fetched and hardcoded the context URL.

Hi @vamperayani,

Welcome to the SailPoint Developer Community!

We need to enter the Context URL specific to our operation. Then connector appends the context URL to the source’s Base URL.

Only attribute response from account aggregation-1 can be mapped to account aggregation-2 based on my understanding.

-Vasanth

Hi Vasanth,
“nextRecordsUrl” is one of the attribute in Aggregation 1 response. I want this response value to be substituted as Context URL in Aggregation 2 dynamically. Will this be possible?

Thanks,
Karthik

Yes that is possible.

Assume that after running Aggregation1 you received some response.

[
 {
   .........
   "nextRecordsUrl":"",
   ............
 }
]

Something like this. Now you want to use this variable in the next Aggregation2 api call.
So for this Aggregation2 API call would be crafted something like this:
“$response.nextRecordUrl$” In case this needs to be added to some endpoint so the call will look like: “/api/$response.nextRecordUrl$”.

NOTE: This will first run the Aggregation 1 api call and then form there it will goto the Aggregation 2 api call and pull the rest of the information for this particular user which was aggregated by the Aggregation 1 api call.

P.S if your usecase is something like.
“Users are aggregated using Aggregation 1 api call and then next set of users who needs to be aggregated the API call for those will be present in nextRecordUrl, then rather than setting up the Aggregation2 api endpoint you will have to setup the pagination for Aggregation 1 api call.”

Hope this helps :slight_smile:

1 Like

Hi Venkat,

You can follow the @neeraj99 steps, and make sure that you have to add schema response path in the 1st Aggregation Operation for the next user value to read it for 2nd Aggregation Operation as a response.

Thanks,
Siva.K

Thanks Neeraj. Tried the steps you have advised - Still I am not getting the expected results. Do you have any link to documentation supporting this particular use case?

Thanks,
Karthik Amperayani

If you don’t mind sharing the steps that you do to perform the agg. via Postman maybe we can help. Or if you could share the api document link here, i could have a look and see what could be done.

Thanks Neeraj again for helping us out.

Here’s the information you have requested.

Sample Result after first RUN:

"totalSize": 3562,
"done": false,
"nextRecordsUrl": "/services/data/v58.0/query/ABCDWXYZ-2000",
"records": [
    {
        "attributes": {
            "type": "User_Provisioning__c",
            "url": "/services/data/v58.0/sobjects/User_Provisioning__c/a2WiAdX20127654a"
        },
        "Id": " a2WiAdX20127654a ",
        "Name": "USR-0000004",
        "E_mail_address__c": "[email protected]",
        "Entity_ID__c": "23456",
        "First_Name__c": "FN100201",
        "Last_Name__c": "LN100201",
        "Team_Lead_Manager__c": null,             
        "Status__c": "Active",
        "User_ID__c": "Cit10021",
    },

   ```

multiple
lines

Hi Neeraj,
Did you get a chance to look at the details I have provided?
Thanks in advance.

Regards,
Karthik

@vamperayani This should work for the case:

TERMINATE_IF $response.done$ != FALSE
$endpoint.fullUrl$ = $application.baseUrl$ + $response.nextRecordsUrl$

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