    def service_from_spec(self, spec) -> Optional[Service]:
        """Create service from api request"""
        service = self.app.service_from_spec(spec, from_config=False)
        self.db.commit()
        return service
Create service from api request
jupyterhub/apihandlers/services.py