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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
PBIResDeveloper
New Member

Creating new Dataset via REST API

Hello,

 

I am trying to create new Push Dataset by using REST API using PostDataset method described in documentation (https://docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_postdataset)

 

No matter what Request body I am using (if it is not blank) I am always getting error 400 with following message: 

{"error":{"code":"FailedToDeserializeDatasetError","pbi.error":{"code":"FailedToDeserializeDatasetError","parameters":{},"details":[],"exceptionCulprit":1}}}

 

I am using Ruby language for calling endpoints. I am able, for example, to Clone reports, list datasets or tables so the basic code should be ok. Some sample code I am using is this:

 

response = HTTParty.post(
	"https://api.powerbi.com/v1.0/myorg/groups/#{workspace_id}/datasets",
	:body => {
		name: 'TEST VIA API',
		defaultMode: 'Push',
		tables: [
			{
				name: 'Test Table',
				columns: [
					{
						dataType: 'string',
						name: 'Name'
					}
				]
			}
		]
	},
	:headers => auth.auth_header
)

Any ideas what might be wrong?

0 REPLIES 0

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.