Getting list of images in a category / Category

I am integrating gallery into my mobile app. The table bagallery_items seems to have everything (including deleted ones), and it doesn't have any column like state or published. How do I get only the list of active/published images in a category? Please let me know.

Replies are visible only to logged in members with an active subscription.