Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Filter getOrganization API JSON response

dvijay
New Contributor II
New Contributor II

Hi,

We are trying to retrieve organizations list based on orgquery filter and display as drop down in external HTML form. JSON response from {{url}}/ECM/{{path}}/getOrganization contains lot of data about each organization. However, we would like to retrieve only organizationname from the array. Is there anyway to apply filter on JSON response?

 

Thanks

Vijay

4 REPLIES 4

PremMahadikar
All-Star
All-Star

Hi @dvijay ,

No, currently it's not working for getOrganization (like getOrganization?fields=organizationName,

customproperty1 like we can use for user?fields=username)

We had similar requirement in past and we choose analytics.

Please create an analytic report with desired columns and use Saviynt API to fetch organizationname.

{{URL}}/ECM/{{path}}/fetchControlDetailsES

 

If this answers your question, please consider selecting Accept As Solution and hit Kudos

dvijay
New Contributor II
New Contributor II

Thanks @PremMahadikar 

I have a follow-up question...

Does /fetchControlDetailsES endpoint support attribute value based query such as "orgQuery" : "c.organizationname like '%TestOrg5%'" in /getOrganization endpoint.

 

Thanks

Vijay

@dvijay,

This can't be achieved by /fetchControlDetailsES endpoint.

If your requirement is to again filter based on the report generated (which is again custom query), then to achieve this - you need to use runtime report:

Endpoint: {{url}}/ECM/{{path}}/fetchRuntimeControlsData

Working Example - Let's say this is your below query:

 

select c.CUSTOMERNAME from customer c where c.customername='${organizationname}'

 

The API body would look like:

 

{
    "requestor": "premmahadikar",
    "analyticsname": "orgnizationname",
    "analyticsid": "10",
    "attributes": {
        "organizationname": "TestOrg"
    }
}

 

The response would be:

 

{
    "result": [
        {
            "CUSTOMERNAME": "TestOrg"
        }
    ],
    "msg": "Success",
    "displaycount": 1,
    "total": 1,
    "errorCode": 0
}

 

If you find the above response useful, Kindly Mark it as Accept As Solution and hit Kudos

rushikeshvartak
All-Star
All-Star

Its not supported


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.