finish foundation of api layer