0

My goal is to exectue a DAX query in Azure Analysis Services using python in linux. I have tried many solutions and now I am facing this. I want to create HTTP POST to xmla endpoint. Is it even possible? The following request returns 400 Bad Request.

import requests

token = ""

url = "https://<server>.asazure.windows.net/xmla"

headers = {"Authorization": f"Bearer {token}"}

data= """
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">  
   <Command>  
      <Statement>  
         SELECT 1 
      </Statement>  
   </Command> 
</Execute>  
"""

response = requests.post(url=url, headers=headers, data=data)
Mozgawa
  • 115
  • 9

0 Answers0