Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: How to get Response Header for REST Client in kettle

  1. #1
    Join Date
    Oct 2011
    Posts
    23

    Question How to get Response Header for REST Client in kettle

    Dear All,
    Below is my requirement.
    i am calling one Rest API using "REST Client", now i need to find how much pages return by the API (this information will be get in response header for with the title "pages").

    Can any one tell me how to get Response Header data in REST Client step.


    Thanks
    Naimish

  2. #2
    Join Date
    May 2013
    Posts
    3

    Default

    I have the same question / requirement. Any ideas?

    Thanks.

  3. #3
    Join Date
    Oct 2013
    Posts
    11

    Default

    I'm looking for the same. How can I transform a GET REST API from Magento.

    Here is a Guest GET from Magento for products

    http://temp.pramier.com/api/rest/products?limit=1

    How can I create a transform job?

  4. #4
    Join Date
    Jul 2012
    Posts
    200

    Default

    You wanted to fetch the data from http://temp.pramier.com/api/rest/products this api call and parse the data accordingly and load the data based on their requirement? If yes

    You can use generate rows step and getdatafromxml steps and parse the data accordingly.

  5. #5

    Default

    Hi,

    Hope Attached will help you.magento.ktr

    Thanks,
    Malay




    Quote Originally Posted by gpetes View Post
    I'm looking for the same. How can I transform a GET REST API from Magento.

    Here is a Guest GET from Magento for products

    http://temp.pramier.com/api/rest/products?limit=1

    How can I create a transform job?

  6. #6

    Default

    Hi,

    I have replied to the thread which you have started for REST API for Naimish, can you please provide a bit more detail API link, parameter.For better insight.

    Thanks,
    Malay




    Quote Originally Posted by naimish View Post
    Dear All,
    Below is my requirement.
    i am calling one Rest API using "REST Client", now i need to find how much pages return by the API (this information will be get in response header for with the title "pages").

    Can any one tell me how to get Response Header data in REST Client step.


    Thanks
    Naimish

  7. #7
    Join Date
    Oct 2011
    Posts
    23

    Default

    Hi Friends,
    We can get Response Header from Rest API call by using Java code and run this java code in kettle.

    I have solved my problem by using above technique.

    Thanks
    Naimish

  8. #8
    Join Date
    Oct 2013
    Posts
    11

    Default

    Quote Originally Posted by mt25 View Post
    Hi,

    Hope Attached will help you.magento.ktr

    Thanks,
    Malay
    Thanks for your help!

    I think what have given me will work but I need to go beyond just get data from XML

    For example this URL http://temp.pramier.com/api/rest/customers I need the use the OAuth protocol using the consumer keys and tokens in the Magento REST API. I need to be able to use the REST API verbs GET, POST, PUT and DELETE

    Right now when you go to the above URL you get 403 Access denied because you need to be authenticated first.

    How can I accomplish this with the Spoon REST API client?

    Have a look here
    http://www.magentocommerce.com/api/r...ntication.html

    http://www.magentocommerce.com/api/r...resources.html
    Last edited by gpetes; 11-26-2013 at 09:59 PM.

  9. #9

    Default

    Hi,

    For 403 error you need to register your app in magento after that you will get secrete key and consumer key, later on we can pass this in REST API in kettle.

    If you have any sample access token you can try passing in URL and If your app requires any HTTP authentication then you need to pass log in id and password too.

    Thanks,
    Malay










    Quote Originally Posted by gpetes View Post
    Thanks for your help!

    I think what have given me will work but I need to go beyond just get data from XML

    For example this URL http://temp.pramier.com/api/rest/customers I need the use the OAuth protocol using the consumer keys and tokens in the Magento REST API. I need to be able to use the REST API verbs GET, POST, PUT and DELETE

    Right now when you go to the above URL you get 403 Access denied because you need to be authenticated first.

    How can I accomplish this with the Spoon REST API client?

    Have a look here
    http://www.magentocommerce.com/api/r...ntication.html

    http://www.magentocommerce.com/api/r...resources.html

  10. #10
    Join Date
    Oct 2013
    Posts
    11

    Default

    Quote Originally Posted by mt25 View Post
    Hi,

    For 403 error you need to register your app in magento after that you will get secrete key and consumer key, later on we can pass this in REST API in kettle.

    If you have any sample access token you can try passing in URL and If your app requires any HTTP authentication then you need to pass log in id and password too.

    Thanks,
    Malay
    Thanks again for your help. I know that I need to register the app. As per the Magento API I can't get it to work. Once working then I like to know how to use the Spoon REST API client.

    Here is my forum post on the Magento forum explaining the problem I'm having http://www.magentocommerce.com/board...thread/735173/

    Once that is solved perhaps you can help me with the Spoon REST API client.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.