Using REST API to upload Mondrian Schema – Documentation mistake


You would like to use REST API to upload a Mondrian Schema to the BI Server but for some mysterious reason, you receive a failure response. (The bellow solution applies to /pentaho/plugin/data-access/api/datasource/analysis/import and pentaho/plugin/data-access/api/datasource/analysis/catalog/catalogName endpoints and was tested with Pentaho Version).


Documentation and code comment in the source code tell you to use a form parameter called uploadAnalysis when sending Mondrian Schema. However, you should use instead a parameter called uploadInput. The data you send should look like this:

Apart from the class (AnalysisResource) that covers these two endpoints there is another one (AnalysisDatasourceService) that also provides an interface to upload Mondrian Schema through REST call. The latter one actually uses uploadAnalysis parameter. Hence, I guess the mistake in the documentation.

Please join discussion