How to get filters and boards related to a specific project using java api

Hi,

As part of cleanup activity, i have to delete all boards et filters related to inactive projects.
Any idea how to get them using java api?

Thanks
Ahmed