and more in a single search tool across platforms. Read the announcement here. |
01/25/2023 07:47 AM
How can we parse such response returned from GET API call. Following is the full response
[
{
"key": "APPLICATION_NAME",
"value": "Gitlab"
},
{
"key": "GROUP_CATEGORY",
"value": "CTB"
},
{
"key": "GROUP_PRIMARY_OWNER",
"value": "Test1"
},
{
"key": "GROUP_SECONDARY_OWNER",
"value": "Test2"
}
]
01/25/2023 12:41 PM
Can you elaborate on the use case to be achieved and what is the data to be pulled from your Get API call response ?
Example : If you want to retrieve the value "Gitlab", you can reach it using the following :
response.call1.message[0].value
Where "call1" is the name of your Get API call.
01/26/2023 08:49 PM
which json you want to achieve ?
01/26/2023 10:43 PM
Can you please add more insight which operation you are trying to achieve?
01/30/2023 07:58 AM
Hi @adriencosson @rushikeshvartak @Manu269
We are trying to dump Gitlab groups and their custom attributes (part of different REST api) into Saviynt. Following is the entitlementParams configuration.
"entitlementParams":
{
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"supportedEntitlementTypes": [
"Group"
],
"entTypes": {
"Group": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://Valid_Domain/api/v4/groups?per_page=100",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',').size()==4?headers.Link.split(',')[1].replace('<', '').replace('>; rel=\"next\"','').trim():(headers?.Link?.split(',')?.size()==3 && headers?.Link.contains('next')) ?headers.Link.split(',')[0].replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
},
"makeProcessingStatus": true,
"disableDeletedEntitlements": true
},
"call2": {
"callOrder": 1,
"stageNumber": 2,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://Valid_Domain/api/v4/groups/{hardcoded group id}/members",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"customproperty1": "${response.call2.message[0].key}~#~char"
}
}
}
}
}
}
"Call1" pulls all gitlab groups and "Call2" will pull custom attributes of each group. Response format of Call2 is
[
{
"key": "APPLICATION_NAME",
"value": "Gitlab"
},
{
"key": "GROUP_CATEGORY",
"value": "CTB"
},
{
"key": "GROUP_PRIMARY_OWNER",
"value": "Test1"
},
{
"key": "GROUP_SECONDARY_OWNER",
"value": "Test2"
}
]
first we wanted to see how to retrieve GROUP_PRIMARY_OWNER and GROUP_SECONDARY_OWNER values in customproperty and later populate the same in entitlement owner tab in Saviynt.
01/30/2023 08:37 AM
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementid": "${response.call2.message[0].key}~#~char",
"entitlement_value": "${response.call2.message[0].key}~#~char",
"customproperty1": "${response.call2.message[0].value}~#~char"
01/30/2023 08:48 PM
Hi @rushikeshvartak do i need to do this for all custom attributes if above solution works.
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementid": "${response.call2.message[0].key}~#~char",
"entitlement_value": "${response.call2.message[0].key}~#~char",
"customproperty1": "${response.call2.message[0].value}~#~char"
"entitlementid": "${response.call2.message[1].key}~#~char",
"entitlement_value": "${response.call2.message[1].key}~#~char",
"customproperty2": "${response.call2.message[1].value}~#~char"
similarly for message[3] and message[4]?
01/30/2023 09:33 PM
Yes
01/31/2023 03:44 AM
Thanks @rushikeshvartak for quick revert.
i tried above configuration and my entitlement import job was successful but could not find dumped values inside entitlement_values table, tried with this query
select * from entitlement_values where entitlementid='APPLICATION_NAME'
if i go to that particular gitlab group (call2 in config) under entitlements then customeproperty1 is blank so not sure where to look for it.
"entitlementParams":
{
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"supportedEntitlementTypes": [
"Group"
],
"entTypes": {
"Group": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 1,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://Valid_Domain/api/v4/groups?per_page=100",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',').size()==4?headers.Link.split(',')[1].replace('<', '').replace('>; rel=\"next\"','').trim():(headers?.Link?.split(',')?.size()==3 && headers?.Link.contains('next')) ?headers.Link.split(',')[0].replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
},
"makeProcessingStatus": true,
"disableDeletedEntitlements": true
},
"call2": {
"callOrder": 1,
"stageNumber": 2,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://Valid_Domain/api/v4/groups/{hardcoded group id}/members",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "${response.call2.message[0].key}~#~char",
"entitlement_value": "${response.call2.message[0].key}~#~char",
"customproperty1": "${response.call2.message[0].value}~#~char"
}
}
}
}
}
}
01/31/2023 04:28 AM
Replace supportedEntitlementTypes to entTypes
refer samples https://saviynt.freshdesk.com/support/solutions/articles/43000521736-rest-connector-guide%C2%A0#REST...
01/31/2023 08:41 AM
Hi @rushikeshvartak tried both replacing and removing "supportedEntitlementTypes" but still not able to find values dumped in entitlement_values table or in customproperty on entitlement UI.