Qlik Community

Ask a Question

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jochem_zw
Partner
Partner

REST Connector - Http Status Codes in Variable

Is it possible to get the HTTP Status code from a API request with the Qlik REST Connector?

I want to have the status 200, 204 or 206 from my API Datasource, as long as I got a 206 (Partial) there is more data available, so I have to page.

BR Jochem

3 Replies
Bjorn_Wedbratt
Support
Support

Hi Jochem,

I'm using ScriptErrorDetails in my script and searches for '404' to stop loading. You should be able to do something similar.

SET ErrorMode = 0;

Do

SQL SELECT

<something>

FROM <something>;

Let vContinueLoad = SubStringCount('$(ScriptErrorDetails)','206');

exit do when vContinueLoad <> 1;

Something like that might do the trick

jochem_zw
Partner
Partner
Author

I like to use it in the 'WITH CONNECTION' part of the script

I already tried the errormode, but there is no error coming from the 'WITH CONNECTION'

So ScriptErrorDetails stays <NULL>

When I get a 206 means there is more data available from the REST API so I would like to take the next 100 (page_size).

celindho
Partner
Partner

Did you manage to solve this?