SSRS Rest API 报表修补程序不会更新参数



我在本地有rdl文件,我想使用SSRS Rest API来更新报表服务器中的报表(如果有任何更改)

我使用PATCH将请求发送到报表服务器。这样的

BaseUrl: http://<report_server_ip>/reports/api/v2.0/reports(d0d2791e-b332-4d45-a233-579e86c1fc70)
Method: PATCH
Content Type: application/json
Body:
{    
"Name":"My Report",
"Description": "",
"Path": "/Test/My Report",
"Type": "Report",
"Hidden": false,
"Content":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxSZXBvcnQgTXVzdFVuZGVyc3RhbmQ9ImRmIiB..."
}

对于Content,我打开rdl文件并读取所有字节并将其转换为Base64字符串。这样的:

content=File.ReadAllBytes(path) //path is the local rdl file path
Convert.ToBase64String(ASCII.GetBytes(content))

如果我在文本编辑器(notepad++)中打开rdl文件,我看到报表参数XML节点已经更改,但是当我发送PATCH请求时,报表服务器中的报表参数没有更新。

下面是SSRS Rest API的链接:https://app.swaggerhub.com/apis/microsoft-rs/SSRS/2.0#/Reports/UpdateReport

为了使用SSRS Rest API更新参数,必须在body中传递HasParameters: true

如果没有设置HasParameters,则API不会更新参数。

最新更新