api: fix unraised exception.
api: use only keyword arguments when calling api methods.