Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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;

Anonymous
Not applicable
Author

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

jaumecf23
Creator III
Creator III

Hi,

I have attached the document.

Anonymous
Not applicable
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,

Anonymous
Not applicable
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.