Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Rest Client Step (Help)

Hybrid View

  1. #1
    Join Date
    Aug 2017
    Posts
    4

    Default Rest Client Step (Help)

    HI Guys,

    I'm very new to kettle and I'm trying to learn more. Currently I'm trying to connect to this API link that needs this tokens to connect. I'm having trouble how to set up the rest client step and where to put this tokens.

    Example Authentication Tokens are as follows:

    consumer_key - 1234567
    consumer_secret - 6789450
    access_key - 956738393
    access_secret - 946736383

    Can anyone point me to the right direction on how I can connect to my API link with this tokens using rest client step..please Theres not much sample to read for the rest client step for kettle.

    By the way its a POST method request.

    Thanks!

  2. #2
    Join Date
    Aug 2011
    Posts
    212

    Default

    Hi Buddy,

    You usually have to form the request string that contains your customer/access key. Not sure what API you are trying to access but there is normally some kind of documentation if it's a commercial API. If it's custom, then you will try to find someone who is familiar with the API.

    The documentation will tell you what you need in your request.

    I usually use a javascript step (not the most efficient but easy to code).

    Some API's return a unique token that is valid for a certain amount of time, and is used in later requests - so you will have to process the response you get (usually using XML parse step).

    Hopefully this points you in the right direction - if not, just respond.
    PDI 7.0.0
    MySQL - 5.6.23
    Redshift - 1.0.1101
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  3. #3
    Join Date
    Aug 2017
    Posts
    4

    Default

    HI tnewman,


    Thanks so much for the quick reply. Where should I put this tokens in the rest client step? How do i do it? Apologies i'f im asking too much. By the way the API I'm using is from a vendor. I can call this API using postman but i dont know how to do this with kettle. I'm very new to programming as well, thats why I'm trying to read and learn as much as possible.

  4. #4
    Join Date
    Aug 2017
    Posts
    4

    Default

    hi tnewman,

    the link below is the same API I'm trying to use but i'm not sure how to do it with kettle using the rest client step.

    https://github.com/LivePersonInc/dev...ntHistory.java

    Thanks!

  5. #5
    Join Date
    Aug 2011
    Posts
    212

    Default

    Hi Buddy,

    Have you looked at - https://connect.liveperson.com/conte...g-restful-chat ?

    Is this the set of API's you are looking at?

    I think it will have to be a case of RTFM. In particular 'retrieve API keys' and 'authentication' from here - 'https://developers.liveperson.com/documents.html'

    I believe you will need to install openssl. I think it will be easier for you to use a script to get the access token for the API. It uses JWT and I found a sample script

    https://superuser.com/questions/6069...r-applications

    I will be well worth your time looking at these docs.

    Hopefully this gives you more direction
    PDI 7.0.0
    MySQL - 5.6.23
    Redshift - 1.0.1101
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  6. #6
    Join Date
    Aug 2017
    Posts
    4

    Default

    HI Tnewman,

    I actually have all the access token and the other tokens, but how do i use or put them in the rest client step for me to be able to access the API link and get a json file from it . Btw thank you so much for helping me with this. how do i process this authentication part in kettle to proceed.

    Yes below is the API link I'm using.

    "https://{BASE URI}/interaction_history/api/account/{YOUR ACCOUNT NUMBER}/interactions/search?offset=0&limit=100"

    Thank you. I would be very honest, I'm very green when it comes to programming.

  7. #7
    Join Date
    Aug 2011
    Posts
    212

    Default

    Buddy,

    As I read the docs, it seems that you need to pass different authentication depending the which API you are trying to access. If you need to pass a JWT signature you will need to use the shell script (job) with a 'curl' command, for POST you will need to generate the URL in a javascript component and then pass that to a 'HTTP post' component (transformation).

    I have to admit their documentation is a little confusing. If you have a support contract - I would recommend using it.

    Makes sense ?
    PDI 7.0.0
    MySQL - 5.6.23
    Redshift - 1.0.1101
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

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 - 2017 Pentaho Corporation. All Rights Reserved.