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

Need help with ImportAccountEntJSON JSON

draut
New Contributor III
New Contributor III

Hi, I need help with ImportAccountEntJSON.

I am getting API responses in XML format as given in the sample:

<?xml version='1.0' encoding='UTF-8'?>
<roles>
    <role>
        <id>123</id>
        <name>Admin</name>
        <users>
            <user>
                <email>abc@xxx.com</email>
            </user>
            <user>
                <email>bcc@xxx.com</email>
            </user>
        </users>
    </role>
    <role>
        <id>456</id>
        <name>User</name>
        <users>
            <user>
                <email>abc@xxx.com</email>
            </user>
            <user>
                <email>dcj@xxx.com</email>
            </user>
        </users>
    </role>
</roles>

Need help with the sample template for ImportAccountEntJSON JSON.

Regards,

Dheeraj

Dheeraj
3 REPLIES 3

RakeshMG
Saviynt Employee
Saviynt Employee

Please try 

{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<url>/api/v2/search.json?query=type:user%20created%3E${maxAccountsUpdateDate.toString().replace(' ','T').substring(0,19)}Z",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "results",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "email~#~char",
"displayName": "name~#~char",
"customproperty2": "email~#~char",
"customproperty3": "created_at~#~char",
"customproperty4": "updated_at~#~char",
"customproperty5": "role~#~char",
"status": "active~#~char",
"customproperty6": "last_login_at~#~char",
"customproperty7": "custom_role_id~#~char",
"customproperty8": "default_group_id~#~char",
"customproperty9": "created_at~#~char",
"customproperty10": "updated_at~#~char",
"customproperty11": "suspended~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Group": {
"entTypeOrder": 0,
"entTypeLabels": {
"customproperty1": "Deleted",
"customproperty2": "CreatedAt",
"customproperty3": "UpdatedAt"
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<url>/api/v2/groups",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "deleted~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "updated_at~#~char"
},
"disableDeletedEntitlements": true
}
}
}
}
},
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"Group": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpEntToAcct",
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://<url>/api/v2/groups/${id}/memberships.json",
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"listField": "group_memberships",
"entKeyField": "entitlementID",
"acctIdPath": "user_id",
"acctKeyField": "accountID"
}
}
}
}
}
}

 

For more details on Rest connector Json please refer to https://docs.saviyntcloud.com/bundle/REST-v2020x/page/Content/Developers-Handbook.htm

 

https://docs.saviyntcloud.com/bundle/REST-v2020x/page/Content/Examples-for-JSON-Construction.htm


​Regards

Rakesh M Goudar

draut
New Contributor III
New Contributor III

Hi Rakesh, Thanks for the reply.

I have only one API for the import job and it is returning the list of all available roles and their members in a single call, a response I have already mentioned hence need help with that, also what should be the listField for entitlementParams & accountParams as per response.

Dheeraj

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @draut 

You can convert the Api response to JSON and map it. ( in the JSON you just need to pass it in Headers to accept like below )

"httpHeaders": {
        "Accept": "application/json"}

 Also you can check the rest connector guide how to map for accounts/roles and mapping in the documentation- 

https://docs.saviyntcloud.com/bundle/REST-v2020x/page/Content/Developers-Handbook.htm

Once you have created the json and tested and still face a issue, then please let us know with Api call and response in json ( via postman ) and the JSON you tried/created.

 

Thanks

Darshan