Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
How to create stream using QRS api? what is the syntax / API url for create stream ?
Even Documentation is also fine for me
It looks like the "name" property is the only property you really have to define in the body of that call. I've added this example that illustrates how to do it:
You probably want to use this one:
Hello Satyanarayana Gopu,
Here's the code for creating the stream using QRS Api -
Code:
var fs = require('fs');
var request = require('request');
var r = request.defaults({
rejectUnauthorized: false,
host: 'Host-name',
pfx: fs.readFileSync("client.pfx"),
passphrase: '1234' //if you have password to certificate else no need to define this
});
//Authenticate whatever user you want
var b = JSON.stringify({
"UserDirectory": 'user-directory',
"UserId": 'user-Id',
"Attributes": []
});
console.log('New Stream');
r.post({
url:'https://Host-name:4242/qrs/stream/?xrfkey=abcdefghijklmnop',
body: { name: 'user-Id' },
headers: {
'cache-control': 'no-cache',
'x-qlik-user': 'UserDirectory= user-directory; UserId= user-Id',
'content-type': 'application/json',
'x-qlik-xrfkey': 'abcdefghijklmnop'
},
json: true
},function(err,res,body){
console.log(body);
//Check the Stream gets created in Qliksense hub/qmc
}
);
Here's the link for more refernces -
Link for list of endpoints for QRS Api
Thanks & Regards,
Prashant Naik
Thank you Kolsrud.
I will check the documentation. If you have any sample on the create stream using NTLM authentication, please share to me. Thanks!
It looks like the "name" property is the only property you really have to define in the body of that call. I've added this example that illustrates how to do it:
Thanks Kolsrud.
Solution is working fine.
I have added the xrfkey in case of streams due to that it is not working for me.