API to list reports

7 posts, 0 answers
  1. rwb
    rwb avatar
    37 posts
    Member since:
    Aug 2015

    Posted 09 Jun 2017 Link to this post

    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.

  2. rwb
    rwb avatar
    37 posts
    Member since:
    Aug 2015

    Posted 09 Jun 2017 Link to this post

    It's definitely possible; the desktop report designer lists the reports by category when you go to open one.
  3. Katia
    Admin
    Katia avatar
    693 posts

    Posted 09 Jun 2017 Link to this post

    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
  4. rwb
    rwb avatar
    37 posts
    Member since:
    Aug 2015

    Posted 09 Jun 2017 Link to this post

    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.

  5. rwb
    rwb avatar
    37 posts
    Member since:
    Aug 2015

    Posted 09 Jun 2017 Link to this post

    Is there any documentation for the `Token` method? Or only that single example?
  6. Katia
    Admin
    Katia avatar
    693 posts

    Posted 12 Jun 2017 Link to this post

    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
  7. Naveena
    Naveena avatar
    9 posts
    Member since:
    May 2018

    Posted 29 May 2018 in reply to Katia Link to this post

    Im getting the folowing error my report is not loading can view the attachment . 
Back to Top