Filtering only shared instances from all filters returned

I am using API with api-token. Requesting from GET /filters I get all filters: shared and private. Im trying to figure out the easiest way to filter off results that are set private since I’m only interested in shared filters.

I see there is “visible_to” field for filter (values 1 and 7 are returned, 1 for private filter and 7 for shared). Could this be used to achieve my goal? Is it reference to visibility groups and if yes, are there some kind of default group IDs which are same for all pipedrive accounts (so that same values apply for our sandbox and production accounts)? I can see only 1 visibility group (Default group) in our settings in UI though.

Oddly, I’m getting the reverse. I can only see shared filters!

Are you using api-token as well?

API token works fine. I can’t see private filters with OAuth token.

Hi @vniska

Your assumption is correct.

“visible_to”: “1” // is a private filter

“visible_to”: “7” // is a shared filter, can be created by other Pipedrive user within your company

Visibility groups is a different concept and does not effect filters to my knowledge.

So, in order to get shared filters, make GET /filters and filter by "visible_to": "7".

1 Like

Hi @Kurt_Jones

I just tried to GET /filters with OAuth token and I got private and shared filters. The scope I had is deals:read.

What OAuth scope(s) do you have for your OAuth token?

1 Like