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
Chris-F
Frequent Visitor

Power BI Rest API ServiceExceptionJson Valid Json

Hi

 

Am I the only one running into an issue where the ServiceExceptionJson is not returning a valid json in the Microsoft Power BI Rest API?

 

The JSON returned does not seem to be a valid json at all. Also does Microsoft have their Json Structure documented anywhere? I see there is an example on the Power BI REST API documentaitons, but it does not have when there is a value at the end of the json string "Table: Table1". which invalidates the Json

 

Thanks

5 REPLIES 5
Anonymous
Not applicable

Have the exact same issue and cannot find help for it anywhere. I get that same piece of text at the end of the JSON, which makes it impossible to deserialize.

Hey, So what i did was I basically just split the string by taking the 2nd from last }, and then everything after that I put that into a variable and do what I want with it. That has been working for me so far. There was no point in fighting to get microsoft to fix it

Anonymous
Not applicable

Thanks! Ended up doing the same thing.

GilbertQ
Super User
Super User

Hi @Chris-F 

 

Can you please let us know which API you are calling.

 

Your script you are using

 

And then the error you are getting?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Datasets - Get Refresh History In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn

This is the API. The error is simply that the JSON is not a valid JSON. If you want to recreate this. Have one of your datasets fail a refresh on a specific table, either due to a query error or something of the like.

 

It will put at the end of the JSON, Table: <tablenamehere>. Which invalidates the JSON format.

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.

Top Solution Authors
Top Kudoed Authors