Added api function to support simple endpoints