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:

steel-wheels:reports:sales-reports:sales.prpt

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:

http://localhost:8080/pentaho/api/repo/files/:public/children

If we wanted to return the content of the public/cde directory we would execute:

http://localhost:8080/pentaho/api/repo/files/:public:cde/children

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

depth

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

showHidden

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

filter

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

http://localhost:8080/pentaho/api/repo/files/:public:mysolution:sales.prpt/properties

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

http://localhost:8080/pentaho/api/repo/dirs/:public:myreports

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

http://localhost:8080/pentaho/api/repo/files/delete

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:

http://localhost:8080/pentaho/api/repo/files/:public/acl

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.

Summary

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



93 comments:

  1. HI Harris,

    Excelent Article.

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

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

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

    Regards,
    Vincent

    ReplyDelete
    Replies
    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

      Delete
    2. I have this same problem

      Did you solve it?

      Delete
    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.

      Delete
    4. This comment has been removed by the author.

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

      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.

    ReplyDelete
  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 ||

    ReplyDelete
  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.


    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
  8. 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

    ReplyDelete
  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.

    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

    ReplyDelete
  10. 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

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. 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

    ReplyDelete
  13. Thanks for sharing the knowledgeable stuff to enlighten us no words for this amazing blog.I have bookmarked it on my pc. If you are looking for any of the services mentioned below, click on the hyperlinks
    IT consulting services
    Money transfer system
    Money Transfer Software company
    Online Money remittance platform
    Software development in London
    Software development company in London

    You can also visit: www.generalsoftwares.com

    ReplyDelete
  14. It is really explainable very well and i got more information from your site.Very much useful for me to understand many concepts and helped me a lot.microsoft azure training in bangalore

    ReplyDelete
  15. Thank you for sharing such a nice post!

    Start your journey with AWS Course and get hands-on Experience with 100% Placement assistance from Expert Trainers with 8+ Years of experience @eTechno Soft Solutions Located in BTM Layout Bangalore.

    ReplyDelete
  16. https://techhasnoboundary.blogspot.com/2012/07/deploy-timerjobs-to-sharepoint-2007-farm.html?showComment=1575447412702#c8904142764792738702

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. This comment has been removed by the author.

    ReplyDelete
  19. Snapdeal Winner List here came up with an Offer where you can win Snapdeal prize list 2020 by just playing a game & win prizes.
    Snapdeal winner name2020 also check the Snapdeal lucky draw2020

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. This is a very good tip particularly to those fresh to the blogosphere. Short but very accurate technology information… Thank you for sharing this one. A must read post!

    ReplyDelete
  22. one of the best blog ever that i seen in whole life and thankyou for this blog
    i love this blog and it has i own value that is more than other


    snapdeal lucky draw 2020!
    snapdeal lucky draw contact !
    snapdeal lucky draw helpline!
    snapdeal lucky draw draw!

    ReplyDelete
  23. Hi, I am Veronica Kate. I am working as a full-time academic consultant with Livewebtutors. We are providing paper editing service and Deakin Referencing Generator to university and college students across the globe. I have been successfully helping students, scholars and professionals in various services like I mentioned above for more than 5 syears and hold excellent writing, proofreading and editing skills. You would also find various academic tools on Livewebtutors like Paraphrasing Tool and Harvard Referencing Generator.

    ReplyDelete
  24. Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
    <a href="https://www.3ritechnologies.com/course/salesforce-training-in-pune/”> Salesforce Training in Pune</a>

    ReplyDelete
    Replies
    1. Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
      <a href="https://www.3ritechnologies.com/course/salesforce-training-in-pune/”> Salesforce Training in Pune </a>

      Delete
  25. Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
    <a href="https://www.3ritechnologies.com/course/salesforce-training-in-pune”> Salesforce Training in Pune</a>

    ReplyDelete
  26. Good Post! , it was so good to read and useful to improve my knowledge as an updated one, keep blogging. After seeing your article I want to say that also a well-written article with some very good information which is very useful for the readers....thanks for sharing it and do share more posts like this.
    Salesforce Training in Pune

    ReplyDelete
  27. The Asian Publications, is a book publishing company in Chennai. Publishers & Distributors of Facsimile Reprints. We Reprint Rare Antiquarian Books

    A set of categories we are dealing with are,

    - Dictionaries, Grammars, Inscriptions, Architecture, Numismatics
    - Palaeography, Literature in most Indian and Asian Language
    - Mythology, Folklore, Customs and Manners
    - History, Travel, Culture, Art, Archaeology

    Over the years most of the titles are unavailable, so we are collecting the best titles on India especially on South region of India, reprinting and publishing in the books industry. So far we have reprinted and published about 40 titles.

    Best selling books are

    1. Abithana Chintamani - A. Singaravelu Mudaliar
    2. A Forgotten Empire (Vijayanagar) - Robert Sewell
    3. The Madura Country A Manual - J.H. Nelson

    We are continuously updating the list of our books here - Book List

    For more details, you can call or mail us - Contact

    Thank you

    ReplyDelete
  28. This comment has been removed by the author.

    ReplyDelete
  29. Receive an mission free -- this really is actually the best deal on bulk booking which we're providing now. Assignment Help Adelaide

    ReplyDelete
  30. assignment help in Malaysia can assist students in writing top-notch quality content within the shortest period of time to get impressive marks. Our assignment help experts know how to curate content with relevant information and the right tone. Since we understand the fact that writing a good quality assignment is incredibly important for students in Malaysia, we assign the most experienced and skilled professionals in the business to write and read the assignments that we provide to students. Besides that, it is our motive to deliver the assistance at a reasonable cost!

    ReplyDelete
  31. Hello! I’m Harry, and that i am working as a maintenance engineer at one among the Tech-Support Firm. I’m working as a freelancer with autonomous organizations. I’m an expert in resolving technical issues in several software flaws, like QuickBooks Error 6150. I even have a robust background and knowledge in technology and am continually being kind ahead of my customers. So, if you're also trying to find such sort of error, you'll hook up with me. it might be a pleasure on behalf of me to repair your issue during a single call .

    ReplyDelete
  32. May I just say what a solace to reveal someone who truly comprehends what they are talking about over the web. You unquestionably acknowledge how to uncover an issue and make it significant. More individuals should take a gander at this and comprehend this side of the story. I was shocked you're not more well known given that you assuredly have the blessing. best interiors

    ReplyDelete
  33. Brilliant post! We are connecting to this extraordinary post on our site. Keep up the extraordinary composition.
    best interiors

    ReplyDelete
  34. You should be a piece of a challenge for probably the best website on the web. I will suggest this site!
    best interiors

    ReplyDelete
  35. Hey!
    I would really appreciate you for writing such an amazing blog. It's really very engaging and interesting. Keep Sharing like this in the future.
    And if you need any kind of advertising services whether it is online advertising or outdoor advertising. Hum Ek Madhyam is always ready to assist you.
    :
    𝐅𝐨𝐫 𝐦𝐨𝐫𝐞 𝐝𝐞𝐭𝐚𝐢𝐥𝐬:
    𝐂𝐨𝐧𝐭𝐚𝐜𝐭 𝐮𝐬: +917209020907
    𝐌𝐚𝐢𝐥 𝐮𝐬: aapkamadhyam@gmail.com

    ReplyDelete
  36. I must say that you are my favourite author. You always bring surprised things for me everytime I see your articles. Great efforts!! Elder Maxson Coat

    ReplyDelete
  37. Wonderful blog. If you want promote your business just check sms gateway price india, we provide entire service related bulk sms, Ratsms is the top leading promotional sms provider.
    Check out sms api pricing, we provides different kind of Bulk SMS services Without DLT | Free SMS API | Free Registration


    sms api pricing
    cheapest sms gateway india
    sms gateway price india
    promotional sms provider
    bulk sms provider hyderabad

    ReplyDelete
  38. Hi! this is nice article you shared with great information. Thanks for giving such a wonderful informative information. I hope you will publish again such type of post. unichris post utme past questions pdf download

    ReplyDelete
  39. Excellent content ,Thanks for sharing this .,
    Leanpitch provides online training in ICP ACC, everyone can use it wisely.
    ICP ACC certification online
    ICP ACC certification

    ReplyDelete
  40. Hello great people, when I went through this article, it gave me all I wanted. Juts want to say a big thank you. Now I just want to introduce you to a platform that you can borrow money from through a loan app and then pay later. They have a very little charge on interest rate.

    Loan Money Apps

    ReplyDelete
  41. Fantastic blog i have never ever read this type of amazing information. Dirk Gently Leather Jacket

    ReplyDelete
  42. Great to share this information thank you. I am really happy to say it's an interesting Blog to read. I learn Very new Think from your blog.

    Salon at home Delhi
    Waxing Salon at Home in Noida

    ReplyDelete
  43. Our the purpose is to share the reviews about the latest Jackets,Coats and Vests also share the related Movies,Gaming, Casual,Faux Leather and Leather materials available Rainbow Sunburst Jacket

    ReplyDelete
  44. I love to recommend you Where can crawl Exciting Products latest Jackets, Coats and Vests Click Here James Bond Peacoat

    ReplyDelete
  45. Thanks for the wonderful post full of knowledge that impacted viewers a lot. I am glad for coming around this episode of update. I appreciate you for sharing meaningful and useful. Also visit tasued admission-list

    ReplyDelete
  46. Fubo TV has a vast range of content, including live sporting events, movies, and TV shows. Here’s a list of some of its most popular content. Fubo TV currently comes with a seven-day free trial. So you can watch a week’s worth of content without paying a penny. fubotv connect activate code
    fubotv free trial

    ReplyDelete
  47. Incredible blog here! It's mind boggling posting with the checked and genuinely accommodating data. Billionaire Boys Club Varsity Jacket

    ReplyDelete



  48. teacup poodles for sale under $500
    teacup poodle for sale near me
    toy poodles for sale
    teacup yorkie for sale
    teacup maltese puppies for sale
    https://greenlandpuppies.com/teacup-maltese-puppies-for-sale/
    https://greenlandpuppies.com/teacup-maltipoo-puppies-for-sale/
    https://greenlandpuppies.com/teacup-poodle-puppies-for-sale/
    https://greenlandpuppies.com/teacup-yorkie-for-sale/

    ReplyDelete

  49. You should take help from professionals who have immense experience on Microsoft Business Central. They will help you with Solutions easily. Read: Dynamics 365 Business Central Vs Dynamics 365 Finance & Supply Chain Management

    ReplyDelete
  50. This article is in fact a fastidious one it
    assists new web viewers, who are wishing in favor of blogging. buy ecurrency verified account

    ReplyDelete
  51. Thanks for this post. I so much appreciate what you're doing here. You can check out the Airtel YouTube night plan code...

    ReplyDelete
  52. Gameplay in Crazy for Speed 2 apk is very intuitive. You can choose between steering your vehicle by tilting your smartphone or tapping on the action buttons that appear on the screen, keeping your focus on the road ahead.

    ReplyDelete
  53. https://interiordesignergurgaon21.blogspot.com/2022/08/interior-decorating-ideas-for-home.html
    https://interiordesignergurgaon21.blogspot.com/2022/08/the-benefits-of-textured-walls-for.html
    https://interiordesignergurgaon21.blogspot.com/2022/08/tips-for-decorating-studio-apartment-in.html
    https://interiordesignergurgaon21.blogspot.com/2022/08/bathroom-interior-design-ideas.html
    https://interiordesignergurgaon21.blogspot.com/2022/08/3-bedroom-interior-design-ideas-design.html
    https://interiordesignergurgaon21.blogspot.com/2022/08/innovative-interior-design-concepts-for.html
    https://interiordesignergurgaon21.blogspot.com/2022/08/how-to-use-color-in-interior-design-and.html

    ReplyDelete
  54. I feel extremely cheerful to have seen your post shophoodies.co.uk. I found the most beautiful and fascinating one. I am really extremely glad to visit your post.

    ReplyDelete
  55. wordpress website design studio Need professional WordPress Web Design Services? We're experts in developing attractive mobile-friendly WordPress websites for businesses. Contact us today!

    ReplyDelete
  56. Lookobeauty
    https://lookobeauty.com/makeup-artist-institute-makeup-artist-course-in-gurgaon/
    Looking For Best Makeup Artist Course In Gurgaon. Best Makeup Artist Institute With Affordable Fees, Best Placement Record By Top Makeup Teachers In Gurgaon.

    ReplyDelete
  57. This is a very well written article. I will definitely bookmark it and come back to read more of your useful information. Thanks for sharing.- download csc101 past questions in pdf format

    ReplyDelete
  58. Thank you for getting some good points to know..
    I am suing old style LG Smart TV and Looking for Daily Wire on my firestick tv ..how to get the daily wire on firestick
    How to watch Peacock app on my old LG Smart TV .. Is it any solution for how to add peacock on lg tv.

    ReplyDelete
  59. Informative article. Even we have the most trusted ionized water content content our site known as <a href="https://kangenwatermovement.org/> kangen water</a>

    ReplyDelete
  60. This comment has been removed by the author.

    ReplyDelete
  61. How to find the POF dating site online Plenty of Fish is a Waste of Time.
    Find the Bumbble Dating site information of it Bumble Is a Waste of Time

    ReplyDelete
  62. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for extra articles. I found simply the information I already searched everywhere and just couldn’t come across. our listings offer a range of options for еvеry travеlеr. As you stroll through historic nеighborhoods, еnjoy еxquisitе cuisinе, and takе part in intriguing еvеnts, you can makе pricеlеss mеmoriеs.
    Browse: Especial Rental

    ReplyDelete