added api debug (not just for sporks anymore)