API: Filter results in a GET request

Dear,

Could anyone explain how we can filter the results of a GET request?

For example, if I would like to get all companies with Country = “FR”. The request I constructed looks like this:

{{url}}/api/v4/f/{{firmId}}/companies?$filter=country eq “FR”

However, I still get all companies. How should I build the request in order to filter the results ?

Thanks in advance,

Ward

Hi Ward,

Our API currently does not support URL filtering.
You’ll have to fetch all the companies locally until you’ve retrieved the full data set, and then perform the desired filtering in the retrieved results.

I hope this helps.
Let me know if you have any more questions.

Kind Regards,

Jelle

Hello Jelle,

Thank you for the quick response.

I will work around it. Is this something which is in the roadmap somewhere in the (near) feature ?

Kind regards,

Ward

Hi Ward,

At this time we are looking at alternative options (GraphQL at some point), but so far little is known about the priority of this filtering.
We’re currently still in the process of moving all API developers from v3 to v4, which is the version that allows multi-stack usage. So my guess would be that this request has low priority on the roadmap and won’t be for any time soon.

Which doesn’t mean that we’re looking already at potential options to allow this, just that it will take some time to implement this in our current version of the API.

Hope this helps!

Kind Regards,

Jelle

This helps, thank you !

Hi Jelle,

I was searching the community to look for the possibility to use URL filtering in your API. I am wondering if it is still the plan to add the URL filtering to the Silverfin API, the companies endpoint in particular?

We are currently experiencing some performance issues in our applications using this endpoint, since we don’t know the company_id beforehand, so we have to get all the companies and filter our outcome. This takes the system quite some time since we are serving a whole lot companies on the Silverfin site and we are only expecting this amount to rise.

Thank you,
Laura

Hi Laura,

There are no plans at this time to implement URL filtering to this endpoint, a recent change was to add an additional parameter to this endpoint called ‘file_code’ which allows you to filter the result on this parameter alone.

Is this a potential solution to avoid having to fetch all the pages in this endpoint?

You can try out this call with this additional parameter here:

Hello Jelle,

Thank you for your quick response. That solves our problem !

Kind regards,

Ward

1 Like

Yes this helps, thank you!

1 Like