Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
DatabaseGuy
Contributor
Contributor

SSIS API Call

I'm trying to get a list of Apps and what streams they exist in. Below is some of the code I'm trying to use in order to connect to the server, but I feel like I'm in some way missing something on an authentication stand point. Currently it's telling me that the server is actively rejecting and closing my connection. 

var request = (HttpWebRequest)WebRequest.Create("http://WebAddress/dev-hub/engine-api-explorer?qlikTicket=6WNtxKaJWM2zhUFg");
request.ContentType = "application/json";
request.Method = "POST";
request.ServicePoint.Expect100Continue = false;

using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
string json = " {\"username\": \"MyUserName\",\"password\": \"MyPassword\",\"name\": \"GETAPPLIST\", \"handle\": \"-1\", \"method\": \"GetDocList\", \"params\": []}";
streamWriter.Write(json);
}

 

Thanks

1 Reply
kassyernar
Partner - Contributor
Partner - Contributor

var https = require('https');
var fs = require('fs');

var options = {
    hostname: 'demo.test.kz',
    port: 4242,
    path: '/qrs/app/full?xrfkey=0MwkYLXpxHrbkKGu',
    method: 'GET',
    headers: {
        'x-qlik-xrfkey' : '0MwkYLXpxHrbkKGu',
        'x-qlik-xrfkey' : '0MwkYLXpxHrbkKGu',
        'X-Qlik-User' : 'UserDirectory=internal; UserId=sa_repository'
    },
    key: fs.readFileSync("C:\\Users\\...\\client_key.pem"),
    cert: fs.readFileSync("C:\\Users\\...\\client.pem"),
    ca: fs.readFileSync("C:\\Users\\...\\root.pem")
};
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
https.get(options, function(res) {
    var bmpString = "";
    res.on("data", function(data) {
        bmpString += data;
    });
    res.on("close", function() {
      console.log(bmpString)
    });
}).on('error', function(e) {
    console.log("Got error: " + e.message);
});