Entitlements owned by a user using API call

haardik_verma
Regular Contributor
Regular Contributor

We are trying to find a way to fetch the list of entitlements that a user owns via API call.

As an input to the call, we will have the username/userkey and in response we want all the entitlements for which the user is a owner of with the rank number and other details.

If we want the same details in UI, we use the query 

select u.username, eo.rank, ev.entitlement_value,
(select e.endpointname from endpoints e where e.endpointkey=et.ENDPOINTKEY) as 'Endpoint Name'
from
entitlement_owners eo
left join entitlement_values ev on ev.entitlement_valuekey=eo.entitlement_valuekey
left join users u on u.userkey=eo.userkey
left join entitlement_types et on et.ENTITLEMENTTYPEKEY=ev.ENTITLEMENTTYPEKEY
where u.username='USER ABC'

This gives the list of all the entitlements that the user ABC owns.

 

We are trying to use the {{url}}/ECM/{{path}}/getEntitlements call.

In the body, we are hoping to get the results using the entQuery.

The documentation says that it supports entitlement_values parameters but we are unable to use entitlement_valuekey.

haardik_verma_0-1689240187293.png

Please suggest if there is any better way to fetch the required details via API call.

 


Thanks & Regards,
Haardik Verma
2 REPLIES 2

nimitdave
Saviynt Employee
Saviynt Employee

You can explore an option to create runtime analytics and the use below saviynt api to get the details:

{{url}}/ECM/{{path}}/fetchRuntimeControlsData

Hi @nimitdave ,

This was really helpful. Thanks for the suggestion.

It did not work for us in AnalyticsV2.

We tried creating runtime analytics in V1 Analytics and the analytics was not working in UI but was giving perfect results when fetched via API.

Is this expected? Does the {{url}}/ECM/{{path}}/fetchRuntimeControlsData only consider V1 Analytics?

 

Also, when trying to do the same in our production environment, on opening the v1 analytics page in UI, we are getting these prompts:

haardik_verma_0-1689663667365.png

haardik_verma_1-1689663682768.png

What can be the issue here? The UI shows empty list for V1 analytics but when fetching list of analytics in prod env, we do see there is one analytics in V1.


Thanks & Regards,
Haardik Verma