add basic API for resources