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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MiguelRosales
Regular Visitor

Restful powerBI delete streaming

Hello, I'm fairly new to power BI, I'm currently working with the streaming  restful API. I created the restful endpoint following a tutorial online and the POST operation works. I am able to push information and read it. I now need to delete the data from the table. My restful address when I push information looks like this

https://api.powerbi.com/beta/[STRING1]/datasets/[STRING2]/rows?key=[PRIVATE KEY]

It was provided to me by power BI when I created the endpoint.

I'm guessing STRING1 corresponds to some sort of userID and STRING2 to my dataset

I found this DOC to delete the rows

https://msdn.microsoft.com/en-us/library/mt238041.aspx

The address doesn't match my endpoint address (I don't know what the table name is furthermore BETA and V1.0 are different I'm assuming)

DELETE https://api.powerbi.com/v1.0/myorg/datasets/{dataset_id}/tables/{table_name}/rows

I have tried a

DELETE https://api.powerbi.com/beta/[STRING1]/datasets/[STRING2]/rows?key=[PRIVATE KEY] and I got a 404 ERROR

 

Any I deas?

 

Thank you.

5 REPLIES 5
Eric_Zhang
Employee
Employee

@MiguelRosales

 

The DELETE ROWS api is for the regular datasets, suchs ones published from desktop, get data from service and even the "HISTORIC" data for steaming dataset.

 

AFAIK, there's no api to delete rows in a streaming dataset, you'll have to delete and re-create a new one. You can submit this at Power BI Ideas and vote it up.

thank you,

what would a http request for a DELETE preformed on a "historic" data of a streaming dataset.

 

That is what I was refering to actually. I need to clear the historic data. 

 

I just found out that the name of the table is RealTimeData (default name)

 

When I try to delete it I get a 403, do I have to authenticate to be able to delete the data?

 

If yes, can someone provide information about about the authentication procedure in order to perform such action?

 

thanks

@MiguelRosales

The DELETE API can delete the historic dataset according to my test. You'll have to specifiy an field "Authorization" valuing the "Bearer token" in the HTTP request header.

 

See a quick way to get the token in this thread.

 

Capture.PNG

@Eric_Zhang is there anyway to execute this DELETE request from powershell?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.