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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I've been trying to setup a simple PUT request to an API with no success. The API itself works as intended, used Postman to request the data. GET/POST requests are working fine with PowerQuery.
let
BaseUrl = "https://stackoverflow-63122537.herokuapp.com/demo"
BaseHeaders = [#"Content-Type"="application/json"],
JsonBody = Json.FromValue([A = 1, B = 2]),
Count =
WebAction.Request(
"PUT",
BaseUrl,
[
Headers = [ BaseHeaders ],
Content = JsonBody
]
)
in
CountExpected:
Count should return a number.
Actual result:
PowerBI reports "Object reference not set to an instance of an object"
Hi @nathan2399
As the URI in a POST request identifies the resource that will handle the enclosed entity... In contrast, the URI in a PUT request identifies the entity enclosed with the request, i would go witht the POST Request.
Did I resolve your issue? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!!
Regards,
Pranit
Thanks for the input Pranit, and I would if I could but sadly the API uses POST for other ops while PUT returns counts (for some reason).
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 121 | |
| 103 | |
| 46 | |
| 30 | |
| 24 |