2 Possible issues with SSRS REST API

Lee Stutzman 5 Reputation points
2023-07-26T16:28:19.41+00:00
  1. Report.SetItemDataSources on SSRS RESTful API wants a single DataSource JSON encoded, but will always return a 400. The server is actually expecting a DataSource[] JSON encoded.
  2. DataSource is missing a property string CredentialRetrieval. If this isn't set when setting up a Subscription, report creation will fail.
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
3,034 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. AniyaTang-MSFT 12,451 Reputation points Microsoft External Staff
    2023-07-27T02:09:36.2766667+00:00

    Hi @Lee Stutzman

    Sorry, I don't know much about developing with REST API for Reporting Services.

    1. From what I've searched, a 400 (Bad Request) status code means that the server is unable or will not process the request due to what is believed to be a client error (e.g. malformed request syntax, invalid request message frame, or spoofed request routing). You can refer to the following link to develop using REST API for Reporting Services: https://learn.microsoft.com/en-us/sql/reporting-services/developer/rest-api?view=sql-server-ver16.
    2. The CredentialRetrieval attribute can specify the location of the credentials that will be used when the report server connects to the external data source. When creating a subscription, stored credentials are required. You can refer to these links:

    https://learn.microsoft.com/en-us/dotnet/api/reportservice2010.datasourcedefinition.credentialretrieval?view=sqlserver-2016

    https://scriptposse.com/2016/08/03/create-ssrs-data-source/.

    Best regards,

    Aniya


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.