Forum Discussion
Connection to IBM Cognos TM1 via Web using Restapi
- Anonymous6 years ago
Thanks for your support@v-lid-msft
I have removed the paresdJSON.
Fianlly the below code works for me and return the value:
let
url = "http://host:8000/api/v1/ExecuteMDX?$expand=Axes($select=Ordinal;$expand=Tuples($count;$expand=Members($select=Name))),Cells($select=Ordinal,Value)",
body = "{
""MDX"": ""SELECT {([kh_bgkto].[zTest1])} on 0,{([kh_ges].[test])} on 1 FROM [kh_bg] WHERE ([kh_verf].[KV1],[kh_jahr].[J02],[kh_perio].[P12C],[kh_versi].[V01],[kh_kons].[B01],[kh_konz].[KF01])""
}",
Source = Json.Document(Web.Contents(url, [Headers=[#"Authorization"="Basic YWRtaW46", #"Content-Type"="application/json"], Content = Text.ToBinary(body)
])),
in
Source
Hello v-lid-msft ,
Once again thanks for the support.
As you suggested, when I remove the credentials , its saying the below error:
Is it a security breach or its not safe enough to expose credentials in the url in Power BI. User info is the encoded one.
Hi Anonymous ,
Apology for our misleading reply, we want to suggest you to delete the credential of the query in your reply of this forum. Please keep your actual query if it has been working successfully.
Best regards,