and more in a single search tool across platforms. Read the announcement here. |
10/11/2022 02:26 AM
Hi,
Thus, here the 2nd API need to be invoked in loop to check status. Can we perform user import by invoking multi requests with a looping logic as mentioned above i.e the 2nd API need to be invoked till it returns status as completed.
Thanks
Prajakta
10/19/2022 11:24 PM
Please check the REST Connector guide and look for Support for Multiple API calls
It uses ${userIdentifier} to loop through users to get more data.
10/19/2022 11:52 PM
Thank you for replying.
Issue is not invoking 2nd API call to get user's more data. Application provides data by below API calls:
1. API call 1 to Submit request. A request is submitted at application to retrieve user data.
2. API call 2 : check if the submitted request from call 1 is completed or not. If the request is completed user data will be returned in response else it will return Request status is pending.
Now, the 2nd call needs to be invoked by providing request ID till it returns the data.
Appreciate if you could provide some insights to achieve the integration
10/20/2022 12:18 AM
Binding response values from one call to another -
The REST connector uses response values of one call as input parameter into another call for multiplecalls. In the following example, the first API call gets descriptor ID for the requested account and the value of the descriptor ID is used as input in the next API call.
{ "accountIdPath": "call1.message.id", "dateFormat": "yyyy-MM-dd'T'HH:mm:ssXXX", "call": [ { "name": "call1", "connection": "userAuth", "url": "https:/<domain name>/2.0/users", "httpMethod": "POST", "httpParams": "{\"login\":\"${user.username}\",\"name\": \"${user.firstname}\"}", "httpHeaders": { "Authorization": "${access_token}" }, "httpContentType": "application/json", "successResponses": { "statusCode": [ 201 ] } }, { "name": "call2", "connection": "userAuth", "url": "https:/<domain name>/2.0/folders", "httpMethod": "POST", "httpParams": "{\"name\":\"${response.call1.message.name}_${response.call1.message.id}\",\"parent\":{\"id\":\"0\"}}", "httpHeaders": { "Authorization": "${access_token}" }, "httpContentType": "application/json", "successResponses": { "statusCode": [ 201 ] } } ] }
10/20/2022 12:30 AM
Appreciate your response and reference json showcasing binding parameters among API calls.
However, will it loop the 2nd call till request submitted in 1st call is completed? The submitted request at the application side might take few seconds to 30mins to process and send data in response. Thus not sure how long the 2nd API call invocation is required. How to keep on looping or adding wait in REST connector configuration??
10/20/2022 04:32 AM
If Api takes 30 min to process add timeout configuration in custom_json
10/20/2022 04:49 AM
The API response will be immediate if request at the application side not completed then response will be Pending Request and if application side request completed then response will have user data.
Having said this :
1. How to invoke 2nd API till request is completed
2. Or how to add a delay for invoking 2nd API.
I think Timeout configuration wont help in any such scenario
10/20/2022 06:07 AM
Yes you can loop on response
10/20/2022 08:01 AM
Appreciate your response. The callCondition and callListPath is available for Provisioning operation and not in ImportUserJSON