parsing request in the class Api