and more in a single search tool across platforms. Read the announcement here. |
02/23/2023 12:07 PM - edited 02/23/2023 12:09 PM
Hi, we are trying to take the response from call1 and for each Guid in the response from call1 we need to pass it to call2 in the url, however it seems like whatever is inside the curly braces (bolded in the below JSON) is being taken as part of the url and not being evaluated.
Here is our ImportAccountEntJSON:
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "<url>",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "text/json"
},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpParams": {},
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
}
},
"listField": "Rsp.Result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "Guid~#~char",
"name": "Guid~#~char"
}
},
"call2" : {
"callOrder" : 1,
"stageNumber" : 1,
"http": {
"url": "<url>/${response.call1.message.id}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "text/json"
},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpParams": {},
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
}
},
"listField": "Rsp.Result",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "Guid~#~char",
"name": "Guid~#~char",
"customproperty1" : "FirstName~#~char",
"customproperty2" : "LastName~#~char",
"customproperty3" : "ExpirationDate~#~char"
}
}
}
}
}
We are getting this error in the logs:
2023-02-23/19:54:39.634 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - callStageNumber : 1
2023-02-23/19:54:39.635 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - callStageNumber: 1
2023-02-23/19:54:39.635 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - stageNumber: null
2023-02-23/19:54:39.635 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - processAccountsFullBySequentialAndIterative - Not Multitrigger call
2023-02-23/19:54:39.635 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - Inside processAccountsFinal.
2023-02-23/19:54:39.639 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - Inside processAccounts.
2023-02-23/19:54:40.003 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - Inside pullObjectsByRest
2023-02-23/19:54:40.004 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestUtilService - Got showLogs = true
2023-02-23/19:54:40.004 [{}] [quartzScheduler_Worker-3] DEBUG rest.RestProvisioningService - Calling Webservice Url - https://btwn004553.corp.ads:4590/WebSdk/entity/${response.call1.message.id} with httpParams - [:]
2023-02-23/19:54:40.004 [{}] [quartzScheduler_Worker-3] DEBUG services.HttpClientUtilityService - isFipsEnabled = false
2023-02-23/19:54:40.004 [{}] [quartzScheduler_Worker-3] DEBUG services.HttpClientUtilityService - getHttpClient - sslParams : null
2023-02-23/19:54:40.004 [{}] [quartzScheduler_Worker-3] DEBUG services.HttpClientUtilityService - getHttpClient - proxyParams : null
2023-02-23/19:54:40.004 [{}] [quartzScheduler_Worker-3] DEBUG services.HttpClientUtilityService - getHttpClient - sslSocketFactory : null
2023-02-23/19:54:40.078 [{}] [quartzScheduler_Worker-3] DEBUG services.HttpClientUtilityService - getHttpClient - HttpClientBuilder.create().build() called.
2023-02-23/19:54:40.111 [{}] [quartzScheduler_Worker-3] DEBUG println.PrintlnToLogger - Println :: [1;31m| Error [22;39mjava.lang.IllegalArgumentException: Illegal character in path at index 48: https://btwn004553.corp.ads:4590/WebSdk/entity/${response.call1.message.id}[m
We also tried hard coding a Guid into the url which worked as expected. Just wondering if there is any solution for this, thanks.
Solved! Go to Solution.
02/23/2023 12:39 PM
You can use dependentCall variable in order to make this work. You can refer the sample json and its use from the below REST Connector guide
https://docs.saviyntcloud.com/bundle/REST-v2022x/page/Content/Developers-Handbook.htm