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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.