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

SSM API: Assign Multiple Entitlements To Account in a single API call

AS5278
Regular Contributor II
Regular Contributor II

Hi All,

I am making use of a Saviynt API for assigning entitlements to an account for an endpoint. Below is the API being used:

{{url}}/ECM/{{path}}/assignAccountToEntitlement

The Saviynt API documentation states: This method provisions one or more "Entitlements" to an "Account".

Lets say the request body for this API(as per documentation) is as below:

{
"securitysystem" : "GitHub4",
"endpoint": "GitHub-Enterprise-SAAS-4",
"accountname": "**1736",
"entitlementtype": "Repository",
"entitlementvalue": "orgname~savyinttest1"
}
 
The above works as expected, but how do I pass multiple entitlements in a single call?. The above only accepts one 'entitlementvalue'. In the documentation it says that 'one or more' entitlements can be assigned to account using this API.
 
I tried below ways but they don't work:
Way 1: "entitlementvalue": "orgname~savyinttest1,orgname~savyinttest2"
 
Way 2: "entitlementvalue": ["orgname~savyinttest1","orgname~savyinttest2"]
 
Way 3:
"entitlementvalue": "orgname~savyinttest1",
"entitlementvalue2": "orgname~savyinttest2"
 
I can use a loop to achieve this using multiple calls to the API..but is it possible to do it in a single call?.
 
Please advice.
 
Thanks,
Atul Singh
xurde
3 REPLIES 3

AmitM
Valued Contributor
Valued Contributor

HI @AS5278 , I don't think multiple entitlements in one API call is possible. Rest , let's wait if somebody else to say different.

Thanks,

Amit

 

rushikeshvartak
All-Star
All-Star

Only single entitlement can be assigned using api. This same way it works on UI also where per add / remove access task add/ remove access json is called


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

PremMahadikar
Regular Contributor III
Regular Contributor III

@AS5278 

This cannot be achieved using the assignAccountToEntitlement API call. 

But just for info, there is another API - {{url}}/ECM/{{path}}/createrequest where you can pass multiple entitlements in one call (difference: This API request would create request ID)

Thanks,
Prem