Handle request on api.