Forum Discussion
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
- Chris-FFrequent Visitor
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.
- AnonymousNot 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.
- Chris-FFrequent Visitor
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
- AnonymousNot applicable
Thanks! Ended up doing the same thing.