EPM RESTAPI filter Active not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

EPM RESTAPI filter Active not working

L1 Bithead

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

8 REPLIES 8

L4 Transporter

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

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.

 

Field_Content_versions_oct20__0682J00000DKqOlQAL.png

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

Hi guys, this is what I get after correcting it with the $.

 

Field_Content_versions_oct20__0682J00000DKrtuQAD.png

try without enclosing True in quotes:

 

https://<EPM Server>/EPM/api/sets/SET_ID/Policies?filter=Active eq True

Not in EPM, but for a PAS API endpoint which uses the filter parameter, with this format I got expected results.

L1 Bithead

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?Field_Content_versions_oct20__0682J00000DL1SYQA1.png 

 

Try use apostrophes with the True (i.e. Active eq 'True')

I am getting a EPM000004E Permissions error? any clues

  • 566 Views
  • 8 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!