Pentaho 5 Restful Web Services

How are you friends today I reblog for us this amazing post including new Pentaho 5 features from :

With the latest release of Pentaho V5 comes some very cool new features. One that we were really interested in had to be the new Restful Webservices.

Lets take a look at some of the core Repository features.

  • Navigate Repository Contents
  • Manipulate Repository Contents
  • Edit User and Group Permissions

Manipulating the Pentaho Repository

A quick word about the syntax of solution directories. With the new Restful API, solution directories are broken up using the : character. So for example, if we wanted to render a report called sales.prpt in the steel-wheels/reports/sales-reports directory the url would look a little like this:



There are two types of repository listing requests. One gets the list of files and folders (including child folders to a certain depth if specified) and the other returns properties of a certain file or folder.
We can start by listing all the files and folders in the public solution folder:
If we wanted to return the content of the public/cde directory we would execute:
By default the children request lists all files and folders including nested files and folders (not including hidden files and folders). Its possible to pass in some argument to filter our results


the depth argument defines the depth of folders we wish to query. by default the depth is -1. This returns ALL folders. If we set it to 0 we get only the contents of the currect folder. if we set it to 1 or more we get the contents of the child folders to that depth


By default hidden files are not returned. to show hidden files in the results we simple pass in the argument showHidden=true


It is possible to filter if we want to return Files or Folders. We do this with the filter argument. For example, to filter only solution files we would add the following argument: filter=*|FILES. To list onlt folder we would do filter=*|FOLDERS

Getting Solution folder / file properties

If we want to get the details for a simple solution file or folder we can use the properties webservice. For example, to get the properties of a solution file called sales.prpt in the public/mysolution/reports folder we would do something like this

Creating new Folders

Lets assume we want to create a new folder in the public solution directory called myreports. To create the new folder we simple execute the following request


Deleting Solution Files and Folders

Lets assume we now want to delete the myreports folder in the repository. before we can delete a file or folder we need to get its ID. We can use the properties request method to get a file or folder id.Once we have the id of the file(s) or folder(s) we want to delete we can execute the delete and pass in the list of ID into the response header as a comma separated list


Listing File or Folder ACLs

We can get the permissions for a particular solution file or folder using the acl service. For example, if we wanted to get the permissions for the public folder we could execute the following request:
This will return the ACL descriptor for the public directory

Setting ACLs for Files or Folders Summary

If we want to set new permissions to a certain solution file or folder we can use the same service but pass in a response header with the new ACL definition using PUT.

Web Services to interact with Mondrian

Here are the webservice calls for getting a Mondrian schema file into the repository and out of the repository. Note at this time you need to have admin permissions to perform these actions, but in future releases we’ll be able to control which users can import and export schemas.

Multipart POST request with post params:
uploadAnalysis – Mondrian schema
catalogName – name of the catalog (optional?)
parameters – parameter list

GET request to get the parameters of a Mondrian schema definition
SteelWheels should be the name attribute that appears in the Mondrian.xml schema

GET request to download the Mondrian xml schema

Most of the datasource UIs call REST services for these behaviours, you can look at the http traffic in Chrome or Firefox to determine the API calls for other datasource types like Pentaho Metadata.


So this is just a quick overview of some of the Pentaho BI Server Restful Web Services but it should be enough to get you started with integrating Pentaho into your own applications
Help me keep the guides up to date and the posts flowing by donating, every small amount of money helps!

3 thoughts on “Pentaho 5 Restful Web Services

  1. Congratulations for for your blog, very helpfull.

    Do you have some example about topic: Deleting Solution Files and Folders

    Have a problem that some user saved a analitic report Saiku in the paste :public:Report 01 – 2015.saiku

    This was permited when you edit a Saiku report and save again without choice a local to save, the sugested name is like that

    :public:Report 01 – 2015.saiku

    I think that, this way to delete a file will help to remove it, Because this file not is shown on Home/Browse File.

    Thanks in advance

    • Good Afternoon fast you know how the parameter REST API paragraph send hum html file paragraph A lump to make Pentaho Example : / Public / Dashboards /

      Thank you ,

      Eder Tonello

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s