Mashape and RapidMiner

ighybooighyboo Member Posts: 26 Contributor II
edited November 2018 in Help
Dear all,
I'm struggling to use the "Enrich data by WebService" in combination with Mashape.

I managed to configure the component with most API directly (even those that required authentication) but I can't make it work with Mashape.
I tried to pass the Mashape key in the HTTP header as suggested here: http://rapid-i.com/rapidforum/index.php/topic,7877.msg27001.html#msg27001 but no luck.

Could someone guide me a bit? Perhaps posting here the code of a working operator? :)

Thanks a lot



  • Options
    orliesaurusorliesaurus Member Posts: 3 Contributor I
    I work at Mashape, can you show me a screenshot of how you've configured the header information to be passed to Mashape?
    I'll be glad to help :)

  • Options
    ighybooighyboo Member Posts: 26 Contributor II
    Hello Orliesaurus,
    thanks a lot for the prompt reply and sorry for my late one (was abroad)

    Here a couple of examples of how I passed the parameters.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.015">
      <operator activated="true" class="process" compatibility="5.3.015" expanded="true" name="Process">
        <process expanded="true">
          <operator activated="true" class="web:encode_urls" compatibility="5.3.001" expanded="true" height="76" name="Encode URLs" width="90" x="313" y="30">
            <parameter key="url_attribute" value="description"/>
            <parameter key="encoding" value="UTF-8"/>
          <operator activated="true" class="web:enrich_data_by_webservice" compatibility="5.3.001" expanded="true" height="60" name="Enrich Data by Webservice" width="90" x="514" y="30">
            <parameter key="query_type" value="Regular Region"/>
            <list key="string_machting_queries"/>
            <list key="regular_expression_queries"/>
            <list key="regular_region_queries">
              <parameter key="response" value="^.$"/>
            <list key="xpath_queries"/>
            <list key="namespaces"/>
            <list key="index_queries"/>
            <parameter key="url" value=";"/>
            <list key="request_properties">
              <parameter key="head" value="&quot;X-Mashape-Key: K69gXvTJuXmshCkyF9MP0GpUztZ9p1rEBibjsnGuYHdyrUZTnu&quot;"/>
              <parameter key="X-Mashape-Key" value="K69gXvTJuXmshCkyF9MP0GpUztZ9p1rEBibjsnGuYHdyrUZTnu"/>
              <parameter key="&lt;head&gt;" value="&quot;X-Mashape-Key: K69gXvTJuXmshCkyF9MP0GpUztZ9p1rEBibjsnGuYHdyrUZTnu&quot;"/>
              <parameter key="&quot;X-Mashape-Key&quot;" value="&quot;K69gXvTJuXmshCkyF9MP0GpUztZ9p1rEBibjsnGuYHdyrUZTnu&quot;"/>
          <connect from_port="input 1" to_op="Encode URLs" to_port="example set input"/>
          <connect from_op="Encode URLs" from_port="example set output" to_op="Enrich Data by Webservice" to_port="Example Set"/>
          <connect from_op="Enrich Data by Webservice" from_port="ExampleSet" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="source_input 2" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
    I put several variation of what I tried in one single operator but of course when trying I only left one version at the time.

    Thanks a lot for looking into this! :)

    P.S. The process expects a text field named "description" as input
  • Options
    ighybooighyboo Member Posts: 26 Contributor II
    Anyone else who might help? Would be great to close my week with one issue sorted :D

  • Options
    orliesaurusorliesaurus Member Posts: 3 Contributor I
    I can't find any documentation on how to use Rapidminer. are you usre key="head" shouldn't instead be key="header" ?
  • Options
    ighybooighyboo Member Posts: 26 Contributor II
    Thanks Oliesaurus... And no worries about the delay.. I totally understand :)

    I tried all sorts of combinations:


    But no luck..

    It's probably something very simple but I can't get it to work... Grrrrrrrrrrr... So frustrating  >:(

    Let's see if someone else has managed to make it work...  ???
  • Options
    ighybooighyboo Member Posts: 26 Contributor II
    Did anyone manage to solve this one?
  • Options
    ighybooighyboo Member Posts: 26 Contributor II
    Thanks a lot Orliesaurus!!

    Will give that a go later today :)
Sign In or Register to comment.