api base framework