Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: REST Client with Array parameter no detects parameter of it is not right defined

  1. #1
    Join Date
    Feb 2017
    Posts
    2

    Exclamation REST Client with Array parameter no detects parameter of it is not right defined

    Hi, I'm trying to call a REST Web Service (of clickmeeting) with REST Client with method POST, but the WS require that the parameter is an array. But when I call the WS it return like no parameter is found. Next I describe:

    What the WS requires:

    POST https://api.clickmeeting.com/v1/conferences/<:room_id>/registration
    X-Api-Key: MY_API_KEY
    Params:
    (int) room_id room identifier.
    POST:
    (array) registration registration array
    1 - first name.
    2 - second name.
    3 - email address.
    or describe in other way
    $params = array(
    'registration' => array(
    1 => 'John',
    2 => 'Dee',
    3 => 'example@domain.com',
    ),
    );

    If I use via curl it works:

    curl --request POST https://api.clickmeeting.com/v1/conf...6/registration --header "X-Api-Key:eu802b39133234343243242347126a6" --data "registration[1]=John&registration[2]=Smith&registration[3]=jsmith@gmail.com"


    What I do (the different options that I've Tried)

    Option1) the array as constant with following: registration[1]=John&registration[2]=Smith&registration[3]=jsmith@gmail.com
    Option2) as Json that return the json with field 1,2,3 with json bloc name "registration"
    Option3) include constant as parameter with &registration=John,Smith,jsmith@gmail.com



    Always it returns as no found the array parameter:

    {"code":422,"name":"VALIDATION_ERRORS","errors":[{"name":1,"message":"The "First Name" field is required and can`t be empty."},{"name":2,"message":"The "Last Name" field is required and can`t be empty."},{"name":3,"message":"The "Email Address" field is required and can`t be empty."}]}

    Thanks in advance

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You didn't show exactly what you did with the REST-Client step, but AFAICS Option3 is not supported by the ClickMeeting API.
    Use your key in the attached demo and see where it gets you.
    Attached Files Attached Files
    So long, and thanks for all the fish.

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.