Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
r20017aaa
Creator III
Creator III

REST Connector

How can I query a rest API based on a qlikview table.

For example using the site example given in the Qlik REST documentation :

http://dev.markitondemand.com/MODApis/Api/v2/Quote?symbol=UPS

How do I query "Open" and "Symbol" from the 3 stocks that are in the below table?

MyStocks:

LOAD * INLINE [

    MySymbols

    IBM

    I

    UPS

];

Thanks

6 Replies
jaumecf23
Creator III
Creator III

Hi,

Try this code:

MyStocks:

LOAD * INLINE [

    MySymbols

    IBM

    I

    UPS

];

LET vSymbol = FieldValueCount('MySymbols')-1;

FOR vCountIndex = 0 to $(vSymbol)

LET vActualSymbol = Peek('MySymbols', $(vCountIndex),'MyStocks');

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url=http://dev.markitondemand.com/MODApis/Api/v2/Quote?symbol%2$(vActualSymbol);timeout=30;method=GET;au...";

RestConnectorMasterTable:

SQL SELECT

"Symbol",

"Open"

FROM XML "StockQuote";

[StockQuote]:

LOAD [Symbol],

[Open]

RESIDENT RestConnectorMasterTable;

DROP TABLE RestConnectorMasterTable;

next vCountIndex;

r20017aaa
Creator III
Creator III
Author

thank you, could you attach qvd, copy and paste did not work.

jaumecf23
Creator III
Creator III

Hi,

I have attached the document.

r20017aaa
Creator III
Creator III
Author

thank you but I get same error I was getting when copy paste,  but for you guess working.

Any idea?

30-05-2018 16-41-15.png

jaumecf23
Creator III
Creator III

Hi,

Are you able to create the Rest Connection without any problem? The error only appears when you try to read and specific table?

Thanks and Regards,

r20017aaa
Creator III
Creator III
Author

Yes I can do Rest calls, for example the attached here do work for me, but yours no, very strange.

I am using version 11, maybe related.