and more in a single search tool across platforms. Read the announcement here. |
02/24/2024 06:06 AM
I tried searching through the forums for a similar issue but couldn't find anything relevant.
I have a system that returns a list of account names in an array. I want to pass this into a second call to get detailed information about the accounts. Sadly, there is no endpoint where I can get the full list of information in one request.
An example response from the API is as follows:
Call1
{
"data": {
"values": [
"foo",
"bar",
"baz"
]
}
}
Call2
{
"data": {
"id": "1234",
"name": "foo",
"created": "2024-02-01T00:00:00.00000000Z",
"disabled": false
}
}
I've tried processing this with the following JSON configuration to no avail:
{
"accountParams": {
"connection": "auth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"listField": "data.values",
"keyField": "accountID",
"http": {
"url": "https://the.endpoint.com/users",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpHeaders": {}
},
"colsToPropsMap": { "accountID": "~#~char", "name": "~#~char" }
},
"call2": {
"callOrder": 1,
"keyField": "accountID",
"nextApiKeyField": "accountID",
"http": {
"url": "https://the.endpoint.com/users/${accountID}",
"httpMethod": "GET",
"httpContentType": "application/json",
"httpHeaders": {}
},
"inputParams": {
"dependentCall": true
},
"colsToPropsMap": {
"accountID": "data.id~#~char",
"name": "data.name~#~char",
"createdon": "data.created~#~date",
"status": "data.disabled~#~bool",
"displayName": "data.name~#~char"
}
}
}
}
}
Running this returns log entries like the following for each of the items in Call1:
INFO: Account Name is null, record not saved.
Exception in RestUtil.getAt : groovy.lang.MissingPropertyException: No such property: for class: java.lang.String
Possible solutions: class, bytes, empty
I have showLogs set in the connection and I do see a successful response with the data from Call1 in the logs. I am guessing that there's some special syntax needed for colsToPropsMap when the field is just a string, but I can't find a relevant example in any of the documentation.
02/24/2024 07:44 AM
This is not supported its similar use case like crowdstrike application
https://ideas.saviynt.com/ideas/EIC-I-5499
Refer similar https://forums.saviynt.com/t5/identity-governance/rest-api-crowdstrike/m-p/74287/emcs_t/S2h8ZW1haWx8...
02/24/2024 10:10 AM
Hmm that seems a little different then what you've linked. I don't need to post with a request body for the second call. The URL parameter substitution via dependentCall will work in my case. Unless just processing the array of string is what's not supported...then yes I'm in the same boat.
02/24/2024 10:33 AM
Its same use case
02/24/2024 11:26 AM
Thanks. In that case, I'll probably just make a proxy layer to translate the response into a format Saviynt can understand and keep the connection JSON configuration simple.
02/24/2024 10:15 AM - edited 02/24/2024 10:16 AM
@sb can you help clarify your "currently not supported comment" in the issue @rushikeshvartak linked above
03/05/2024 08:57 AM
Here is a sample with multi calls for Account import:
{
"accountParams": {
"connection": "acctAuth",
"statusAndThresholdConfig": {
"inactivateAccountsNotInFile": false
},
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://abc.com/users",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "ENABLED",
"inactive": "DISABLED"
},
"colsToPropsMap": {
"accountID": "name~#~char",
"name": "name~#~char"
}
},
"call2": {
"callOrder": 1,
"stageNumber": 1,
"http": {
"url": "https://abc.com/users/${accountName}",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpMethod": "GET"
},
"inputParams": {
"dependentCall": true
},
"listField": "",
"keyField": "accountID",
"nextApiKeyField": "accountID",
"colsToPropsMap": {
"accountID": "name~#~char",
"name": "name~#~char",
"status": "status~#~char",
"customproperty4": "email~#~char",
"Privileged": "admin~#~char"
}
}
}
}
}