This is a migrated thread and some comments may be shown as answers.

API to list reports

6 Answers 508 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
rwb
Top achievements
Rank 2
rwb asked on 09 Jun 2017, 01:42 PM

Is it possible to obtain a list of reports from the API?

 

Specifically, I need the list of reports (title, description, URL) that are available to the guest user.

6 Answers, 1 is accepted

Sort by
0
rwb
Top achievements
Rank 2
answered on 09 Jun 2017, 01:45 PM
It's definitely possible; the desktop report designer lists the reports by category when you go to open one.
0
Katia
Telerik team
answered on 09 Jun 2017, 02:15 PM
Hello rwb,

Report Server API can be found here. For example, to get a collection of reports stored on the server you can use api/reportserver/reports endpoint.

To perform Report Server operations, you have to login first and get an access token - check Get Reports, Categories and other resources.

Hope this will help.


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
rwb
Top achievements
Rank 2
answered on 09 Jun 2017, 04:55 PM

Thank you; I hadn't found that documentation. I was looking here

  http://docs.telerik.com/reporting/telerik-reporting-rest-api

which lists only a subset of the API.

0
rwb
Top achievements
Rank 2
answered on 09 Jun 2017, 04:58 PM
Is there any documentation for the `Token` method? Or only that single example?
0
Katia
Telerik team
answered on 12 Jun 2017, 12:25 PM
Hello rwb,

The code snippet provided in this help article demonstrates how to get the token:
var serverHost = "http://reportserver:83/";
  var serverApi = serverHost + "api/reportserver/";
 
  function login(username, password) {
 
    var accessToken = "";
 
    $.ajax({
      type: "POST",
      url: serverHost + "Token",
      async: false,
      data: {
        grant_type: "password",
        username: username,
        password: password
      }
    })
    .done(function (data, textStatus, jqXHR) {
      accessToken = data.access_token;
    })
    .fail(function (xhr, status, error) {
      window.alert(xhr.status + ": " + error);
    });
 
    return accessToken;
  }

After you get the access token, you can store it in window.sessionStorage and later use it in subsequent requests:
var serverTokenKey = "TelerikReportServerToken";
 
  $(document).ready(function () {
    var accessToken =
      login("telerik", "telerik");
    window.sessionStorage.setItem(serverTokenKey, accessToken);
  })


Regards,
Katia
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Naveena
Top achievements
Rank 1
answered on 29 May 2018, 02:36 PM
Im getting the folowing error my report is not loading can view the attachment . 
Tags
General Discussions
Asked by
rwb
Top achievements
Rank 2
Answers by
rwb
Top achievements
Rank 2
Katia
Telerik team
Naveena
Top achievements
Rank 1
Share this question
or