Monday, January 01, 2018

Querying the SSRS 2017 REST API using Fiddler

Fiddler is a tool to test the API Request/Response messages. Let us see how can we use Fiddler to send and retrieve messages from the SSRS 2017 REST API.

URL format for the REST API - http://<ReportServer>/Reports/api/v2.0/<endpointname>

e.g. http://<ReportServer>/Reports/api/v2.0/MobileReports to get the list of all Mobile Reports from the SSRS Portal.

Swagger Documentation - https://app.swaggerhub.com/api/microsoft-rs/SSRS/2.0

Note: The SSRS 2017 REST API is OData compliant and if you need to learn about OData queries you can try them from here. (http://services.odata.org/ODataAPIExplorer/ODataAPIExplorer.html)

OData Tutorial - http://www.odata.org/

a) Download Fiddler, install and open it.

b) Click on the Composer Tab and type the URL to get the list of MobileReports uploaded to the SSRS Portal.

RestAPI1

c) Click on Options tab and check the “Automatically Authenticate” option.

RestAPI2

d) Go back to Parsed tab and click the Execute button and you can see the HTTP Status code as 200 as shown below.

RestAPI3

Note: If you see 401 error then you need to go back and check whether you have done the Step c correctly.

e) Finally you can see the JSON output under Inspectors > JSON tab

RestAPI4

Technorati Tags: ,,,

No comments:

Post a Comment