Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

REST Connector - Mapping Child Entitlement to Parent Entitlement

UwarajWaman
New Contributor III
New Contributor III
Hi,
 
I am working on a REST based connector with 2 entitlement types namely "Space" and "SpacePermission". Each "Space" has multiple "SpacePermissions".
 
Following is my API response for reading "SpacePermission" for a "Space" with EntitlementID as "~565117918" -

 

{
    "results": [
        {
            "key": "~565117918",
            "name": "Test Space 1",
            "permissions": [
                {
                    "id": 249135157,
                    "subjects": {
                        "group": {
                            "results": [
                                {
                                    "type": "group",
                                    "name": "site-admins",
                                    "id": "a7f6277b-c40b-4cbf-bcbc-51925e91a7c9"
                                }
                            ]
                        }
                    },
                    "operation": {
                        "operation": "administer",
                        "targetType": "space"
                    }
                },
                {
                    "id": 249135164,
                    "subjects": {
                        "group": {
                            "results": [
                                {
                                    "type": "group",
                                    "name": "site-admins",
                                    "id": "a7f6277b-c40b-4cbf-bcbc-51925e91a7c9"
                                }
                            ]
                        }
                    },
                    "operation": {
                        "operation": "delete",
                        "targetType": "page"
                    }
                }
            ]
        }
    ]
}​

 

I want to add "SpacePermission" as child entitlement to "Space" entitlement.

My "entMappingParams" configuration looks like -

 

"entMappingParams": {
    "processingType": "SequentialAndIterative",
    "entTypes": {
        "Space": {
            "ent1KeyField": "entitlementID",
            "call": {
                "call1": {
                    "connection": "acctAuth",
                    "callOrder": 0,
                    "stageNumber": 0,
                    "http": {
                        "httpHeaders": {
                            "Authorization": "${access_token}"
                        },
                        "url": "https://#######/api/space?spaceKey=${entitlementID}&expand=permissions",
                        "httpContentType": "application/json",
                        "httpMethod": "GET"
                    },
                    "listField": "results[0].permissions",
                    "ent2IdPath": "id",
                    "ent2KeyField": "entitlementID",
                    "targetEntType": "SpacePermission",
                    "addDependentTask": true,
                    "removeDependentEntTask": true,
                    "mappingTypes": [
                        "ENT2"
                    ]
                }
            }
        }
    }
}

 

 

 
I don't know what to put in "ent1IdPath" and if specifying ${entitlementID} in url is allowed in "entMappingParams".
 
Any pointers regarding how may I be able to achieve this?
 
1 REPLY 1

rushikeshvartak
All-Star
All-Star
"addDependentTask": true,
                    "removeDependentEntTask": true,

this applicable for ENTMAP hence remove from ENT2

 

ent1IdPath= results.key


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.