public Response addWidget(@ApiParam(name = "JSON body", required = true) String body,
@ApiParam(name = "dashboardId", required = true) @PathParam("dashboardId") String dashboardId) {
restrictToMaster();
checkPermission(RestPermissions.DASHBOARDS_EDIT, dashboardId);
AddWidgetRequest awr;
try {
awr = objectMapper.readValue(body, AddWidgetRequest.class);
} catch(IOException e) {
LOG.error("Error while parsing JSON", e);
throw new WebApplicationException(e, Response.Status.BAD_REQUEST);