Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: REST CLIENT to Dovico API

  1. #1
    Join Date
    Apr 2011
    Posts
    159

    Default REST CLIENT to Dovico API

    Greetings.

    Trying to interface with the Dovico API with PDI. The online documentation gives a curl example that I can run successfully from a command line

    curl -H "Authorization: WRAP access_token=\"client=[my-client-token-here]&user_token=[my-user-token-here]\"" -k https://api.dovico.com/employees/?version=5

    However, I'm wrestling with getting this 'header' context into kettle.

    I tried this first:
    • Step: Generate Rows
    • Create a field: [Authorization:]
    • Assigned the value: [WRAP access_token="client=[my-client-token-here]&user_token=[my-user-token-here]"]
    • Step: REST Client
    • Headers tab
    • Field: Authorization:, Name: Authorization:


    I get back:
    <Error xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Description>The server failed to authenticate the request.</Description><Status>Unauthorized</Status></Error>

    I also tried:
    I tried this first:
    • Step: Generate Rows
    • Create a field: [auth]
    • Assigned the value: [Authorization: WRAP access_token="client=[my-client-token-here]&user_token=[my-user-token-here]"]
    • Step: REST Client
    • Headers tab
    • Field: auth, Name: auth


    Same result.

    (NOTE - in curl I has to escape the quotes, but assume I do not have to with kettle.)

    Leads on what I'm doing wrong?

    Thank you!

  2. #2
    Join Date
    Apr 2011
    Posts
    159

    Default

    Man...figured this out...problem was I was (foolishly) including the ":" in my header name.

    This works ok:


    • Step: Generate Rows
    • Create a field: [Authorization]
    • Assigned the value: [WRAP access_token="client=[my-client-token-here]&user_token=[my-user-token-here]"]
    • Step: REST Client
    • Headers tab
    • Field: Authorization, Name: Authorization

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.