Python Invoke Rest Api Methods