Api: use one callback for all methods