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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

They just started working today, for no reason.

 

Cool.......

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

They just started working today, for no reason.

 

Cool.......

Anonymous
Not applicable

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
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

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.