- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
02-14-2021 10:06 PM
Hi guys,
I need some help. I am running the following REST API call and filtering active = true but the json response body includes policies that are not active. Can someone point on what's wrong in my URI? Thanks.
https://na109.epm.cyberark.com/EPM/api/sets/SET_ID/Policies?$filter=Active=True
02-15-2021 02:43 AM
The format for the filter would be "Active eq True"
Detailed in the docs: https://docs.cyberark.com/Product-Doc/OnlineHelp/EPM/Latest/en/Content/WebServices/GetPolicies.htm
02-15-2021 05:29 PM
Hi pete.maan,
I have tried doing that. However, it's apparent to me either I am doing something wrong, or the REST API filter is not working. Even when I have filtered for Active eq True, the responses still contains Active eq false.
02-15-2021 07:38 PM
Hey @Tong Shen Yong
Can you please double check your request URL filter query?
https://<EPM_Server>/EPM/API/<Version>/Sets/<SetId>/Policies?$filter=PolicyType
I'm not able to test since I do not have EPM test tenant..
I think $ is missing .. please check otherwise I'm sure @Pete Maan will help you
02-16-2021 04:45 AM
Hi guys, this is what I get after correcting it with the $.
02-16-2021 06:20 AM
try without enclosing True in quotes:
https://<EPM Server>/EPM/api/sets/SET_ID/Policies?filter=Active eq TrueNot in EPM, but for a PAS API endpoint which uses the filter parameter, with this format I got expected results.
02-16-2021 07:03 PM
Hey pete.maan,
I tried doing that. However, the response is still Bad filter data. Could this be a bug within the get policies API?
02-18-2021 02:02 PM
Try use apostrophes with the True (i.e. Active eq 'True')
11-02-2021 08:11 AM
I am getting a EPM000004E Permissions error? any clues
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

