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

How to create dynamic attribute of type "SQL ENUM" with Saviynt REST API?

alc
Regular Contributor
Regular Contributor

Hello,

When I create a "SQL ENUM" dynamic attribute with following definition with REST API:

        {
            "accountscolumn": "customproperty4",
            "hideoncreate": "false",
            "attributegroup": "Account Attributes",
            "orderindex": "104",
            "attributevalue": "SELECT ev.entitlement_value AS ID FROM entitlement_values (where clause....) ORDER BY ev.entitlement_value;",
            "editable": "true",            
            "attributename": "pgroup",
            "attributelable": "pgroup",
            "required": "false",            
            "hideonupdate": "false",
            "requesttype": "ACCOUNT",
            "showonchild": "false",
            "attributetype": "SQL ENUM"
        }
it returns failure msg like below:
{
    "msg": "Failure",
    "dynamicattributes": {
        "pgroup": {
            "attributetype": "attributetype is not valid"
        },
What's wrong with the attribute definition?
If I create it on UI and export it with REST API, it shows the attribute type "SQL ENUM".  Not sure why I cannot use it in REST API?
Please help!
 
thanks,
ALC
 
7 REPLIES 7

CR
Regular Contributor III
Regular Contributor III

@alc  can you  send me full query please "attributevalue"


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

alc
Regular Contributor
Regular Contributor

Hello CR, Thanks for your review.

Here is the SQL statement I use (note the comma at the end as this attribute is not last one in JSON):

"attributevalue": "SELECT ev.entitlement_value AS ID FROM entitlement_values ev JOIN entitlement_types et ON ev.entitlementtypekey = et.entitlementtypekey JOIN endpoints ep ON et.endpointkey = ep.endpointkey WHERE et.entitlementname = 'MyEntitlementType' AND ep.endpointname = 'MyEndpointName' ORDER BY ev.entitlement_value;",

I have verified the SQL statement in Data Analyzer before I use it.

Thanks

CR
Regular Contributor III
Regular Contributor III

@alc  can you try like pass lower case please

select ev.entitlement_value as ID from entitlement_values ev join entitlement_types et on ev.entitlementtypekey = et.entitlementtypekey join endpoints ep on et.endpointkey = ep.endpointkey where et.entitlementname = 'myentitlementtype' and ep.endpointname = 'myendpointname' order by ev.entitlement_value;",

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

alc
Regular Contributor
Regular Contributor

No luck with lower case either. do you have an env to try out please? 

 

rushikeshvartak
All-Star
All-Star

Use SQLENUM


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

alc
Regular Contributor
Regular Contributor

Hello Rushikesh,

I tried with SQLENUM, it does not work, it returns same error message. Can you try from your end?

By the way, I use V24.2, probably version issue? I remember it works before.

Thanks

Its defect with v24.2  Please raise support ticket

rushikeshvartak_0-1708438192742.png

 


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