Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Kevin-M
Contributor II
Contributor II

Web API - POST XML

Hi,

We have used the Rest API successfully when using the Get method but are now working on XML response to a POST.  The connection is successful, but the results are in a single 'output' field in CSV format which is truncated due to field length as we are reporting on multiple records.

The Post method template is similar as follows :

<?xml version='1.0' encoding='UTF-8'?>

<call method='exportData' callerName='a string that identifies your client application'>

<credentials login='"&login&"' password='"&password&"'></credentials>

<version name='"&ActualVersion&"' isDefault='false'></version>

<format useInternalCodes='true' includeUnmappedItems='false'></format>

<filters>

<accounts>

<account code='<Account Code>' isAssumption='false' includeDescendants='true'></account>

</accounts>

<timeSpan start='"&d1&"' end='"&d2&"'></timeSpan>

</filters>

<dimensions>

<dimension name='<Dimension''></dimension>

 

</dimensions>

<rules includeZeroRows='false' markInvalidValues='false' markBlanks='false'

timeRollups='false'>

 

</rules>

</call>

 

And the load script is as follows:

RestConnectorMasterTable:
SQL SELECT
"attr:success" AS "success",
"output"
FROM XML "response";

[response]:
LOAD [success],
[output]
RESIDENT RestConnectorMasterTable;

DROP TABLE RestConnectorMasterTable;

Does anybody have any experience or suggestions in formatting the XML response in table format or how we could export entire output to a CSV file to then load into Qlik Sense?

Appreciate any help provided.

0 Replies