Base api framework