first rough cut of php api