0
votes

I have been using postman to access the dynamics portal. I'm able to login and now, i need to see the available reports and download one particular report from the portal.

I have gone through the documents and couldn't get the required details to do. Can someone guide me on how to view the report and download it to my local machine using API calls through postman.

1

1 Answers

1
votes

Here is the Doc from microsoft which gives your info about all the fields retrieved from crm.

I have used javascript and webapi to retrieve particualr Report.

Note: using webpi you can only retrieve report and it's definition and not Specific report data.

Link fir not retrieveing report data

var req = new XMLHttpRequest();
req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/reports?$filter=name eq 'aktivit%C3%A4ten'", false);
req.setRequestHeader("OData-MaxVersion", "4.0");
req.setRequestHeader("OData-Version", "4.0");
req.setRequestHeader("Accept", "application/json");
req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
req.onreadystatechange = function() {
    if (this.readyState === 4) {
        req.onreadystatechange = null;
        if (this.status === 200) {
            var results = JSON.parse(this.response);
            for (var i = 0; i < results.value.length; i++) {
                var reportid = results.value[i]["reportid"];
            }
        } else {
            Xrm.Utility.alertDialog(this.statusText);
        }
    }
};
req.send();