API code initial commit

API code initial commit