Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
DaniEMIT
Frequent Visitor

Get Data from pbix publish in PowerBi Report Server

Hi all,

i've this issue:

i need to get the data (or graph) contained in a PowerBi dashboard.

The pbix. report is published directly in PowerBi Report Server (i don't use Microsoft cloud).

Is it possible to get data or graph using powershell?

Thanks in advance,

Daniele

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @DaniEMIT ,

Getting report data

Reports sent to the pull server are entered into a database on the server. The reports are available through calls to the web service. To retrieve reports for a specific node, send an HTTP request to the report web service in the following form:

http://CONTOSO-REPORT:8080/PSDSCReportServer.svc/Nodes(AgentId='MyNodeAgentId')/Reports

Where MyNodeAgentId is the AgentId of the node for which you want to get reports. You can get the AgentID for a node by calling Get-DscLocalConfigurationManager on that node.

The reports are returned as an array of JSON objects.

The following script returns the reports for the node on which it is run:

 

function GetReport
{
    param
    (
        $AgentId = "$((glcm).AgentId)",
        $serviceURL = "http://CONTOSO-REPORT:8080/PSDSCPullServer.svc"
    )

    $requestUri = "$serviceURL/Nodes(AgentId= '$AgentId')/Reports"
    $request = Invoke-WebRequest -Uri $requestUri  -ContentType "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" `
               -UseBasicParsing -Headers @{Accept = "application/json";ProtocolVersion = "2.0"} `
               -ErrorAction SilentlyContinue -ErrorVariable ev
    $object = ConvertFrom-Json $request.content
    return $object.value
}

 

refer:

Get report data

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

Hi Lucien,

first of all thanks for you reply.

With the powershell i 2 problem:

1) i can't recover the "AgentId" and i haven't (or i don't know how to reach it) the PSDSCPULLServer;

2)  with this powershell i can't get graph directly from the report.

Can you help me in these issue?

Thanks,

Daniele

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.