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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

REST connection fails

Hi,

I have a problem connection with REST to a web API hosted by a ITSM system. I can make REST connections through other tools (Powershell using Invoke-RestMethod, and Advanced REST Client) and extract the data, but when setting this up with Qlik Sense Desktop, it fails:


Load Statement

LIB CONNECT TO 'NilexTest-GetEntityListByQuery';

RestConnectorMasterTable:

SQL SELECT

"__KEY_root",

(SELECT

"Id",

"Type",

"CreatedDate",

"EntityType",

"Type.Id",

"__FK_Data"

FROM "Data" FK "__FK_Data")

FROM JSON (wrap on) "root" PK "__KEY_root";

[Data]:

LOAD [Id] AS [Id],

[Type] AS [Type],

[CreatedDate] AS [CreatedDate],

[EntityType] AS [EntityType],

[Type.Id] AS [Type.Id],

[__FK_Data] AS [__KEY_root]

RESIDENT RestConnectorMasterTable

WHERE NOT IsNull([__FK_Data]);

DROP TABLE RestConnectorMasterTable;

From the error log:

Error: QVX_UNEXPECTED_END_OF_DATA: HTTP protocol error 400 (Bad Request):

2017-12-21 16:47:00  

2017-12-21 16:47:00      {"Data":null,"Errors":[{"Message":"Invalid json: 'Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path '', line 1, position 12.'","Code":21,"MessageDetails":"Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item i...

I can browse and select the data, so the connection is working up until I press Load Data, and the error above appears.

2017-12-21_16-52-22.png

I have seen other community discussions regarding similar issues, but my Sense scripting skills are limited so I haven't been able to transform them successfully to match my needs.

REST CONNECTOR, Override request body

Can anyone assist in this issue?

BR,

Robert

1 Reply
Anonymous
Not applicable
Author

Are you selecting all the tables while loading the data?

Or It may be due rest connectors details ....