Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
iam trying to post the below records to destination through the rest api ,
[
{
"dcId": 770,
"year": 2022,
"month": 1,
"serviceName": "VSI Silver",
"networkName": "ESF",
"demandAttr": {
"OSI": 236.795
}
}
]
the test connection is working fine with above body ,but using with ''with connection'" its throwing error like bad request,
any one please help on below code is there any error in below code
thanks
LET vRequestBody ='[';
LET vRequestBody ='{';
Let vRequestBody = vRequestBody&'"dcId":778,';
Let vRequestBody = vRequestBody&'"year":2022,';
Let vRequestBody = vRequestBody&'"month":1,';
Let vRequestBody = vRequestBody&'"serviceName":"VSI Silver",';
Let vRequestBody = vRequestBody&'"networkName":"ESF",';
Let vRequestBody = vRequestBody&'"demandAttr":{';
Let vRequestBody = vRequestBody&'"OSI":236.795';
Let vRequestBody = vRequestBody&'}';
Let vRequestBody = vRequestBody&'}';
Let vRequestBody = vRequestBody&']';
let vRequestBody = replace(vRequestBody,'"', chr(34)&chr(34));
LIB CONNECT TO 'REST_helius_PostMethod';
RestConnectorMasterTable:
SQL SELECT
"__KEY_root",
(SELECT
"dcId",
"year",
"month",
"serviceName",
"networkName",
"__KEY_data",
"__FK_data",
(SELECT
"OSI",
"__KEY_demandAttr",
"__FK_demandAttr"
FROM "demandAttr" PK "__KEY_demandAttr" FK "__FK_demandAttr")
FROM "data" PK "__KEY_data" FK "__FK_data"
)
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
BODY "$(vRequestBody)"
);
same script but its not working ,but the test connection is working fine with below post body
[
{
"dcId": 770,
"year": 2022,
"month": 1,
"serviceName": "VSI Silver",
"networkName": "ESF",
"demandAttr": {
"OSI": 236.795
}
}
]
Can you post your error
here is the error message while loading
@any help on this Qlikadmin team
By any chance have you seen this already ??
Hope it helps!
This may also be of help, make sure there is no URL encoding used in the connector config
https://community.qlik.com/t5/Support-Updates-Blog/Error-400-Bad-Request-returned-for-URL-with-speci...