我想通过建立一个空查询,然后在高级编辑器上填入rest API,headers,body等参数,获取Oracle云上的数据。M函数写好后也没有语法错误,但运行时却提示:(405)Method Not Allowed。请各位指教,谢谢。
具体提示如下图:
具体代码如下:
let
url="<请输入URL>",
// Replace the following with your own JSON object
requestBody = "{
""exportPlanningData"": false,
""gridDefinition"": {
""suppressMissingBlocks"": true,
""pov"": {
""dimensions"": [
""HSP_View"",
""Years"",
""Scenario"",
""Version"",
""Entity"",
""Product"",
""Analysis"",
""DataType"",
""Channel"",
""Currency""
],
""members"": [
[
""BaseData""
],
[
""FY21""
],
[
""PLAN_100_2021""
],
[
""Working""
],
[
""No Entity""
],
[
""No Product""
],
[
""No Analysis""
],
[
""No DataType""
],
[
""No Channel""
],
[
""IDR""
]
]
},
""columns"": [{
""dimensions"": [
""Period""
],
""members"": [
[
""IDescendants(Q1)""
]
]
},
{
""dimensions"": [
""Period""
],
""members"": [
[
""IDescendants(Q2)""
]
]
}
],
""rows"": [{
""dimensions"": [
""Account""
],
""members"": [
[
""FX Rates - Average""
]
]
}]
}
}",
Source= Json.Document(Web.Contents(url, [Headers=[#"Authorization"="Basic <请输入身份认证>",#"Content-type"="application/json"]]))
in
//every script must end with “in”, this variable beneath will be the one returned
Source
数字将军