You need to sign in to do that
Don't have an account?
Alex Chudovsky
JSON_PARSER_ERROR with Dashboards REST API
The problem appears when I try to save a dashboard using PATCH method of Dashboards REST API. I do this by the same way as it said in the developer guide (https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/analytics_api_dashboard_save_dashboard.htm)
I tried different variants of PATCH request body, but in the response I got the same error:
{"errorCode":"JSON_PARSER_ERROR","message":"The request body is either invalid or incomplete."}
Request sends to https://ap2.salesforce.com/services/data/v36.0/analytics/dashboards/IdOfDasboard
Body of the request is:
Have anybody any ideas why it happens?
Thank you,
Alexei Chudovsky
I tried different variants of PATCH request body, but in the response I got the same error:
{"errorCode":"JSON_PARSER_ERROR","message":"The request body is either invalid or incomplete."}
Request sends to https://ap2.salesforce.com/services/data/v36.0/analytics/dashboards/IdOfDasboard
Body of the request is:
{ "dashboardMetadata": { "name": "TestDashboard" } }
Have anybody any ideas why it happens?
Thank you,
Alexei Chudovsky
{
"name": "TestDashboard"
}
All Answers
https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/analytics_api_dashboard_results_resource.htm#topic-title
Thank you for your reply.
According to your advice I tried to send request based on previous retrieved results but I got the same error (JSON_PARSER_ERROR).
Here is request body I sent:
Have you any more ideas or example of correct request body?
Thank you,
Alexey
{
"name": "TestDashboard"
}