api functioning