<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Report Server REST API - PUT method failing in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/303421#M2247</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/46344"&gt;@pdbenbow&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, I am not familiar with this problem. After research, I could not find the specific cause to this error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31487"&gt;@mgmeyer&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/8826"&gt;@jtarquino&lt;/a&gt;&amp;nbsp;might&amp;nbsp;have any comment on this problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuliana Gu&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2017 05:45:46 GMT</pubDate>
    <dc:creator>v-yulgu-msft</dc:creator>
    <dc:date>2017-11-15T05:45:46Z</dc:date>
    <item>
      <title>Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/298372#M2022</link>
      <description>&lt;P&gt;&lt;SPAN class="ng-binding"&gt;Power BI report server version&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ng-binding"&gt;1.1.6514.9163&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ng-binding"&gt;(October 2017)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="ng-binding"&gt;I'm writing a Python app to interact with the REST API. I'm pretty new to OData and REST,&amp;nbsp;and so far I've successfully called several GET methods,&amp;nbsp;but I started having a lot of trouble as soon as I switched over to PUT, POST, PATCH, etc.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="ng-binding"&gt;Here's a snippet of my Python which invokes the PUT method to update a given report's description field in the Catalog. I've been doing my best to mirror the documentation on SwaggerHub&amp;nbsp;&lt;A href="https://app.swaggerhub.com/apis/microsoft-rs/PBIRS/2.0#/CatalogItems/UpdateCatalogItemProperties" target="_blank"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    def update_report(self, report_id, description):
        path = self.path + '/CatalogItems({:s})/Properties'.format(report_id)
        payload = {"description": description}
        return requests.put(path, 
                            # data = json.dumps(payload),
                            json = payload, 
                            auth = HttpNtlmAuth(self.username, self.password))&lt;BR /&gt;&lt;BR /&gt;myResponse = rs.update_report(&lt;BR /&gt; "67d2c423-aeb5-4893-8db8-d6ae59dff412",&lt;BR /&gt; "This is a test to update the report description")&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="ng-binding"&gt;When I run this code, the Python console spits back the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="ng-binding"&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://localhost/PBIReports/api/v2.0/CatalogItems(67d2c423-aeb5-4893-8db8-d6ae59dff412)/Properties&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN class="ng-binding"&gt;And this is the response I'm getting from the service:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;{
  "error":{
    "code":"","message":"No HTTP resource was found that matches the request URI 'http://localhost/PBIReports/api/v2.0/CatalogItems(67d2c423-aeb5-4893-8db8-d6ae59dff412)/Properties'.","innererror":{
      "message":"No action was found on the controller 'CatalogItemsController' that matches the request.","type":"","stacktrace":""
    }
  }
}&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN class="ng-binding"&gt;Any ideas as to what I'm doing wrong? The JSON payload should be in good shape, and I know the auth works fine because it works on all my GET calls.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 19:09:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/298372#M2022</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2017-11-07T19:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/303421#M2247</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/46344"&gt;@pdbenbow&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, I am not familiar with this problem. After research, I could not find the specific cause to this error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31487"&gt;@mgmeyer&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/8826"&gt;@jtarquino&lt;/a&gt;&amp;nbsp;might&amp;nbsp;have any comment on this problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuliana Gu&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2017 05:45:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/303421#M2247</guid>
      <dc:creator>v-yulgu-msft</dc:creator>
      <dc:date>2017-11-15T05:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/308056#M2389</link>
      <description>&lt;P&gt;have you tried a different URL? For example I've succesfully made PUT calls to&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;http://localhost/reports/v2.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also if you are familliar with PowerShell have a look at&amp;nbsp;&lt;A href="https://github.com/Microsoft/ReportingServicesTools" target="_blank"&gt;https://github.com/Microsoft/ReportingServicesTools&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2017 17:27:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/308056#M2389</guid>
      <dc:creator>hugoberry</dc:creator>
      <dc:date>2017-11-21T17:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/308350#M2409</link>
      <description>&lt;P&gt;Just by looking at the code snipped it seems that you are sending a plan json object, but the API expects an array. The shape of the object that you are sending is also incorrect, it should be an object with two properties (name, value))&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 04:01:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/308350#M2409</guid>
      <dc:creator>edugonz</dc:creator>
      <dc:date>2017-11-22T04:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/308475#M2412</link>
      <description>&lt;P&gt;By the way do you set "Content-Type: application/json" in your header?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Nov 2017 07:38:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/308475#M2412</guid>
      <dc:creator>hugoberry</dc:creator>
      <dc:date>2017-11-22T07:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/773912#M11370</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/46344"&gt;@pdbenbow&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you resolve this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I seem to encounter the same issue on our report server when trying to update connectionstring in an embedded datasource. The get request works as expected.&lt;/P&gt;&lt;P&gt;Server &lt;SPAN class="ng-binding"&gt;Version&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ng-binding"&gt;1.5.7074.36177&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="ng-binding"&gt;(May 2019)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I´m using and getting 400 Bad request.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import json
import requests
from requests_negotiate_sspi import HttpNegotiateAuth

uri = 'http://###/api/v2.0/PowerBiReports(0d78ce2d-35a4-424a-8c4a-42556b91776c)/DataSources'

payload = {'ConnectionString': 'data source=###;initial catalog=###;persist security info=false'}

headers = {'Content-type': 'application/json'}

r = requests.patch(uri, auth=HttpNegotiateAuth(), json=payload, headers=headers)
#r = requests.get(uri, auth=HttpNegotiateAuth())

print(r.status_code)
print(r.content)
print(r.headers)
print(r.json)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 06:48:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/773912#M11370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-23T06:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Report Server REST API - PUT method failing</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/774182#M11373</link>
      <description>&lt;P&gt;I never attempted to resolve the issue because this was not a high-priority project for me. I haven't tried any of the suggestions offered by other users, but there's probably some good advice there if you want to try to resolve it.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 10:28:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Report-Server-REST-API-PUT-method-failing/m-p/774182#M11373</guid>
      <dc:creator>pdbenbow</dc:creator>
      <dc:date>2019-08-23T10:28:59Z</dc:date>
    </item>
  </channel>
</rss>

