Tuesday, 26 November 2013

Pentaho 5 Restful Web Services 101

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:


Listing Repository Contents

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

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.


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


  1. HI Harris,

    Excelent Article.

    Do you where to find a list of the available services ?

  2. Hi its good , I have used CDE ,CCC.and it is important for me

  3. Thanks for the article.
    Do you have an example of using the delete ? http://localhost:8080/pentaho/api/repo/files/delete


    1. Hi there

      I´d like to know this command too, Did you get it, or somebody knows.

      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

    2. I have this same problem

      Did you solve it?

    3. Hi Juanjo
      Yes, I fixed this problem. I got to reach the file to delete:
      I created a transformation on PDI, using RESTClient and passing ID File with parameter.
      ID File you got with ex.: http://localhost:8080/pentaho/api/repo/files/:home/children on browser
      and on Restclient you use ex.: http://localhost:8080/pentaho/api/repo/files/delete

      I hope to help you.

    4. This comment has been removed by the author.

    5. Can you show me how to send the request payload for http://localhost:8080/pentaho/api/repo/files/delete?

  4. A web development company can offer your business not only web development services but, also a range of other services which can take your company to the very top. However, most importantly, these companies can offer you with a team of highly skilled web designers who can design the very best page for your company.

  5. Layman, deliver industry-leading IT services to businesses and IT Teams in a flexible, responsive and innovative technique.
    Layman offers best of the breed Online & Corporate IT training programs which are designed to transform the participants into project.
    Support; Query? +91-741-626-7887 ... Online Corporate IT training services. OnlineTraining | Corporate Training | Layman Learning.
    Tel : +91-040-4011-1104: MOB: +91-741-626-7887 MOB: +91-900-059-7974
    Website : www.laymanlearning.com || hr@laymanlearning.com ||

  6. Syntax:
    pentaho bi development services

    This Very Nice And With the updated release Information
    of Pentaho V5 comes some very cool new features. One that we were really interested in had to be the new Restful Webservices.

  7. I appreciate that you produced this wonderful article to help us get more knowledge about this topic.
    I know, it is not an easy task to write such a big article in one day, I've tried that and I've failed. But, here you are, trying the big task and finishing it off and getting good comments and ratings. That is one hell of a job done!

    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

  8. I ever read such kind of nice article yet. I must thank you for this informative read. I hope you will post again soon.

    Angularjs Training | Angular 2 Training | Angular 4 Training | Angular 5 Training

  9. Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.
    redmi mobile service centre in chennai
    redmi note service center in chennai
    redmi service center in velachery

  10. Nice blog..! I really loved reading through this article. Thanks for sharing such a
    amazing post with us and keep blogging...Also Checkout: cryptocurrency training in chennai | blockchain coaching in chennai | blockchain certification training in chennai | blockchain certification course in chennai

  11. Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.

    Check out : hadoop training in chennai cost
    hadoop certification training in chennai
    big data hadoop course in chennai with placement
    big data certification in chennai

  12. The Project Management Institute (PMI)is a nonprofit membership association and certification body, best known for its Project Management Professional (PMP) credential and the Project Management Body of Knowledge (PMBOK), a collection of best practices and standards for project management.
    Good job and thanks for sharing such a good blog You’re doing a great job. Keep it up !!

    PMP Certification Fees | Best PMP training in chennai |
    pmp certification cost in chennai | PMP Certification Training Institutes in Velachery |
    pmp certification courses and books | pmp certification requirements |
    pmp training centers in chennai | pmp certification requirements

  13. It’s interesting content and Great work. Definitely, it will be helpful for others. I would like to follow your blog. Keep post

    Check out:
    best hadoop training in omr
    hadoop training in sholinganallur
    best institute for big data in chennai
    big data hadoop course in chennai with placement

  14. Thanks for sharing the knowledgeable stuff to enlighten us no words for this amazing blog.. learnt so many things I recommend everyone to learn something from this blogger and blog.. I am sharing it with others also..
    We are a professional training institute providing training under the following courses, if any one is looking for them click on the blink below:
    Summer training in Lucknow
    SAP training in Lucknow
    SAP FICO training in Lucknow
    Python Training in Lucknow
    Advance Java Training in Lucknow
    SEO Training in Lucknow
    Digital marketing training in Lucknow
    PHP Training in Lucknow
    Android Training in Lucknow
    am going to share it with others also, it is a nice article