Topic
  • 4 replies
  • Latest Post - ‏2012-06-14T20:19:06Z by dhmlau
dhmlau
dhmlau
23 Posts

Pinned topic REST service to execute application

‏2012-06-01T20:55:57Z |
Hi,

I'm using BigInsights 1.3 FP1, and trying to execute the DB Import sample application using REST service. From the documentation, it says the url should be:
http://<host>:<port>/data/controller/ApplicationManagement?actiontype=run_application&run_config=<runConfigurationXML>

I tried to run it. the HTTP response code is 200 (which is ok) but it's null when getting the input stream. I tried with the Poster adds-on, it's the same.

My <runConfigurationXML> content looks like this: (i got the appid from another REST call)
<runconfig>
<name>Default Execution</name>
<appid>eda726a0-b0a8-49be-bb80-fca51574d590</appid>
<properties>
<property>
<name>pptFile</name>
<value paramtype="FILEPATH">/user/db2_test.properties</value>
</property>
<property>
<name>dbStatement</name>
<value paramtype="TEXTAREA">SELECT * FROM MYSCHEMA.TEST</value>
</property>
<property>
<name>outputFormat</name>
<value paramtype="LIST">json</value>
</property>
<property>
<name>outputDir</name>
<value paramtype="DIRECTORYPATH">/user/Test</value>
</property>
<property>
<name>delimiter</name>
<value paramtype="LIST">comma</value>
</property>
<property>
<name>headers</name>
<value paramtype="BOOLEAN">true</value>
</property>
</properties>
</runconfig>
Did I miss something?

Thanks,
Diana
Updated on 2012-06-14T20:19:06Z at 2012-06-14T20:19:06Z by dhmlau
  • dhmlau
    dhmlau
    23 Posts

    Re: REST service to execute application

    ‏2012-06-01T21:19:23Z  
    and i go back to check the application status from the web console, there is no new application being executed.
  • SystemAdmin
    SystemAdmin
    603 Posts

    Re: REST service to execute application

    ‏2012-06-07T18:04:03Z  
    Hi Diana,

    In the process for checking it for you.

    Thanks,

    Zach
  • SystemAdmin
    SystemAdmin
    603 Posts

    Re: REST service to execute application

    ‏2012-06-07T20:39:51Z  
    • dhmlau
    • ‏2012-06-01T21:19:23Z
    and i go back to check the application status from the web console, there is no new application being executed.
    Hi,

    Please try with parameter name runconfig instead of run_config.

    e.g.

    http://<host>:<port>/data/controller/ApplicationManagement?actiontype=run_application&*runconfig*=<runConfigurationXML>

    Example code attached.

    Thanks,

    Zach
  • dhmlau
    dhmlau
    23 Posts

    Re: REST service to execute application

    ‏2012-06-14T20:19:06Z  
    Hi,

    Please try with parameter name runconfig instead of run_config.

    e.g.

    http://<host>:<port>/data/controller/ApplicationManagement?actiontype=run_application&*runconfig*=<runConfigurationXML>

    Example code attached.

    Thanks,

    Zach
    thanks. it works.