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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.