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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
bboschert
Helper I
Helper I

Invoke-RestMethod: The remote server returned an error: (404) Not Found.

Hello!

 

So I'm working on getting this streaming dataset to work and I keep getting the error that the remote server is not found. I'm confused because I would think that there is a problem with my endpoint but I'm copying the link right out of power bi service. Also, This is only happening to streaming datasets that I have created today, all of the streaming datasets I've made prior work fine. Is anyone else experiencing the same thing or can spot something wrong with my script. I'm using powershell to post the data, here is the script.

 

# Initialise Stream
$sleepDuration = 1 #PowerBI seldom updates realtime dashboards faster than once per second.
$eventsToSend = 500 #Change this to determine how many events are part of the stream

$endpoint = "https://api.powerbi.com/beta/1bb841c5-79dd-4f6f-8ffa-1c73e03e5ab1/datasets/c443c22d-cab5-4ea2-a6f1-f..."

# Initialise the Payload
$payload = @{
"ResourceName" ="AAAAA555555"
"CurrentStreamSpeed" =98.6
"AverageOutput" =98.6
"JobNumber" ="AAAAA555555"
"JobName" ="AAAAA555555"
"OpCode" ="AAAAA555555"
"TimeLastUpdated" ="2019-09-30T17:18:18.863Z"
}

# Iterate until $eventsToSend events have been sent
$index = 1
do
{
[xml]$SpeedInfo = Get-Content "\\Yharnam\Technique$\SFDCspeedXML\DCSpeed_130.xml"
$payload.ResourceName = $SpeedInfo.resourcespeed.resourcename
$payload.CurrentSpeedStream = $SpeedInfo.resourcespeed.currentspeedstream1
$payload.AverageOutput = $SpeedInfo.resourcespeed.averagespeeds.averageoutput
$payload.OpCode = $SpeedInfo.resourcespeed.currentoperation.name
$payload.TimeLastUpdated = (Get-Date).AddHours(-5)
$payload.JobName = $SpeedInfo.resourcespeed.runningjobs.job.name
[xml]$DetailInfo = Get-Content "\\Yharnam\Technique$\SFDCspeedXML\DCDetail_130.xml"
$payload.JobNumber = $DetailInfo.resourcedetail.tasks.task.jobnumber

# Send the event
Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))


"`nEvent {0}" -f $index
$payload

# Sleep for a second
Start-Sleep $sleepDuration

# Ready for the next iteration
$index++

} While ($index -le $eventsToSend)

# Finished
"`n{0} Events Sent" -f $eventsToSend

1 ACCEPTED SOLUTION
bboschert
Helper I
Helper I

They just started working today, for no reason.

 

Cool.......

View solution in original post

2 REPLIES 2
bboschert
Helper I
Helper I

They just started working today, for no reason.

 

Cool.......

bboschert
Helper I
Helper I

So, I've found that it only errors out when the historical data analysis is checked. Is there something different with the script that is supposed to be changed to accommodate for this? I didn't have this issue last week when I was using the historical data analysis.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors