Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
All,
NOTE: I am not a developer, trying to do the below from an online example.
I am using the following power shell script to push data to a power BI API and data set. It used to work fine, but then I started getting the following error
======================================
Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At line:28 char:5
+ Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestM
ethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMeth
odCommand
=================================
Script is pretty simple - just getting local machine stats and posting to power BI API
$endpoint = "https://api.powerbi.com/beta/de3e5d90-25ee-443e-908a-0590e39c4dff/datasets/abfa7618-cc8e-49c3-bffe-0..."
while($true)
{
$ComputerCPU = (Get-WmiObject -Class win32_processor -ErrorAction Stop | Measure-Object -Property LoadPercentage -Average | Select-Object Average).Average
$ComputerMemory = Get-WmiObject -Class win32_operatingsystem -ErrorAction Stop
$UsedMemory = $ComputerMemory.TotalVisibleMemorySize - $ComputerMemory.FreePhysicalMemory
$Memory = (($UsedMemory/ $ComputerMemory.TotalVisibleMemorySize)*100)
$RoundMemory = [math]::Round($Memory, 2)
$Date = Get-Date -DisplayHint Date -Format MM/dd/yyyy
$Time = Get-Date -DisplayHint Time -Format HH:mm:ss
#$RoundMemory
#$ComputerCPU
#$Date
#$Time
$payload = @{
"Date" =$Date
"Time" =$Time
"CPU" = $ComputerCPU
"Memory" = $RoundMemory
}
Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))
Write-Host "Date: " $Date " Time: " $Time " CPU: " $ComputerCPU " Memory: " $RoundMemory
sleep 2
}
============================
Why would this suddenly stop working?
If I hit the full url : https://api.powerbi.com/beta/de3e5d90-25ee-443e-908a-0590e39c4dff/datasets/abfa7618-cc8e-49c3-bffe-0...
I get a 404
I get a 403
can someone help me fix this?
Thanks
Ravina
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |